Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#2446 closed defect (fixed)

Camera stereo → glDrawBuffer: invalid operation

Reported by: satyshur@… Owned by: Tom Goddard
Priority: normal Milestone:
Component: Graphics Version:
Keywords: Cc:
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

The following bug report has been submitted:
Platform:        Linux-3.10.0-1062.1.1.el7.x86_64-x86_64-with-redhat-7.7-Maipo
ChimeraX Version: 0.91 (2019-09-26)
Description
Same error as before but I said

graphics restart

the screen is white with nothing on it except 'dead' windows. Probably the Z buffer?

Log:
Startup Messages  
---  
warnings | 'clip' is a prefix of an existing command 'clipper'  
'rota' is a prefix of an existing command 'rotamers'  
  
UCSF ChimeraX version: 0.91 (2019-09-26)  
© 2016-2019 Regents of the University of California. All rights reserved.  
How to cite UCSF ChimeraX  

> open 6d52 structureFactors true

Summary of feedback from opening 6d52 fetched from pdb  
---  
warnings | Atom H1 is not in the residue template for GLU #1 in chain B  
Atom H1 is not in the residue template for GLU #1 in chain D  
Atom H1 is not in the residue template for GLU #1 in chain C  
Atom H1 is not in the residue template for GLU #1 in chain A  
notes | Resolution: 1.4280533552397077  
Reflection data provided as intensities. Performing French & Wilson scaling to
convert to amplitudes...  
  
6d52 title:  
Superoxide dismutase SodCI of Salmonella enterica serovar Typhimurium at 1.6
Angstrom resolution [more info...]  
  
Chain information for 6d52  
---  
Chain | Description  
1.3/A 1.3/B 1.3/C 1.3/D | Superoxide dismutase [Cu-Zn] 1  
  
Non-standard residues in 6d52 #1.3  
---  
CU — copper (II) ion  
ZN — zinc ion  
  
6d52 mmCIF Assemblies  
---  
1| author_and_software_defined_assembly  
2| author_and_software_defined_assembly  
  
  

> set bgColor white

> hide #!1.2 models

> hide #!1.3 models

> show #!1.3 models

> ui mousemode rightMode clip

> ui mousemode rightMode "clip rotate"

> camera stereo

> camera mono

> camera stereo

An error occurred in drawing the scene. Redrawing graphics is now stopped to
avoid a continuous stream of error messages. To restart graphics use the
command "graphics restart" after changing the settings that caused the error.  
  
Traceback (most recent call last):  
File "/opt/UCSF/ChimeraX-daily/lib/python3.7/site-
packages/chimerax/core/updateloop.py", line 73, in draw_new_frame  
view.draw(check_for_changes = False)  
File "/opt/UCSF/ChimeraX-daily/lib/python3.7/site-
packages/chimerax/core/graphics/view.py", line 166, in draw  
self._draw_scene(camera, drawings)  
File "/opt/UCSF/ChimeraX-daily/lib/python3.7/site-
packages/chimerax/core/graphics/view.py", line 205, in _draw_scene  
camera.set_render_target(vnum, r)  
File "/opt/UCSF/ChimeraX-daily/lib/python3.7/site-
packages/chimerax/core/graphics/camera.py", line 422, in set_render_target  
render.set_stereo_buffer(view_num)  
File "/opt/UCSF/ChimeraX-daily/lib/python3.7/site-
packages/chimerax/core/graphics/opengl.py", line 1171, in set_stereo_buffer  
GL.glDrawBuffer(b)  
File "src/errorchecker.pyx", line 53, in
OpenGL_accelerate.errorchecker._ErrorChecker.glCheckError  
OpenGL.error.GLError: GLError(  
err = 1282,  
description = b'invalid operation',  
baseOperation = glDrawBuffer,  
cArguments = (GL_BACK_RIGHT,)  
)  
  

Expected a keyword  

Expected a keyword  

> graphics restart

An error occurred in drawing the scene. Redrawing graphics is now stopped to
avoid a continuous stream of error messages. To restart graphics use the
command "graphics restart" after changing the settings that caused the error.  
  
Traceback (most recent call last):  
File "/opt/UCSF/ChimeraX-daily/lib/python3.7/site-
packages/chimerax/core/updateloop.py", line 73, in draw_new_frame  
view.draw(check_for_changes = False)  
File "/opt/UCSF/ChimeraX-daily/lib/python3.7/site-
packages/chimerax/core/graphics/view.py", line 166, in draw  
self._draw_scene(camera, drawings)  
File "/opt/UCSF/ChimeraX-daily/lib/python3.7/site-
packages/chimerax/core/graphics/view.py", line 205, in _draw_scene  
camera.set_render_target(vnum, r)  
File "/opt/UCSF/ChimeraX-daily/lib/python3.7/site-
packages/chimerax/core/graphics/camera.py", line 422, in set_render_target  
render.set_stereo_buffer(view_num)  
File "/opt/UCSF/ChimeraX-daily/lib/python3.7/site-
packages/chimerax/core/graphics/opengl.py", line 1171, in set_stereo_buffer  
GL.glDrawBuffer(b)  
File "src/errorchecker.pyx", line 53, in
OpenGL_accelerate.errorchecker._ErrorChecker.glCheckError  
OpenGL.error.GLError: GLError(  
err = 1282,  
description = b'invalid operation',  
baseOperation = glDrawBuffer,  
cArguments = (GL_BACK_RIGHT,)  
)  
  




OpenGL version: 3.3.0 NVIDIA 340.107
OpenGL renderer: Quadro FX 4800/PCIe/SSE2
OpenGL vendor: NVIDIA Corporation

Attachments (3)

P5000-Nvidia-newegg.png (256.5 KB ) - added by kenneth.satyshur@… 6 years ago.
Added by email2trac
3D-setero-glasses-nvidia.png (244.1 KB ) - added by kenneth.satyshur@… 6 years ago.
Added by email2trac
Acer-GN246HL-3D-monitor.png (525.3 KB ) - added by kenneth.satyshur@… 6 years ago.
Added by email2trac

Download all attachments as: .zip

Change History (18)

comment:1 by pett, 6 years ago

Component: UnassignedGraphics
Owner: set to Tom Goddard
Platform: all
Project: ChimeraX
Status: newassigned
Summary: ChimeraX bug report submissionCamera stereo → glDrawBuffer: invalid operation

comment:2 by Tom Goddard, 6 years ago

Thanks for testing this with the ChimeraX daily build.

I tested ChimeraX "camera stereo" just now on a machine that does not support stereo (iMac) and it gave an error message "Could not switch graphics mode. Graphics driver did not create OpenGL context." And I tested on machine that does support stereo (Quadro P6000 graphics and Windows 10) where stereo worked correctly.

So the mystery is why your Quadro FX 4800 and Linux (Redhat 7.7) system does not work. I don't have a Linux system to test stereo on. My theory is this is a problem with your Linux graphics driver or the Qt window toolkit. ChimeraX asks for and OpenGL stereo context from Qt and it is given a new context with no errors, but it really isn't an stereo context. So as soon as ChimeraX tries to render with it to the back right buffer (which is invalid for a non-stereo context) it throws an error. So I think the basic problem is that ChimeraX is not given a stereo context, and the secondary problem is that Qt / Linux + Quadro driver is not reporting that it failed to get a stereo context.

Can you run other stereo programs on this machine? Which programs? Can you run Chimera (not ChimeraX) in stereo on this machine?

Also what kind of stereo glasses and emitter are you using? You know Nvidia discontinued support for its 3DVision system and no drivers after April 2019 support that.

comment:3 by Tom Goddard, 6 years ago

Ticket #2238 reported the same problem moths ago but it does not say whether that was Windows or Linux. The reporter for that ticket did not say whether the got it to work after I made some ChimeraX stereo fixes.

comment:4 by Tom Goddard, 6 years ago

I see you also reported this same problem in May 2018 and said in that ticket #1133 that stereo in PyMol is working on this computer. One difference that could cause ChimeraX to fail to get a stereo context is that ChimeraX uses modern OpenGL requiring an OpenGL Core context. Very likely PyMol and certainly Chimera require an OpenGL legacy context (core contexts did not exist when those programs were developed). It may be that on your very old graphics (Quadro FX 4800 came out November 2008, almost 11 years ago), the driver cannot provide a stereo core context.

in reply to:  5 ; comment:5 by kenneth.satyshur@…, 6 years ago

Yes stereo 3D works fine on our P5000 RHEL7.7 teaching machine. In fact, all other programs work fine in setereo.
Coot
pymol
vmd
even chimera old runs stereo correctly.
It is not a problem to get into stereo in ChimeraX, it's the switch from mono to stereo to mono to stereo. The second switch gives the graphics freeze. Even 'graphics restart' will cause the freeze. Since 3D stereo in and out works for chimera old, why does it hang for ChimeraX? Same code? So I do not believe it is a hardware problem.

Having worked with 3D stereo for many years, 3D was always an option in modeling programs like Sybyl and Maestro. Then pymol came along and greatly helped us teach structure with the aid of a 3D amphitheatre like the one we have now (think Avitar). Unfortunately the 3D component has gotten more and more broken. We were able to do 'stereo in a window' easily in the past. Start pymol in terminal and switch to stereo. Only pymol would be in stereo and the emitter would turn on only for pymol. Change to a different desktop and emitter goes off. But this is now broken in the new Gnome desktop, which does not support 'composite disable' in the xorg.conf. Instead, Gnome desktop stereo in really 'stereo in the desktop' and was briefly broken in V 7.3 of RedHat.  They fixed it in later versions. The result in Gnome is a constant flashing of the entire desktop in and out of single/dual display. Not useful and very annoying. I have e-mailed several commercial software providers about the problem as well as developers, but it's just not important to them.

All 6 of my stereo systems run the Mate desktop with RHEL7.7 which supports 'composite disable' and 3D in window. However, there are tricks to getting this to work. RedHat has dropped support for 'Mate' desktop. This is what I am running ChimeraX on, as well as old chimera. Old works fine, X does not. I will try to test more desktop configs to see if it makes a difference in ChimeraX.

I will also test it in Win10. Since this is the 'gamers' OS, I expect Microsoft is eager to make this work.

I cannot teach and do drug design without 3D stereo. It has been a struggle to keep a working 3D system going. Without 3D stereo I simply cannot support or use ChimeraX. I know you are going in the VR direction. But i assume this will all be Win10? Without modelling programs that fit molecules to density, CryoEM does not work. Even MD needs a good 3D visual display system, one that we can use in our 3D 'cave' in the Wisconsin Institutes for Discovery.

I suspect it's X11 that is on the way out?
kas



Kenneth A. Satyshur, M.S., Ph.D.

Senior Scientist,

Depts. Bacteriology, Bio Molecular Chemistry,

Neuroscience, Oncology, Carbone Cancer Center,

and the School of Pharmacy

University of Wisconsin-Madison

Madison, Wisconsin, 53706

608-215-5207

________________________________
From: ChimeraX <ChimeraX-bugs-admin@cgl.ucsf.edu>
Sent: Thursday, September 26, 2019 1:26 PM
Cc: goddard@cgl.ucsf.edu <goddard@cgl.ucsf.edu>; Kenneth Satyshur <kenneth.satyshur@wisc.edu>
Subject: Re: [ChimeraX] #2446: Camera stereo → glDrawBuffer: invalid operation

#2446: Camera stereo → glDrawBuffer: invalid operation
---------------------------------+-------------------------
          Reporter:  satyshur@…  |      Owner:  Tom Goddard
              Type:  defect      |     Status:  assigned
          Priority:  normal      |  Milestone:
         Component:  Graphics    |    Version:
        Resolution:              |   Keywords:
        Blocked By:              |   Blocking:
Notify when closed:              |   Platform:  all
           Project:  ChimeraX    |
---------------------------------+-------------------------

Comment (by Tom Goddard):

 Thanks for testing this with the ChimeraX daily build.

 I tested ChimeraX "camera stereo" just now on a machine that does not
 support stereo (iMac) and it gave an error message "Could not switch
 graphics mode. Graphics driver did not create OpenGL context."  And I
 tested on machine that does support stereo (Quadro P6000 graphics and
 Windows 10) where stereo worked correctly.

 So the mystery is why your Quadro FX 4800 and Linux (Redhat 7.7) system
 does not work.  I don't have a Linux system to test stereo on.  My theory
 is this is a problem with your Linux graphics driver or the Qt window
 toolkit.  ChimeraX asks for and OpenGL stereo context from Qt and it is
 given a new context with no errors, but it really isn't an stereo context.
 So as soon as ChimeraX tries to render with it to the back right buffer
 (which is invalid for a non-stereo context) it throws an error.  So I
 think the basic problem is that ChimeraX is not given a stereo context,
 and the secondary problem is that Qt / Linux + Quadro driver is not
 reporting that it failed to get a stereo context.

 Can you run other stereo programs on this machine?  Which programs?  Can
 you run Chimera (not ChimeraX) in stereo on this machine?

 Also what kind of stereo glasses and emitter are you using?  You know
 Nvidia discontinued support for its 3DVision system and no drivers after
 April 2019 support that.

--
Ticket URL: <https://plato.cgl.ucsf.edu/trac/ChimeraX/ticket/2446#comment:2>
ChimeraX <http://www.rbvi.ucsf.edu/chimerax/>
ChimeraX Issue Tracker

comment:6 by Tom Goddard, 6 years ago

Hi Ken,

Ok, I did not understand before that ChimeraX is working in stereo for you when you first enable stereo. Then when you switch back to mono and then switch again into stereo it fails. Do I understand this right -- ChimeraX stereo does work the first time you enable it?

I've studied the stereo enabling code to see why switching to stereo the second time would be different then the first time. I see a possible reason -- the code sets the format of the window that is to show graphics the first time but not the second time. I don't think this is likely to be the problem. ChimeraX stereo works correctly on Windows switching back and forth between mono and stereo. Our stereo code is all in Python and exactly the same on Linux and Windows. None of our OpenGL graphics is different on Linux versus Windows so your error has something to do with Linux, either the windowing system or behavior of OpenGL drivers or the Qt window toolkit which actually gets the OpenGL mono and stereo contexts. ChimeraX has completely different graphics than Chimera.

Probably your stereo error would be pretty easy to fix except that I do not have a stereo Linux system so I have no way to debug what is different about stereo on Linux versus Windows. About 4 years ago we had a Linux stereo setup and I believe ChimeraX stereo worked correctly on it. But the graphics code has been changed a lot since then.

Your error message is very clear that after you enabled stereo the second time, OpenGL still thinks it is mono.

Do you show the ChimeraX Side View panel? If so you should try without showing Side View since that could be related to the problem.

Does it make a difference if you start chimerax with the --stereo option or without it?

Tom

comment:7 by Tom Goddard, 6 years ago

Does your Quadro P5000 stereo system give the same error?

comment:8 by Tom Goddard, 6 years ago

One possible fix I can try is I can make ChimeraX recreate the stereo OpenGL context each time you switch to stereo. Currently the way it works is that the first time you switch into stereo it creates the stereo context. Then if you switch to mono and back to stereo it simply reuses the stereo context made the first time. But since that is failing, it may fix things if instead when you switch out of stereo we destroy the stereo context, and if you switch back into stereo we recreate it. I think that is likely to work.

comment:9 by Tom Goddard, 6 years ago

Same error on second "camera stereo" command with Quadro P5000 and latest Nvidia driver reported in ticket #2449.

comment:10 by Tom Goddard, 6 years ago

I've put in a possible fix for this problem, but I have no Linux stereo system to test on. So please test tomorrow's daily build or later version and let me know if it fixes the problem.

The change I made was when switching to mono camera on Linux it will now delete the stereo OpenGL context, so when switching back to stereo it will create a new OpenGL context. Since stereo seems to work the first time on Linux, recreating the stereo context each time should make it behave like every switch into stereo is the first time. Hard to say whether this will work since I don't know the nature of the bug.

in reply to:  11 ; comment:11 by kenneth.satyshur@…, 6 years ago

Horray. That is the fix.   I can now go back and forth between 'camera stereo' and 'camera mono' without it freezing on a second attempt to go to stereo. Now I can use it in teaching. Great graphics in the program and will impress even the Dean when they come by for a visit. Thanks.

kas



Kenneth A. Satyshur, M.S., Ph.D.

Senior Scientist,

Depts. Bacteriology, Bio Molecular Chemistry,

Neuroscience, Oncology, Carbone Cancer Center,

and the School of Pharmacy

University of Wisconsin-Madison

Madison, Wisconsin, 53706

608-215-5207

________________________________
From: ChimeraX <ChimeraX-bugs-admin@cgl.ucsf.edu>
Sent: Monday, September 30, 2019 2:13 PM
Cc: goddard@cgl.ucsf.edu <goddard@cgl.ucsf.edu>; Kenneth Satyshur <kenneth.satyshur@wisc.edu>
Subject: Re: [ChimeraX] #2446: Camera stereo → glDrawBuffer: invalid operation

#2446: Camera stereo → glDrawBuffer: invalid operation
---------------------------------+-------------------------
          Reporter:  satyshur@…  |      Owner:  Tom Goddard
              Type:  defect      |     Status:  assigned
          Priority:  normal      |  Milestone:
         Component:  Graphics    |    Version:
        Resolution:              |   Keywords:
        Blocked By:              |   Blocking:
Notify when closed:              |   Platform:  all
           Project:  ChimeraX    |
---------------------------------+-------------------------

Comment (by Tom Goddard):

 I've put in a possible fix for this problem, but I have no Linux stereo
 system to test on.  So please test tomorrow's daily build or later version
 and let me know if it fixes the problem.

 The change I made was when switching to mono camera on Linux it will now
 delete the stereo OpenGL context, so when switching back to stereo it will
 create a new OpenGL context.  Since stereo seems to work the first time on
 Linux, recreating the stereo context each time should make it behave like
 every switch into stereo is the first time.  Hard to say whether this will
 work since I don't know the nature of the bug.

--
Ticket URL: <https://plato.cgl.ucsf.edu/trac/ChimeraX/ticket/2446#comment:10>
ChimeraX <http://www.rbvi.ucsf.edu/chimerax/>
ChimeraX Issue Tracker

comment:12 by Tom Goddard, 6 years ago

I'm glad ChimeraX stereo is fixed on Linux.

You say you have 6 stereo systems. Could you tell me what kind of glasses and emitter and displays/projectors you are using? Are they all LCD shutter glasses or are some polarized glassed? We get asked for stereo hardware recommendations sometimes. Also we are trying to buy a new stereo projector system but it is a rare item.

comment:13 by Tom Goddard, 6 years ago

Resolution: fixed
Status: assignedclosed

in reply to:  14 ; comment:14 by kenneth.satyshur@…, 6 years ago

3D glasses are Nvidia 3D stereo glasses and emitter. On win10, just plug USB into computer and windows sends the stereo signal to the emitter to turn it on and off. Shuttering glasses are about 200$. Kit is $300 with emitter. In linux, need a quadro card with the extra sync port that goes on the backplane. Our Monitor is an Acer GN246HL 3D ready, and the teaching room uses a E-Vision Laser 8500 WUXGA projector and a silvered screen. the sync signal is sent from the Linux RHEL7.7/Quadro P5000 video card to the projector and students wear shuttering glasses to view the screen. Needs at least a 120 Hx LCD monitor that is 3D ready.

We use Coot to fit protein structures in 3D to electron density. Pymol for teaching. Maestro will also work in stereo.

I realize that Nvidia support for 3D is going away. Such is the 'progress' of technology. Now the gamers are doing VR. However, VR is not suitable for fitting density. One has to be able to manipulate individual atoms with the mouse. I have seen this change over time, since the 90's. I guess we will just be out of luck. Need to stock up on legacy systems before they are obsolete.

kas



Kenneth A. Satyshur, M.S., Ph.D.

Senior Scientist,

Depts. Bacteriology, Bio Molecular Chemistry,

Neuroscience, Oncology, Carbone Cancer Center,

and the School of Pharmacy

University of Wisconsin-Madison

Madison, Wisconsin, 53706

608-215-5207

________________________________
From: ChimeraX <ChimeraX-bugs-admin@cgl.ucsf.edu>
Sent: Tuesday, October 1, 2019 11:41 AM
Cc: goddard@cgl.ucsf.edu <goddard@cgl.ucsf.edu>; Kenneth Satyshur <kenneth.satyshur@wisc.edu>
Subject: Re: [ChimeraX] #2446: Camera stereo → glDrawBuffer: invalid operation

#2446: Camera stereo → glDrawBuffer: invalid operation
---------------------------------+-------------------------
          Reporter:  satyshur@…  |      Owner:  Tom Goddard
              Type:  defect      |     Status:  assigned
          Priority:  normal      |  Milestone:
         Component:  Graphics    |    Version:
        Resolution:              |   Keywords:
        Blocked By:              |   Blocking:
Notify when closed:              |   Platform:  all
           Project:  ChimeraX    |
---------------------------------+-------------------------

Comment (by Tom Goddard):

 I'm glad ChimeraX stereo is fixed on Linux.

 You say you have 6 stereo systems.  Could you tell me what kind of glasses
 and emitter and displays/projectors you are using?  Are they all LCD
 shutter glasses or are some polarized glassed?  We get asked for stereo
 hardware recommendations sometimes.  Also we are trying to buy a new
 stereo projector system but it is a rare item.

--
Ticket URL: <https://plato.cgl.ucsf.edu/trac/ChimeraX/ticket/2446#comment:12>
ChimeraX <http://www.rbvi.ucsf.edu/chimerax/>
ChimeraX Issue Tracker

P5000-Nvidia-newegg.png

3D-setero-glasses-nvidia.png

Acer-GN246HL-3D-monitor.png

by kenneth.satyshur@…, 6 years ago

Attachment: P5000-Nvidia-newegg.png added

Added by email2trac

by kenneth.satyshur@…, 6 years ago

Added by email2trac

by kenneth.satyshur@…, 6 years ago

Attachment: Acer-GN246HL-3D-monitor.png added

Added by email2trac

in reply to:  18 comment:15 by goddard@…, 6 years ago

Thanks for the info.  I guess you are using old nvidia drivers with the Windows 10 USB 3D Vision system since Nvidia drivers after April 2019 don't support that anymore -- won't give the USB sync signal I guess.  We have a 3D Vision machine with Samsung monitor, and a Christie Mirage S4 projector with about 10 pairs of RealD CE4 and CE4S lcd shutter glasses.  I think VR will be better at building and refining models in density, but the software is not able to do it yet.  I will try to make ChimeraX able to do that.  The hand controllers give 6-degree of freedom for positioning and moving and is more natural than a mouse.  But the headsets are bulky and inconvenient.  I would really love to try lcd glasses stereo with one of those ultra-wide curved gaming monitors.

Note: See TracTickets for help on using tickets.