How to properly close a canvas/app/window?

166 views
Skip to first unread message

Thomas

unread,
Mar 17, 2015, 1:37:55 PM3/17/15
to vi...@googlegroups.com
Hi,

I am quite new to vispy but have managed to render a couple of meshes using gloo and the examples provided on the homepage.

I have run into the following problem: When I close a window/canvas, the python interpreter starts to lag/stutter. I sometimes can't even exit it properly. 

A minimal working example can be constructed by replacing line 164 of the file examples/basics/gloo/rotate_cube.py with "def render():". I basically open the python interpreter, import rotate_cube, call render() and then close the window. If I then type in a new command, it takes multiple seconds for the letters appear on screen.

Is there anything that I need to take care of when creating (and closing) windows like this?

I am using the latest version of vispy with PyQt 4.11.3 as a backend and Python 2.7.6 on OS X 10.10.2.

Thanks in advance,
Thomas

Cyrille Rossant

unread,
Mar 17, 2015, 2:03:52 PM3/17/15
to Vispy list
Hi,

Have you tried with IPython? In IPython you can enable the Qt GUI
event loop with "%gui qt" which should fix the problem.

Cyrille
> --
> You received this message because you are subscribed to the Google Groups
> "vispy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to vispy+un...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Eric Larson

unread,
Mar 17, 2015, 5:31:05 PM3/17/15
to vi...@googlegroups.com
Hmm... this might be caused by our "interactive mode" not quitting responsively enough when no windows are open. Feel free to open an issue on the GitHub page and we'll hopefully take a look at it soon.

Eric

Thomas

unread,
Mar 18, 2015, 7:52:53 AM3/18/15
to vi...@googlegroups.com
That worked, thanks!

@Eric I'll look into it.
Reply all
Reply to author
Forward
0 new messages