Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wx event loop broken (1.5.0rc1) #5093

Closed
mdehoon opened this issue Sep 17, 2015 · 6 comments
Closed

wx event loop broken (1.5.0rc1) #5093

mdehoon opened this issue Sep 17, 2015 · 6 comments

Comments

@mdehoon
Copy link
Contributor

mdehoon commented Sep 17, 2015

On Max OS X:

>>> import matplotlib
>>> matplotlib.use("wx")
>>> from pylab import *
>>> figure()

causes the beachball to appear, with the figure unresponsive to mouse clicks.
Continuing with

>>> plot([1,2,3])

does not draw the line (in interactive mode).

@tacaswell tacaswell added this to the next point release (1.5.0) milestone Sep 17, 2015
@tacaswell tacaswell added the Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. label Sep 17, 2015
@tacaswell
Copy link
Member

My guess is that it's draw_idle does not work properly. Does it behave better in IPython?

@newville
Copy link
Contributor

might need https://github.com/minrk/appnope? I've seen terminal event loops hang (on OS X) with wx event loops, and disabling the "App Nap" behavior with this module fixes it.

@tacaswell
Copy link
Member

I can confirm this on linux as well.

Something is not going right with the registration of the PyOS_inputhook. If you call plt.pause(30) (which runs the gui mainloop for 30s) then the figure is interactive.

It is interactive (with wxagg) in IPython if we let it set up the inputhook.

Somewhat worse, closing the figure results in a segfault.

@tacaswell
Copy link
Member

I can also reproduce these issues with 1.4.3 and 1.3.1 which makes me suspect that the issue is in wx, not in mpl.

@tacaswell tacaswell added GUI: wx and removed Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. labels Sep 24, 2015
@tacaswell
Copy link
Member

@RobinD42 sorry to bother you but something is clearly going very wrong here and it it outside of my knowledge to debug.

@tacaswell tacaswell modified the milestones: next point release (1.5.0), next bug fix release (2.0.1) Oct 29, 2015
@tacaswell
Copy link
Member

The segfault is probably a separate issue that only happens when I use ctrl-w to close the window, using plt.close('all') works fine as does forcible closing the window from the window manager.

The input hook not being registered by mpl has been policy for a while, if you you want to use wx + interactive mode, you must use IPython or manage the input hook your self.

Closing as wontfix, will make a new issue for the segfault.

@QuLogic QuLogic modified the milestones: unassigned, 2.0.1 (next bug fix release) Jul 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants