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
MacOS Touchpad scrolling crashes IDLE #81572
Comments
IDLE crashes if the user scrolls with the Mac mousepad (using two fingers, either up or down).
System Info: MacOS Mojave 10.14.5 (18F132) Python: |
Also happens when I plug in a conventional mouse and use the mouse scrollwheel (so it's not just the touchpad scrolling!). |
FWIW, I can't reproduce the failure using either Python 3.7.3 from either the python.org binary installer or a current MacPorts 3.7.3. But that's not surprising as the issue is most likely in Tk rather than IDLE or Python itself. Can you supply the output from the following commands in a terminal session, assuming python3 is the same interpreter used to run IDLE? python3 -m test.pythoninfo |
For future reference: an exception is not a crash. A crash is a core dump or the Mac equivalent. Anyway, I also cannot reproduce with Python.org python on my Macbook. Does IDLE work at all? Can you click Help and About IDLE? If so, what is the tk version? I used the pad to move the cursor over the scrollbar slider, held my left finger down on the left side of the pad, and moved the slider and file display with my right finger. Is this what you did? From the traceback it appears that the exception occurred in the C code of _tkinter or more likely, the C code of tcl/tk, before any of IDLE's python-coded event handlers are called. Hence, Ned's comment. |
Hi George, What language and encoding are you using on your system? Are you using UTF-16? I haven't been able to reproduce this on my Mac Mojave with an Anaconda Python 3.7.3 install. |
Same behaviour experienced here on Mojave Kernel Version 18.6.0. Python 3.7.3 (default, Jun 19 2019, 07:38:49)
It seems to be compiled using Tcl 8.5 that is installed with the system.
|
Yes, and that is almost certainly the original poster's problem, as well. In fact, this same issue was reported in bpo-10731 in 2010. The Tcl/Tk 8.5 supplied by Apple in macOS is terribly out-of-date and dangerously buggy; it should never be used. You should even be seeing a warning message from IDLE when using that system Tcl/Tk. I'm not familiar with how Homebrew manages the Tcl/Tk that their Pythons link with but, if necessary, you should follow up with them to ensure that none of their recipes use the system Tcl/Tk. More details here: |
Thanks for the additional information Rakesh. |
Alright folks, sorry there's going to be a lot of pasted blocks of output, so just look for where I @ your name to address your questions. @ned.deily, here is the output of those info commands.
@ terry.reedy, sorry to mislabel as a crash. IDLE itself just sorta died, so I interpreted it as an IDLE crash even though it's just an exception in the actual Python interpreter. Oops!
STEPS TO REPRODUCE:
And now finally, back to @rakesh Singh and @ned.deily, I can try uninstalling and resintalling python with homebrew and if the problem persists, then is the issue on their end and their reliance on the default Apple TK? |
Checked against the python.org installation. In that installation's IDLE, About IDLE > Tk version 8.6.8. So my question is:
|
George, This is a Homebrew build issue (see additional notes on the Brew forum https://discourse.brew.sh/t/cannot-get-python-to-use-tcl-tk-version-8-6/3563. You may wish to try the suggestions found there. My recommendation would be to use the official Python from python.org or the Anaconda distribution for Mac. |
As @willingc notes, it is a Homebrew build issue that should be addressed by Homebrew. That said, it is also possible that Homebrew builds have been affected by changes in Mojave as mentioned in bpo-34956. I plan to look into that shortly to see if we can make building with a third-party Tk easier on macOS. |
In case anyone would like to weigh in on the Homebrew side, I've filed the homebrew issue here: Homebrew/homebrew-core#41338 . |
It seems that the current warning I would like to either 1. make it much more visible -- all caps or whatever -- stronger -- "is buggy, will eventually fail" -- and explicitly request "don't report problems if you continue"; or 2. require 8.5.15 or even 8.6.x and refuse to continue and exit. Does IDLE every run long enough with Apple's tk before failure to make continuing useful? Any comments here before I open a new issue? |
Yes, depending on what you are doing, IDLE *may* run just fine with the system Tk. But you may may run into this issue depending on how you scroll. Or, among the worst bugs, if you try to type in characters not directly available on the keyboard by using one of the available composition characters, like opt-u followed by a vowel to produced an "umlauted" vowel with the US keyboard layout, Tk will immediately crash taking IDLE with it and with no opportunity to save any work in progress. Many people will not run into those bugs but it can be very painful to those who do.
I don't think changing the message is going to make much of a difference. There isn't much an end user can do other to avoid the known behaviors that cause problems, install another version of Python (which may not be an option for many novice users), or not use IDLE. Back when we did not ship our own copy of Tcl/Tk with the python.org macOS installers, there *was* something else you might be able to do: install a more up-to-date third-party Tcl/Tk that would then be automatically used. But that's not longer an option nor is it needed. I think the best thing we can do is help make it easier for people building Python to not link with the broken system Python and improve the using Python on macOS documentation. I have issues opened for both of those. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: