Opened 6 years ago

Closed 6 years ago

#2238 closed defect (can't reproduce)

Error starting chimerax --stereo

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

Description

From: "Hartmuth, Klaus"
Subject: Re: #2232: set_stereo_buffer: glDrawBuffer: invalid operation
Date: July 18, 2019 at 8:04:23 AM PDT
To: "goddard@…" <goddard@…>

Dear Tom Goddard,

I was very rushing this morning after having discovered that the chains I am working with were included in the logfile. So I ask you to please remove the bug report completely as soon as possible.

In the meantime, I reconstructed the reason why I got into the problems:

  1. the first sequence of commands:

1 chimerax& or chimerax-daily&
2 open 1rna
3 tools > General > SideView
4 camera stereo

.. and what happens is that the SideView panel is gone and cannot be recovered

  1. to investigate, I then tried:

1 chimerax --stereo& or chimerax-daily --stereo&
2 open 1rna

.. and the error comes up

I hope this helps and that deletion of the bug report is imminent.

Best regards
Klaus Hartmuth

Change History (4)

comment:1 by Tom Goddard, 6 years ago

Here is the traceback Klaus observed.

UCSF ChimeraX version: 0.91 (2019-07-16)
© 2016-2019 Regents of the University of California. All rights reserved.
How to cite UCSF ChimeraX

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 "/usr/lib/ucsf-chimerax-daily/lib/python3.7/site-
packages/chimerax/core/updateloop.py", line 72, in draw_new_frame
view.draw(check_for_changes = False)
File "/usr/lib/ucsf-chimerax-daily/lib/python3.7/site-
packages/chimerax/core/graphics/view.py", line 164, in draw
self._draw_scene(camera, drawings)
File "/usr/lib/ucsf-chimerax-daily/lib/python3.7/site-
packages/chimerax/core/graphics/view.py", line 198, in _draw_scene
camera.set_render_target(vnum, r)
File "/usr/lib/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 "/usr/lib/ucsf-chimerax-daily/lib/python3.7/site-
packages/chimerax/core/graphics/opengl.py", line 1158, 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 390.30
OpenGL renderer: Quadro 2000D/PCIe/SSE2
OpenGL vendor: NVIDIA Corporation

comment:2 by Tom Goddard, 6 years ago

The "camera stereo" command closes side view because side view is not able to handle the switch to an OpenGL stereo graphics context. I've added code so "camera stereo" will close side view and then restart it.

I was not able to reproduce the error starting "chimerax-daily --stereo" and "open 1rna" on a Windows machine with Quadro P6000 graphics -- it worked as expected. Are you able to reproduce this error? It appears it was not able to get a stereo OpenGL graphics context. When I start with --stereo on a Mac that cannot do stereo it gives an error message saying stereo is unavailable and it then works correctly, although ChimeraX reports it is in stereo camera mode which is a bug -- it should start in mono mode if getting the opengl context failed. That may be the cause of your error, and Mac OpenGL may just allow calls that try to use stereo buffers even without a stereo context. I'll make ChimeraX start in mono camera if --stereo specified by stereo was not available.

comment:3 by Tom Goddard, 6 years ago

Closer examination of the ChimeraX code shows that if it fails to get a stereo OpenGL context when --stereo is used on the command-line then rendering is blocked, so the reported error would not occur. So apparently ChimeraX believed it got a stereo OpenGL context but then when it tried to use it (setting a stereo buffer) it gave an error. I don't have an idea what could cause this problem and don't have a Linux stereo system to debug it on. ChimeraX has Qt make a QOpenGLContext and then checks that it is stereo capable. The bug could be that Qt is reporting the context is stereo capable but it didn't really query OpenGL to determine this (instead just assumes it since it asked for stereo when creating the context). The error appears to be that we got a non-stereo opengl context when we asked for a stereo context.

comment:4 by Tom Goddard, 6 years ago

Resolution: can't reproduce
Status: assignedclosed

Can't reproduce this. It could be a graphics driver problem. You are using an old graphics driver (nvidia 390.30) from February 2018. Updating it may fix the problem.

Note: See TracTickets for help on using tickets.