Message 8/569 From Jeroen van der Zijp Apr 27, 05 12:26:43 PM -0500 Organization: FOX Toolkit To: foxgui-users@lists.sourceforge.net Subject: Re: [Foxgui-users]fox issues between xwindows / windows. Cc: Abe Stephens Hey,, > > I've had some difficultly running a fox application remotely using > xwindows. I've tried this on several different machines with different > builds of fox, so I think there is a possibility I am doing something > that I shouldn't be. > > I have an application which displays an image to the user with an > FXImage/FXImageView. This image is refreshed when the user presses a > key, if the user presses a key rapidly, the application dies with the x > errors listed below. On a key stroke, several other threads go out and > refresh a copy of the image, which is then copied into the FXImage's > data by the gui thread. > > Displaying on a linux prism from a linux altix: (fox 1.4 built on Intelicpc, ia64) > X Error: code 16 major 41 minor 0: BadLength (poly request too large or > internal Xlib length error). > > Displaying on a linux prism from an origin (fox 1.4 built on MipsPro) > X Error: code 14 major 1 minor 0: BadIDChoice (invalid resource ID > chosen for this connection). > X Error: code 1 major 0 minor 0: BadRequest (invalid request code or no > such operation). > > Displaying on an origin from one of the origin's heads (fox 1.4 built on MipsPro) > X Error: code 16 major 3 minor 0: BadLength (poly request too large or > internal Xlib length error). > > Here is basically what the code looks like.. I have an FXImage: > > // In the constructor: > fx_image = new FXImage( getApp(), fx_image_data, IMAGE_KEEP, width, > height ); > > After updating the data of the fx_image, I call > > // Copy stuff into fx_image_data... > > fx_image->render(); // FXImage * > fx_image_frame->update(); // FXImageView * > > Everything works wonderfully on a windows xp xeon build of the same > software, of course theres no x server involved on that machine. The > errors only occurs if I press keys rapidly which cause the software to > refresh the image. > > I'm not an X-windows programmer (one reason I enjoy fox) so any > suggestions would be helpful-- Its very strange because it seems to me that the request codes don't have any bearing on generating X11 images... What I recommend is to (1) pass the "-sync" argument when you're starting your application, and (2) put a breakpoint in the xerrorhandler. This will allow you to see what actual X11 command caused the trouble. Without the "-sync" the commands are buffered which means that the error code is not necessarily correlated with the last command issued from the client. Hope this helps, Jeroen