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

ipython console freezes for increasing no of seconds in %pylab mode #6189

Closed
michaelaye opened this issue Jul 22, 2014 · 11 comments
Closed

ipython console freezes for increasing no of seconds in %pylab mode #6189

michaelaye opened this issue Jul 22, 2014 · 11 comments
Milestone

Comments

@michaelaye
Copy link
Contributor

launching ipython just in console with ipython.
Am trying to reproduce bad editing (readline?) behavior now, looking at some functions, their help text etc. but it's all ok.
Then launching %pylab.
Typing in rubbish (like 'aoeuaoeaoeu') and can keep editing it without freezes.
But from the moment I type in a function name that exists, like dir() it even gets stuck before printing the (). From now on the cursor gets stuck every 5 seconds or so and keeps stuck for 2-3 seconds at a time, but that number is increasing.

Version abffd96
inside iTerm2 on Mac OSX.
Python 2.7.8 from conda

@michaelaye
Copy link
Contributor Author

Forgot to say, I'm driving Qt4Agg usually:

n [1]: %pylab
Using matplotlib backend: Qt4Agg
Populating the interactive namespace from numpy and matplotlib

Interestingly, going back to rel-2.1.0 does not solve this.

@michaelaye
Copy link
Contributor Author

I went back as far as 1.2 and it still happens in the terminal ipython.
Then went back to master, tried out ipython qtconsole and it's all fine there. I'm amazed I did not find this problem before, but I'm a heavy notebook user, so maybe that explains that. :)

@takluyver
Copy link
Member

We've had some issues with the Qt backend readline interacting before, though I can't find the issue number just at the moment.

@efiring
Copy link
Contributor

efiring commented Aug 15, 2014

This is a severe problem, and I have reproduced it with nothing more than

ipython
%gui qt

so it is not matplotlib-specific. To see it on Mavericks, with either Homebrew or Anaconda python 3.4.1 and PyQt4, just start a console as above, then go away and do something elsewhere for a few minutes. When you come back, chances are the session will be unusable because of delayed response to attempts to type or scroll through history. It's somewhat erratic, but qualitatively repeatable. In my case, testing is with a plain Apple terminal window (with focus follows mouse), not with ITerm2.

@efiring
Copy link
Contributor

efiring commented Aug 15, 2014

@takluyver, The earlier issue involving qt and readline is #481. Despite the issue title, it involved more than just XP. More than one distinct problem was discussed in that issue, but the primary one involved the input hook for qt.

@efiring
Copy link
Contributor

efiring commented Aug 15, 2014

A workaround is to use the qtconsole; at least in a little bit of testing, it seems to maintain full responsiveness.

efiring added a commit to efiring/ipython that referenced this issue Aug 16, 2014
…n#6189

On Mavericks, the qt and wx gui support was unusable from the
ipython console in a terminal.  Using nope() in enable_qt4 and
enable_wx, and reversing with nap() in disable_qt4 and disable_wx,
solves the problem.
@fperez
Copy link
Member

fperez commented Aug 16, 2014

Has anyone seen this problem on Linux?

@ellisonbg, @minrk, @jdfreder: you guys all have macs, can one of you shed any extra light on this?

It's been a while since we've heard of issues with our event loop integration, and I can't think of any changes in that code recently, but perhaps something subtle happened...

This sounds pretty serious.

@tacaswell
Copy link
Contributor

This is a long shot on being related, but matplotlib/matplotlib#3360.

@efiring
Copy link
Contributor

efiring commented Aug 16, 2014

Not related; the problem appears without matplotlib.
Not seen on Linux; it really is an app nap problem, solved very simply by #6321, I believe.

@minrk
Copy link
Member

minrk commented Aug 16, 2014

Thanks for tracking it down, I had forgotten about App Nap, and the fix we made in kernels, but not in terminal IPython.

@minrk minrk modified the milestones: 3.0, 2.3 Aug 17, 2014
minrk added a commit that referenced this issue Aug 17, 2014
Use appnope in qt and wx gui support from the terminal; closes #6189
minrk pushed a commit to minrk/ipython that referenced this issue Aug 17, 2014
…n#6189

On Mavericks, the qt and wx gui support was unusable from the
ipython console in a terminal.  Using nope() in enable_qt4 and
enable_wx, and reversing with nap() in disable_qt4 and disable_wx,
solves the problem.
@minrk minrk closed this as completed in dfa96e8 Aug 17, 2014
@fperez
Copy link
Member

fperez commented Aug 19, 2014

Great, glad this is also fixed in the terminal. Thanks!!

mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this issue Nov 3, 2014
…n#6189

On Mavericks, the qt and wx gui support was unusable from the
ipython console in a terminal.  Using nope() in enable_qt4 and
enable_wx, and reversing with nap() in disable_qt4 and disable_wx,
solves the problem.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants