Opened 7 years ago

Closed 7 years ago

#1169 closed defect (fixed)

'new frame' trigger should still fire when no models open

Reported by: Tristan Croll Owned by: Tom Goddard
Priority: moderate Milestone:
Component: Graphics Version:
Keywords: Cc: pett
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

At the moment, unless I'm missing something there is no session trigger that fires regularly when ChimeraX is in its default start-up display state. That's a problem for (e.g.) the remote_control plugin, where what you really want to do is launch ChimeraX and start the xmlrpc server from the shell, then start sending commands. But since the server's process_requests() method is run on the 'new frame' trigger this doesn't work, and the client just hangs waiting for the request to be processed.

My workaround for now is to have ChimerxXMLRPCServer create a simple sphere model on creation to get the graphics up and running, but it would be nice to have a more elegant way. Having the 'new frame' (or some new named trigger) fire once on every pass through the event loop would seem like a sensible solution.

Change History (4)

comment:1 by Tom Goddard, 7 years ago

Owner: changed from Tom Goddard to pett

New frame triggers are supposed to be called when ChimeraX starts but "rapid access", ie the thumbnails of previously opened files is blocking all updates when ChimeraX starts. I'm not sure why it is doing that. Eric wrote that code.

comment:2 by Tom Goddard, 7 years ago

Problem is in ui/gui.py in _set_rapid_access_shown().

comment:3 by pett, 7 years ago

Cc: pett added
Owner: changed from pett to Tom Goddard

Unless that trigger is blocked, the never-been-shown OpenGL main window generates errors (given below). T.G. believes that the trigger should not be blocked and instead the OpenGL code should be improved to not generate errors in this situation, therefore reassigning to him.

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 "/Users/pett/src/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/chimerax/core/updateloop.py", line 61, in draw_new_frame
view.draw(check_for_changes = False)
File "/Users/pett/src/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/chimerax/core/graphics/view.py", line 159, in draw
self._draw_scene(camera, drawings)
File "/Users/pett/src/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/chimerax/core/graphics/view.py", line 186, in _draw_scene
r.draw_background()
File "/Users/pett/src/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/chimerax/core/graphics/opengl.py", line 984, in draw_background
GL.glClear(flags)
File "/Users/pett/src/chimerax/ChimeraX.app/Contents/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/PyOpenGL-3.1.0-py3.6.egg/OpenGL/platform/baseplatform.py", line 402, in call
return self( *args, named )
File "errorchecker.pyx", line 53, in OpenGL_accelerate.errorchecker._ErrorChecker.glCheckError (src/errorchecker.c:1218)
OpenGL.error.GLError: GLError(
err = 1286,
description = b'invalid framebuffer operation',
baseOperation = glClear,
cArguments = (16640,)

comment:4 by Tom Goddard, 7 years ago

Resolution: fixed
Status: assignedclosed

Fixed.

"new frame" trigger now called as soon as ChimeraX starts even when no models are opened.

Made rapid access not block updates, and made graphics not attempt OpenGL drawing until its window has been created by Qt.

Note: See TracTickets for help on using tickets.