Repository navigation
Change _tkinter initialization for new versions of Aqua Tk on OS X #49370
Description
Activity
For some reason the recently added test_ttk_guionly is causing Tcl to
abort on Mac. I would prefer to disable the test for now, except if some
mac owner has the time to fix it.I would like to know the tcl version being used on the noller-osx86
buildslave too, if possible.- addedtype-crashA hard crash of the interpreter, possibly with a core dumpA hard crash of the interpreter, possibly with a core dump
on Jan 31, 2009 For some reason the recently added test_ttk_guionly is causing Tcl to
abort on Mac. I would prefer to disable the test for now, except if some
mac owner has the time to fix it.Just saw it didn't cause an abort with the buildslave heller-x86-osx5, btw.
It seems to be good now after a recent modification in how tests are
performed, closing. Sorry for the fuss.The abort still happens occasionally, see:
http://www.python.org/dev/buildbot/all/OS%20X%20x86%20trunk/builds/118/step-test/0
(last lines)I've talked with Daniel Steffen, who is one of the maintainers of Tcl/Tk
on Mac OSX, and I was told that all this conditional code in _tkinter.c
and tkappinit.c for TK_AQUA is outdated starting with tk 8.4.8, but tk
8.4.7 that ships with macosx (which happens to be the version being used
by the buildslave mentioned above) also includes the patch that
deprecates the usage, and we should be calling only Tk_Init on
tkappinit.c which will deal with all the details (the details are in
tkMacOSXInit:TkpInit).There is an entry in tk's changelog that is directly related to this:
http://tktoolkit.cvs.sourceforge.net/viewvc/tktoolkit/tk/ChangeLog.2004?revision=1.1&view=markup
(lines 210-220)Any chance I can change _tkinter and tkappinit to check for
TKINTER_OLD_AQUA (new macro to be added) instead of TK_AQUA and verify
if it helps the buildslaves ?To follow up your question posted on bpo-6527 (sorry for the
duplicate), I don't currently have a mac to test on. I might have
access to one in a couple weeks, though.I noticed this while investigating bpo-6834. Is this still an open issue
for OS X? Could it explain the symptoms in 6834?Sorry, that should be bpo-6864.
Is this still a problem on OS X?
Mark: maybe, why don't you test this?
This is still an issue for the PPC Tiger buildbot:
test_ttk_guionly
make: *** [buildbottest] Segmentation fault(Direct link: http://www.python.org/dev/buildbot/builders/PPC%20Tiger%202.7/builds/39/steps/test/logs/stdio)
Presumably this is the same bpo-8716. That issue contains additional details and a patch from Ronald, so I'm not closing it as a duplicate.
I don't know if the patch on this issue would actually address the issue. I tried to apply it to py3k but it did not apply cleanly.
Recent crash on "PPC Tiger 3.x":
----------------
[188/354] test_ttk_guionly
Fatal Python error: Segmentation faultTraceback (most recent call first): File "/Users/buildbot/buildarea/3.x.parc-tiger-1/build/Lib/tkinter/ttk.py", line 47 in _load_tile File "/Users/buildbot/buildarea/3.x.parc-tiger-1/build/Lib/tkinter/ttk.py", line 559 in __init__ File "/Users/buildbot/buildarea/3.x.parc-tiger-1/build/Lib/tkinter/ttk.py", line 614 in __init__ File "/Users/buildbot/buildarea/3.x.parc-tiger-1/build/Lib/test/test_ttk_guionly.py", line 14 in <module> File "/Users/buildbot/buildarea/3.x.parc-tiger-1/build/Lib/importlib/_bootstrap.py", line 342 in _load_module File "/Users/buildbot/buildarea/3.x.parc-tiger-1/build/Lib/importlib/_bootstrap.py", line 141 in decorated File "/Users/buildbot/buildarea/3.x.parc-tiger-1/build/Lib/importlib/_bootstrap.py", line 437 in load_module File "./Lib/test/regrtest.py", line 1025 in runtest_inner File "./Lib/test/regrtest.py", line 826 in runtest File "./Lib/test/regrtest.py", line 650 in main File "./Lib/test/regrtest.py", line 1607 in <module> make: *** [buildbottest] Segmentation fault program finished with exit code 2 elapsedTime=1656.072954
http://www.python.org/dev/buildbot/all/builders/PPC%20Tiger%203.x/builds/1701/steps/test/logs/stdio
ttk_guionly creates a button (ttk.Button()) which calls _load_tile(), which crashs on: master.tk.eval('package require tile')
Code of the function:
-------------------------def _load_tile(master): if _REQUIRE_TILE: import os tilelib = os.environ.get('TILE_LIBRARY') if tilelib: # append custom tile path to the the list of directories that # Tcl uses when attempting to resolve packages with the package # command master.tk.eval( 'global auto_path; ' 'lappend auto_path {%s}' % tilelib) master.tk.eval('package require tile') # TclError may be raised here master._tile_loaded = True
Still crashing on "PPC Tiger 3.x" buildbot:
----------------
...
[333/356/2] test_ttk_guionly
Fatal Python error: Segmentation faultCurrent thread 0xa000ed88:
File "/Users/buildbot/buildarea/3.x.parc-tiger-1/build/Lib/tkinter/ttk.py", line 47 in _load_tile
File "/Users/buildbot/buildarea/3.x.parc-tiger-1/build/Lib/tkinter/ttk.py", line 559 in __init__
File "/Users/buildbot/buildarea/3.x.parc-tiger-1/build/Lib/tkinter/ttk.py", line 614 in __init__
File "/Users/buildbot/buildarea/3.x.parc-tiger-1/build/Lib/test/test_ttk_guionly.py", line 14 in <module>
File "/Users/buildbot/buildarea/3.x.parc-tiger-1/build/Lib/importlib/_bootstrap.py", line 342 in _load_module
File "/Users/buildbot/buildarea/3.x.parc-tiger-1/build/Lib/importlib/_bootstrap.py", line 141 in decorated
File "/Users/buildbot/buildarea/3.x.parc-tiger-1/build/Lib/importlib/_bootstrap.py", line 437 in load_module
File "./Lib/test/regrtest.py", line 1063 in runtest_inner
File "./Lib/test/regrtest.py", line 861 in runtest
File "./Lib/test/regrtest.py", line 669 in main
File "./Lib/test/regrtest.py", line 1648 in <module>
make: *** [buildbottest] Segmentation fault
----------------http://www.python.org/dev/buildbot/all/builders/PPC%20Tiger%203.x/builds/2109/steps/test/logs/stdio
Can anyone with a Mac look at this issue?
See comments to bpo-8716. Suggest any further comments on the "headless" crash issue go there and reserve this issue for investigation into the suggested changes to initialization when using Aqua Tk. BTW, the supplied patch has compile time Tk version tests which can be problematic since Aqua Tk is dynamically linked and so the exact patch version cannot be determined at compile time. However, since 8.4.7 is the earliest version we claim to support we could probably dispense with the check, assuming the change is warranted.
- changed the title
[-]Disabling test_ttk_guionly on mac[/-][+]Change _tkinter initialization for new versions of Aqua Tk on OS X[/+]on Jun 30, 2011 - removedtype-crashA hard crash of the interpreter, possibly with a core dumpA hard crash of the interpreter, possibly with a core dump
on Jun 30, 2011 As mentioned by Ned this is a duplicate of bpo-8716.
The proposed change to tkinter initialization in msg81468 might be useful to look into, but I'm not interested in doing that work because I don't use Tkinter myself which makes it harder to test if the change actually helps.
FWIW, the patch looks sane for what it is trying to accomplish.
NOTE: If the Tk version in OSX 10.4 is new enough to not need the workaround that will be disabled by the TKINTER_OLD_AQUA in the patch we could just drop the code.
Can we close this? I expect that if crashes were still happening from this cause, there would be a newer issue.
Or should this be marked for 3.11?
Looks well out of date to me.
Reacted by Christopher Chavez
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: