Ticket #359 (closed usability: fixed)

Opened 3 years ago

Last modified 22 months ago

AIGLX: Running Complex OpenGL Qt3 app from Linux via XQuartz Generates MANY "X Error: BadRequest" Errors

Reported by: Daryl@… Owned by: jeremyhu@…
Priority: Important Milestone: 2.6.3
Component: GLX Version: 2.5.0 (xserver-1.7.6)
Keywords: X11 X Error BadRequest OpenGL PLIB SSG Cc:

Description (last modified by jeremyhu@…) (diff)

I am accesssing my OpenSUSE 11.1 system via XQuartz (version 2.5.0_rc1) to develop and test my KDE3/Qt3/OpenGL applications.

For my more complex OpenGL apps, I use PLIB's SSG (simple scene graph, see <http://plib.sourceforge.net/> and <http://plib.sourceforge.net/ssg/index.html>) to load and render OpenFlight-format 3D models. When I run directly on the Linux system, it works perfectly.

When I run via XQuartz from my Mac, though, I get many MANY errors of the type:

	X Error: BadRequest (invalid request code or no such operation) 1
	  Major opcode:  147
	  Minor opcode:  179
	  Resource id:  0x2200376

The error type is always the same, and I believe that major and minor opcodes are always the same as well.

These Qt apps also crash when quitting them only when run via XQuartz, but this isn't a huge concern for me.

The X Errors are a problem, though, as many MANY of them are generated, causing a very noticeable drop in the performance of the KDE3/Qt3/OpenGL app. Otherwise, though, the application appears to work fine and the 3D models are rendered beautifully via XQuartz.

Change History

comment:1 Changed 3 years ago by jeremyhu@…

  • Status changed from new to assigned
  • Description modified (diff)
  • Milestone changed from 2.5.0 to OpenGL.framework DRI

What extension is your major opcode 147?

comment:2 Changed 3 years ago by jeremyhu@…

Plus, I don't know any extension that has 179 procedures (for the minor opcode = 179) ... you'll need to debug this more on your end to figure out what you are trying to ask the Xserver to do.

Can you come up with a reduced test case?

comment:3 follow-up: ↓ 4 Changed 3 years ago by jeremyhu@…

Actually, I think that this is GLX / X_GLrop_MatrixMode

You should break on glMatrixMode in your code to see what is happening there...

comment:4 in reply to: ↑ 3 Changed 3 years ago by Daryl@…

Replying to jeremyhu@…:

Actually, I think that this is GLX / X_GLrop_MatrixMode

You should break on glMatrixMode in your code to see what is happening there...

The code is within the PLIB/SSG library. I can try and see what its doing (as it is open-source), but as it is a third-party library and not my code that appears to be trigger these errors I'm not sure what I can do.

Any idea why it works perfectly well when run directly on the Linux system, but generates these errors when run remotely via XQuartz?

comment:5 follow-up: ↓ 6 Changed 3 years ago by jeremyhu@…

You can break on glMatrixMode and see how it is being called.

How are you setting up your connection from your linux box? Are you using 'ssh -Y' ? If not, you should be...

comment:6 in reply to: ↑ 5 Changed 3 years ago by Daryl@…

Replying to jeremyhu@…:

You can break on glMatrixMode and see how it is being called.

How are you setting up your connection from your linux box? Are you using 'ssh -Y' ? If not, you should be...

My bash command alias that I use to connect to this system is: ssh-agent ssh -f -A -C -Y daryl@${IP_CPPC} "unset LIBGL_ALWAYS_INDIRECT; /usr/bin/gnome-panel" &'.

comment:7 follow-up: ↓ 8 Changed 3 years ago by jeremyhu@…

Well we aren't doing anything special for glMatrixMode, so this is really in your court. Please figure out what is going on here... or try creating a reduced test case. You know the error is in glMatrixMode, so start there.

comment:8 in reply to: ↑ 7 Changed 3 years ago by Daryl@…

Replying to jeremyhu@…:

Well we aren't doing anything special for glMatrixMode, so this is really in your court. Please figure out what is going on here... or try creating a reduced test case. You know the error is in glMatrixMode, so start there.

I'm definitely going to try and figure this out, especially as it may reflect a bug in my code or in a library my code is calling! I won't be able to work on this project again until Wednesday afternoon, but I'll try and get time to look into this then.

comment:9 Changed 3 years ago by Daryl@…

Please excuse me if I seem ignorant, but this is the first time I've seen these sorts of errors.

Do the major and minor opcodes represent the same OpenGL/GLX commands/extensions across all systems, or are they specific to a particular OS, OpenGL implementation, video card, or OpenGL driver?

Is there a way to get a listing of all of these major and minor opcodes and what they represent (web site, command, etc.), or does this need to be done via code (using calls to XQueryExtension(), XListExtensions(), etc.)?

comment:10 follow-up: ↓ 12 Changed 3 years ago by jeremyhu@…

The minor opcode will be the same across all systems for the same operation, but the major opcode will be different as that is assigned at runtime by the server.

Unfortunately there isn't an easy way to figure it out currently: http://lists.x.org/archives/xorg-devel/2010-March/006386.html

comment:11 Changed 3 years ago by Daryl@…

Also, the Minor opcode is always either 179 or 181, not always 179 as originally stated.

comment:12 in reply to: ↑ 10 Changed 3 years ago by Daryl@…

Replying to jeremyhu@…:

The minor opcode will be the same across all systems for the same operation, but the major opcode will be different as that is assigned at runtime by the server.

Unfortunately there isn't an easy way to figure it out currently: http://lists.x.org/archives/xorg-devel/2010-March/006386.html

Is $(datadir) as mentioned in that article on my Mac or on the remote Linux system? If on the Mac, do you know what path is represented by $(datadir)?

comment:13 Changed 3 years ago by jeremyhu@…

181 is glMultMatrixd

$datadir is wrt libX11 (on your linux machine)

datadir is likely /usr/X11/share or /usr/share

comment:14 Changed 3 years ago by Daryl@…

I found the Minor opcodes in glxproto.h.

comment:15 Changed 3 years ago by jeremyhu@…

  • Version changed from dev (xorg-server-1.7-apple) to 2.5.0 (xserver-1.7)
  • Component changed from quartz-wm to GLX

comment:16 Changed 3 years ago by jeremyhu@…

  • Milestone changed from OpenGL.framework DRI to later

comment:17 Changed 3 years ago by jeremyhu@…

  • Summary changed from Running Complex OpenGL Qt3 app from Linux via XQuartz Generates MANY "X Error: BadRequest" Errors to AIGLX: Running Complex OpenGL Qt3 app from Linux via XQuartz Generates MANY "X Error: BadRequest" Errors

comment:18 Changed 22 months ago by jeremyhu@…

  • Status changed from assigned to closed
  • Resolution set to fixed
  • Milestone changed from later to 2.6.3

I believe this is fixed in 2.6.3. Closing, but please test to verify.

Note: See TracTickets for help on using tickets.