Sponsored Content
Top Forums Programming Fork thread, Assertion failed. X11. Post 302491869 by mghis on Friday 28th of January 2011 02:07:19 PM
Old 01-28-2011
Fork thread, Assertion failed. X11.

Hi all.
I wrote a program with the Motif Widget Toolkit. It has a
button and a scrollbar. When the user hits the button the
callback creates a new fork() thread. The new thread sleeps
for a while and then changes the position of the scrollbar.
It does this in an endless loop.

I need the fork thread because part of application must
go back to the event loop, dispatch all events and run
the callbacks.

Well, when the new thread tries to modify the scrollbar I get
Code:
main: xcb_io.c:221: poll_for_event: Assertion `(((long) (event_sequence) - (long) (dpy->request)) <= 0)' failed.

It works well if the scrollbar is modified inside the
original thread, but I get this error if I create the new
thread.

The code is posted here. C | #include <Xm/Xm.h> #include <Xm/XmAll.h> #incl - Main.c

Can anyone help? Thanks!
 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Endless loop - Fork function failed?

I need a quick script that will serve as a sort of "real time monitor" for watching some log files. I am using Bourne shell in HP-UX 10.20. I have basically created a script that never ends, unless of course I manually terminate it. Here's the script (it's called qhistory): clear echo "REAL... (3 Replies)
Discussion started by: cdunavent
3 Replies

2. UNIX for Advanced & Expert Users

SFTP error Assertion failed

I get this error when I try to FTP from an HP Alpha Server to a UNIX box. FATAL: BUILD13$:SSHFC_TRANSFER.C;1:1835 SshFCTransfer (function name unavailable) Assertion failed: tdata ->current_dest_file->attributes->flags & 0x00000004 the sftp /put fails just before it does the actual transfer.... (2 Replies)
Discussion started by: NoelSacay
2 Replies

3. Windows & DOS: Issues & Discussions

cygwin-x/can't install xorg-x11-f100 & xorg-x11-fnts

Hello All. Really a newbie to Linux/Unix. Trying to get into Linux. Using XP PE currently. Installed cygwin and trying to intall cygwin-x. Everything else is setup nice but i can't seem to install these two packages (without whom xwin won't start) 1. xorg-x11-f100 2. xorg-x11-fnts Tried the... (1 Reply)
Discussion started by: binodbdrchand
1 Replies

4. UNIX for Advanced & Expert Users

Use fork() in thread

Hi experts, I have a plan to implement following schema: multi-threaded pthreads application with exactly 3 threads. One thread calls from time to time fork(), and from the child process it executes an unix command by execv(). Is that safe design? I've heard rumors that mixing threads and... (3 Replies)
Discussion started by: Pavel.Bures
3 Replies

5. SCO

-sh: fork failed - too many processes in sco unix 5.0.5

Dear experts, I have done a re-installation of sco unix openserver 5.0.5 and managed to create users. The problem am facing is that of one user logging in more than 5 times. How can i overcome this problem. the system give the error below. -sh: fork failed - too many processes in sco unix... (5 Replies)
Discussion started by: njoroge
5 Replies

6. SCO

SLD: Failed to start the PMD Connection thread. (PM_THREAD_FAILED_TO_START).

Hello, I have a client with an 18 year old SCO Openserver 5.0.5 server. They can't find their installation media. They are experiencing an error at login: *LOGIN: ERROR- Failed to initialize policy manager. (IFOR_PM_FATAL) The status from the policy manager daemon (PMD -... (10 Replies)
Discussion started by: brhunt
10 Replies

7. UNIX for Advanced & Expert Users

[Solved] putty+x11:How do I pass X11 display rights to "su"?

I can log into a unix system with Putty. I've set the "X11 forwarding" checkbox, and I've verified that I can display an X11 window back on my laptop. What I need to be able to do is "su" to another uid after logging in and then run something which display a window back on my laptop, with the... (2 Replies)
Discussion started by: dkarr
2 Replies

8. AIX

Fork Function Failed on 4GB ?

Hello, I am running Oracle Database and after a while I keep getting this message whenever I execute any command. I cannot execute any command even shutdown, whenever I execute any command , I get this message /usr/bin/ksh: 0403-031 The fork function failed. There is not enough memory... (7 Replies)
Discussion started by: filosophizer
7 Replies
TIX(3)							       Tix Built-In Commands							    TIX(3)

NAME
tixScrolledWindow - Create and manipulate Tix ScrolledWindow widgets SYNOPSIS
tixScrolledWindow pathName ?options? -anchor -background -cursor -relief -borderWidth WIDGET-SPECIFIC OPTIONS [-height height] Specifies the desired height for the window, in pixels. [-scrollbar scrollbar] Specifies the display policy of the scrollbars. The following values are recognized: auto ?+x? ?-x? ?+y? ?-y? When -scrollbar is set to "auto", the scrollbars are shown only when needed. Additional modifiers can be used to force a scrollbar to be shown or hidden. For example, "auto -y" means the horizontal scrollbar should be shown when needed but the vertical scrollbar should always be hidden; "auto +x" means the vertical scrollbar should be shown when needed but the hori- zontal scrollbar should always be shown, and so on. both Both scrollbars are shown none The scrollbars are never shown. x Only the horizontal scrollbar is shown; y Only the vertical scrollbar is shown. [-width width] Specifies the desired width for the window, in pixels. [-xscrollincrement xScrollIncrement] Specifies by how much the win- dow should be scrolled in the horizontal direction when the user presses the arrows in the horizontal scrollbar. In Pixels. [-yscrollincrement yScrollIncrement] Specifies by how much the window should be scrolled in the vertical direction when the user presses the arrows in the horizontal scrollbar. In pixels. SUBWIDGETS
Name: hsb Class: Scrollbar The horizontal scrollbar subwidget. Name: window Class: Frame The frame subwidget which is scrolled by the ScrolledWindow widget. Name: vsb Class: Scrollbar The vertical scrollbar subwidget. DESCRIPTION
The tixScrolledWindow command creates a new window (given by the pathName argument) and makes it into a ScrolledWindow widget. Additional options, described above, may be specified on the command line or in the option database to configure aspects of the ScrolledWindow widget such as its cursor and relief. CREATING WIDGETS INSIDE A SCROLLEDWINDOW WIDGET
To create widgets inside a ScrolledWindow widget, one must create the new widgets relative to the window subwidget and manage them inside the window subwidget. An error will be generated if one tries to create widgets as immediate children of the ScrolledWindow. For example: the following is correct code, which creates new widgets inside the window subwidget: tixScrolledWindow .w; pack .w set f [.w subwidget window] button $f.b -text hi -width 40 -height 40 pack $f.b The following example code is incorrect because it tries to create immediate children of the ScrolledWindow .w: tixScrolledWindow .w; pack .w button .w.b -text hi -width 40 -height 40 pack .w.b WIDGET COMMANDS
The tixScrolledWindow command creates a new Tcl command whose name is the same as the path name of the ScrolledWindow widget's window. This command may be used to invoke various operations on the widget. It has the following general form: pathName option ?arg arg ...? PathName is the name of the command, which is the same as the ScrolledWindow widget's path name. Option and the args determine the exact behavior of the command. The following commands are possible for ScrolledWindow widgets: pathName cget option Returns the current value of the configuration option given by option. Option may have any of the values accepted by the tixScrolledWindow command. pathName configure ?option? ?value option value ...? Query or modify the configuration options of the widget. If no option is specified, returns a list describing all of the available options for pathName (see Tk_ConfigureInfo for information on the format of this list). If option is specified with no value, then the command returns a list describing the one named option (this list will be identical to the corresponding sublist of the value returned if no option is specified). If one or more option-value pairs are specified, then the command modifies the given widget option(s) to have the given value(s); in this case the command returns an empty string. Option may have any of the values accepted by the tixScrolledWindow command. pathName subwidget name ?args? When no additional arguments are given, returns the pathname of the subwidget of the specified name. When no additional arguments are given, the widget command of the specified subwidget will be called with these parameters. KEYWORDS
Tix(n) Tix 4.0 TIX(3)
All times are GMT -4. The time now is 10:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy