Open tazzben opened 5 years ago
Can confirm the problem on a fresh macOS 10.14.6 with miniconda and tk=8.6.8. I want to add the the problem also occurred in the beta for macOS Catalina 10.15 that was released before 10.14.6 (beta 4, I think) but was then apparently resolved in the beta that arrived after 10.14.6 (beta 5). I am not testing the betas anymore currently, so I won’t be able to give further input on that.
I unfortunately confirm this bug on a fresh install of both macOS 10.14.6 and Anaconda. It's clearly Apple's bug; has anyone reported it?
I've attached the full WindowServer_2019-08-07-092951_Kenneths-MacBook-Pro.crash.txt
crashdump; here's the relevant part:
Process: WindowServer [9531]
Path: /System/Library/PrivateFrameworks/SkyLight.framework/Versions/A/Resources/WindowServer
Identifier: WindowServer
Version: 600.00 (340.54)
Code Type: X86-64 (Native)
Parent Process: launchd [1]
Responsible: WindowServer [9531]
User ID: 88
Date/Time: 2019-08-07 09:29:04.096 -0400
OS Version: Mac OS X 10.14.6 (18G87)
Report Version: 12
Anonymous UUID: 78BD0FA6-6033-BEED-4187-9247033D9778
Sleep/Wake UUID: 1476ADD3-4C0B-4904-8657-1268CD642BF9
Time Awake Since Boot: 30000 seconds
Time Since Wake: 400 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [9531]
VM Regions Near 0:
-->
__TEXT 000000010a3f4000-000000010a3f6000 [ 8K] r-x/rwx SM=COW /System/Library/PrivateFrameworks/SkyLight.framework/Versions/A/Resources/WindowServer
Application Specific Information:
StartTime:2019-08-07 09:27:37
GPU:IG&NV
MetalDevice for accelerator(0x3703): 0x7f919b027408 (MTLDevice: 0x10d09b000)
MetalDevice for accelerator(0x4827): 0x7f9199c0b6c8 (MTLDevice: 0x10d068000)
IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/P0P2@1/IOPP/GFX0@0/NVDA,Display-D@3/NVDA
IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/P0P2@1/IOPP/GFX0@0/NVDA,Display-A@0/NVDA
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 com.apple.SkyLight 0x00007fff55a54485 CGXBeginSurfaceLayerUpdate + 3207
1 com.apple.SkyLight 0x00007fff55b031a9 prepare_CoreAnimation_update_state(CGXConnection*, CGXWindowSubArray, bool, bool) + 636
2 com.apple.SkyLight 0x00007fff55afec39 CGXUpdateDisplay + 7081
3 com.apple.SkyLight 0x00007fff55afce20 update_display_callback(void*, double) + 298
4 com.apple.SkyLight 0x00007fff55b418a1 run_timer_pass + 489
5 com.apple.SkyLight 0x00007fff55b73bd2 CGXRunOneServicesPass + 180
6 com.apple.SkyLight 0x00007fff55b74d52 server_loop + 602
7 com.apple.SkyLight 0x00007fff55b74af1 SLXServer + 1349
8 WindowServer 0x000000010a3f550d 0x10a3f4000 + 5389
9 libdyld.dylib 0x00007fff5c7133d5 start + 1
Same here, the problem started occurring after the recent update to Mojave 10.14.6. Using the stock Anaconda 2019.07 distribution.
Same here - recently updated to Mojave 10.14.6 and tkinter started crashing my mac knocking me back to the login screen.
Same here - reported this to Apple earlier today
same issue here!
This may be related to a similar issue report to conda-forge, conda-forge/tk-feedstock#36
I have finally found this post. I have been searching around why I have this bug until this post Same issue here
Same issue....
Same issue here
I have this issue on a 9-day old MacBook Pro running macOS 10.14.6 and Anaconda 2019.07. I'll report it to Apple.
This problem does not appear when I run tk=8.6.8 and Python 3.7.0, nor does it appear when I run tk=8.6.7 and Python 3.7.0. I do experience the issue when I run tk=8.6.8 and Python 3.7.4.
@TheodoreEhrenborg I can verify this. I downgraded to 3.7.0 and it works
@TheodoreEhrenborg i can confirm, also have a 3 days old mbp with macOS 10.14.6 and anaconda installed, using tk did immediately crash as the issue title says, downgrading to 3.7.0 solved the issue. Maybe it is a Python side issue then ?
According to @tazzben the bug only occurs when Anaconda is installed.
I guess Anaconda treats Python 3.7.4 differently from Python 3.7.0, and this somehow activates a glitch in macOS 10.14.6 when using tkinter. But I don't understand where the problem is coming from.
The 10.14.6 Supplemental Update does not solve the problem, btw.
Reinstalling 'tk' using conda eliminates the crash, but tkinter then does not behave properly. Windows appear, but no visible contents.
What method did you use to reinstall tk? I ran "conda install tk --force-reinstall", and my windowing system still crashed when I used Tkinter (with Python 3.7.3 and tk=8.6.8). I tried removing tk ("conda remove --force tk") and then installing tk again, but that did not stop the crashes.
I just did 'conda install tk' and that did it.
But, as I said, while the system doesn't crash, tk(inter) still doesn't work right.
I don't know why our systems are responding differently.
Congratulations on finding a new way that the bug manifests itself.
Same issue here. Did anyone get an answer from Apple?
@hlgirard I haven't yet.
When the bug happens to me, sometimes the image on my screen gets squished into the top left corner, so there is a band of nonfunctional pixels (about an inch wide) along the bottom and right of my screen. I can only fix this by restarting my computer. Does this happen to anyone else?
I have the same problem.
Did anyone find a fix? I have the same issue
Just find history version, I installed 2018 December version. It worked.
On Fri, 13 Sep 2019, 10:50 pm kheirmirza, notifications@github.com wrote:
Did anyone find a fix? I have the same issue
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ContinuumIO/anaconda-issues/issues/11165?email_source=notifications&email_token=AM5LFL42N37B2AEJAC5SV6TQJOEARA5CNFSM4IIFQSI2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6U5OGY#issuecomment-531224347, or mute the thread https://github.com/notifications/unsubscribe-auth/AM5LFL3PFQHWNTVCZRX4T4TQJOEARANCNFSM4IIFQSIQ .
Just downgraded python to 3.7.0 and it worked fine. You might need to set a new environment because lots of packages will get conflicts as they are made for the last python version. I used "conda create -n visual python=3.7.0" to create an environment only for my use of Tkinter. Then you can install the extra packages you need.
Thanks so much it worked! @ValKanAll and @chtoby you are both amazing.
Downgrading to 3.7.0 is not a full solution; several things a tk program can do will still kill the login session (e.g. opening a second window).
@pgunn With Python=3.7.0 and tk=8.6.8, I ran "from tkinter import Tk; Tk(); Tk()". This opened two tk windows but did not cause the windowing system to crash.
What tk program did you run to get your windowing system to crash? I'm not very familiar with tk, so I don't know how multiple tk windows are usually used.
I'm making a sanitised version of my script that I can share. Should be able to toss it on pastebin within an hour.
@TheodoreEhrenborg Here's a pastebin.
My system:
C02VF0SQHTDH:~/src/waspem-tooling/data_managers$ conda list | grep python
python 3.7.0 hc167b69_0
C02VF0SQHTDH:~/src/waspem-tooling/data_managers$ conda list | grep tk
tk 8.6.8 ha441bb4_0
C02VF0SQHTDH:~/src/waspem-tooling/data_managers$ uname -a
Darwin C02VF0SQHTDH 18.7.0 Darwin Kernel Version 18.7.0: Tue Aug 20 16:57:14 PDT 2019; root:xnu-4903.271.2~2/RELEASE_X86_64 x86_64
Note that it crashes when you click the (non-quit) button, not when it's initially launching
@pgunn Thanks for the script. I ran "python paintman.py" and clicked on the "Work on" button. This opened a "work" window successfully. Maybe I misunderstood your instructions.
No, it sounds like for some reason it's crashing for me and not for you. Weird. Let me know if there's more debugging you'd like me to try to explore differences between our systems. For me that "Work on" button is the ticket to a crash.
I agree it's weird. I hope the next macOS release fixes it.
Unfortunately the supplemental release (pushed out today or yesterday) does not seem to resolve this issue.
I had the same issue with an anaconda environment with python3.6.9 (TkVersion=8.6), I created another environment with python 3.6.6 (TkVersion=8.6) and it works for me now (macOS 10.14.6, conda 4.7.12)
@maxime915 Python 3.6.9 and Python 3.7.4, which both have the issue, were released in July 2019. Python 3.6.6 and Python 3.7.0, which don't have the issue, were released in 2018. It seems plausible that the issue manifests because of something that Python has changed. The actual bug could be in Python, Anaconda, or Apple. But the bug seems to be responding to some quality of more recent Python releases.
Of course, this is just speculation. I hope macOS Catalina will fix this issue, although I won't upgrade until it has been released successfully without other bugs.
Current Catalina beta (GM) indeed doesn’t seem to have the problem. It would still be good to see a fix on 10.14 though for users of 32 bit apps who cannot upgrade.
i hope developers, especially in the FOSS community, won't rush to Catalina and drop support of previous OSes, as I will have to stick for a while with Mojave (and suppose i'm not the only one)
I had the same problem on Mac OS 10.14.6, I am using anaconda. As I could not change the tk version without recompiling python (https://www.python.org/download/mac/tcltk/ I had to downgrade my python version. The python version 3.6.0 worked well, later and earlier version crashed.
For anyone having this issue using Tk with matplotlib, I replaced
matplotlib.use('TkArg')
with
matplotlib.use('MacOSX')
and the issues seem to be resolved. Not sure how though.
@mattsliv Many thanks :D save me tons of hours on looking for a solution.
I had the same problem, I found another solution if you are using anaconda. In matplotlib's docs they recommend installing the python framework:
"On OSX, two different types of Python builds exist: a regular build and a framework build. In order to interact correctly with OSX through the native GUI frameworks, you need a framework build of Python."
https://matplotlib.org/3.1.0/faq/osx_framework.html
So following their conda recommendations I ensured python.app framework was installed on my env with conda install python.app
. Then instead of using the command python plot-file.py
to run my file, I used pythonw plot-file.py
to run it. Everything worked fine.
@sean-johnson , Thanks, for the solution. I didn't do a separate conda python install like you did. However I did do a "conda update --all" today in trying to resolve this problem. (That didn't help, although it did upgrade my python from 3.7.3 to 3.7.6.)
I tried using "pythonw -m tkinter" from the MacOS 10.14.6 Terminal. This worked successfully when doing the same with "python" instesad of "pythonw" kicked me out to the login screen as others have described.
I note that "pythonw" runs python version 3.7.0 on my machine, while "python" runs 3.7.6. This may explain why it works as others found a solution by downgrading to python 3.7.0.
Mac os Mojave 10.14.6. the problem come from that my python 3.7.6 is in the anaconda package (/opt/anaconda3/bin/python) tkinter app cause the system log out abruptly. Downloading python 3.7.6 installer (for macosx 64) from www.python.org and run the installer, python is in the system (/Library/Frameworks/Python.framework/Versions/3.7/bin/python) Tkinter app work fine.
I have the same problem on MacOS 10.14.6 with Python 3.7.6, and it dosen't work for me to downgrade to 3.7.0.
I solved this problem by using old tkinter:
I uninstalled the Python3 which is downloaded from python.org (it includes tkinter 8.6), and reinstall python by Homebrew (brew install python3
). Homwbrew will install Python 3.7.7 without tkinter. So Python 3.7.7 will use the MacOS build-in tkinter(version = 8.5.9).
It work fine for me.
But I don't use Anaconda, so you have to check if there are version problem. May be this documentation will help.
Consider the simple hello world on this page:
https://docs.python.org/3/library/tkinter.html
When run on macOS 10.14.6 with Anaconda 2019.7, the entire windowing system crashes (knocking the user back to the window login). I've tested this on three different machines and they exhibit the same behavior (some machines have anaconda installed for all users, some just the signed in user).
It seems to be specific to the installation of Anaconda: I've created a virtual machine running 10.14.6 containing only Python 3.7.4 (installed from python.org) and the code works as expected. However, one of the more interesting aspects of this bug is that Anaconda only needs to be installed to have the problem. If you execute the code using the standard python build, but anaconda is installed, it still crashes.
I suspect this problem relates to how anaconda installs TK/TCL packages. Something that changed in macOS 10.14.6 resulted in some kind of conflict (as it didn't crash in macOS 10.14.5).
conda info
conda list --show-channel-urls