Re: [Pythonmac-SIG] IDLE Crashes when Prefs are accessed on Python 3.3 on OSX 10.8.2
On 10/10/12 11:26 PM, Ned Deily wrote: A Python patch could go here: http://bugs.python.org/issue15853 Patch submitted. The preferences dialog no longer crashes for me. -- Kevin Walzer Code by Kevin http://www.codebykevin.com ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
Re: [Pythonmac-SIG] IDLE Crashes when Prefs are accessed on Python 3.3 on OSX 10.8.2
On 11 Oct, 2012, at 4:02, Kevin Walzer wrote: > On 10/10/12 7:38 PM, Ned Deily wrote: >> Look at the dump file I attached to the Tk issue. It has a complete >> debug trace through Tk including C line numbers. >> >> http://sourceforge.net/tracker/?func=detail&atid=112997&aid=3575664&group >> _id=12997 > > I've been stepping through the IDLE source code and it appears IDLE is > crashing during the LoadConfigs() call of the config dialog. Still have more > investigating to do, but I'm hopeful I can come up with a workaround that > will keep things from crashing. > > The stack trace that I posted earlier, in my own testing, indicates that the > issue may be during the infernal event loop integration between Tk and > Cocoa--there's been a lot of traffic on the Mac-Tcl list about that. > Fortunately, while the low-level event loop issues are more or less > unavoidable at this time, they can often be worked around at the script level > with calls to update, after idle, etc. It may take some trial and error here > to get that working. > If I'm successful, where should I submit a patch? The python tracker (http://bugs.python.org/) Ronald ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
Re: [Pythonmac-SIG] IDLE Crashes when Prefs are accessed on Python 3.3 on OSX 10.8.2
In article <5076289c.7060...@codebykevin.com>, Kevin Walzer wrote: > The stack trace that I posted earlier, in my own testing, indicates that > the issue may be during the infernal event loop integration between Tk > and Cocoa--there's been a lot of traffic on the Mac-Tcl list about that. > Fortunately, while the low-level event loop issues are more or less > unavoidable at this time, they can often be worked around at the script > level with calls to update, after idle, etc. It may take some trial and > error here to get that working. > If I'm successful, where should I submit a patch? A Python patch could go here: http://bugs.python.org/issue15853 -- Ned Deily, n...@acm.org ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
Re: [Pythonmac-SIG] IDLE Crashes when Prefs are accessed on Python 3.3 on OSX 10.8.2
On 10/10/12 10:02 PM, Kevin Walzer wrote: I've been stepping through the IDLE source code and it appears IDLE is crashing during the LoadConfigs() call of the config dialog. Still have more investigating to do, but I'm hopeful I can come up with a workaround that will keep things from crashing. I've traced the crash to this call in configDialog.py, around line 830 or so: def SetFontSample(self,event=None): fontName=self.fontName.get() if self.fontBold.get(): fontWeight=tkFont.BOLD else: fontWeight=tkFont.NORMAL ###This is where it crashes!! How to fix? self.editFont.config(size=self.fontSize.get(), weight=fontWeight,family=fontName) Specifically, the crash occurs in self.editFont.config, which configures the font-sample display in the preferences dialog. I haven't been able to develop a workaround yet--calls to "self.update," etc. haven't worked--and will revisit it in the next day or so. Any other suggestions are appreciated. --Kevin -- Kevin Walzer Code by Kevin http://www.codebykevin.com ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
Re: [Pythonmac-SIG] IDLE Crashes when Prefs are accessed on Python 3.3 on OSX 10.8.2
On 10/10/12 7:38 PM, Ned Deily wrote: Look at the dump file I attached to the Tk issue. It has a complete debug trace through Tk including C line numbers. http://sourceforge.net/tracker/?func=detail&atid=112997&aid=3575664&group _id=12997 I've been stepping through the IDLE source code and it appears IDLE is crashing during the LoadConfigs() call of the config dialog. Still have more investigating to do, but I'm hopeful I can come up with a workaround that will keep things from crashing. The stack trace that I posted earlier, in my own testing, indicates that the issue may be during the infernal event loop integration between Tk and Cocoa--there's been a lot of traffic on the Mac-Tcl list about that. Fortunately, while the low-level event loop issues are more or less unavoidable at this time, they can often be worked around at the script level with calls to update, after idle, etc. It may take some trial and error here to get that working. If I'm successful, where should I submit a patch? --Kevin -- Kevin Walzer Code by Kevin http://www.codebykevin.com ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
Re: [Pythonmac-SIG] IDLE Crashes when Prefs are accessed on Python 3.3 on OSX 10.8.2
On 10/10/12 7:38 PM, Ned Deily wrote: Look at the dump file I attached to the Tk issue. It has a complete debug trace through Tk including C line numbers. My stack trace is completely different, so I'm not sure where to look. -- Kevin Walzer Code by Kevin http://www.codebykevin.com ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
Re: [Pythonmac-SIG] IDLE Crashes when Prefs are accessed on Python 3.3 on OSX 10.8.2
In article <50760282.1040...@codebykevin.com>, Kevin Walzer wrote: > On 10/10/12 10:19 AM, Ronald Oussoren wrote: > > That odd. IDLE also uses '::tk::mac::ShowPreferences' for the > > configuration dialog. The only difference with your script is that the same > > command is also bound to '<>'. The code for this all > > is in idlelib.macosxSupport.overrideRootMenu in the stdlib. > > Indeed it's strange. The stack trace suggests the problem is coming from > Tk, but I cannot reproduce the issue in Tk nor can I reproduce it with > the simple sample Python script. As a result I am not sure what to do here. Look at the dump file I attached to the Tk issue. It has a complete debug trace through Tk including C line numbers. http://sourceforge.net/tracker/?func=detail&atid=112997&aid=3575664&group _id=12997 -- Ned Deily, n...@acm.org ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
Re: [Pythonmac-SIG] IDLE Crashes when Prefs are accessed on Python 3.3 on OSX 10.8.2
On 10/10/12 10:19 AM, Ronald Oussoren wrote: That odd. IDLE also uses '::tk::mac::ShowPreferences' for the configuration dialog. The only difference with your script is that the same command is also bound to '<>'. The code for this all is in idlelib.macosxSupport.overrideRootMenu in the stdlib. Indeed it's strange. The stack trace suggests the problem is coming from Tk, but I cannot reproduce the issue in Tk nor can I reproduce it with the simple sample Python script. As a result I am not sure what to do here. Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 Tk 0x0b0c2079 0xb00 + 794745 1 Tk 0x0b03e03d 0xb00 + 254013 2 Tk 0x0b0159e0 0xb00 + 88544 3 Tk 0x0b0159ec 0xb00 + 88556 4 Tk 0x0b0159ec 0xb00 + 88556 5 Tcl 0x0a0990fa TclServiceIdle + 63 6 Tcl 0x0a07c2f2 Tcl_DoOneEvent + 213 7 Tk 0x0b0386ab 0xb00 + 231083 8 Tcl 0x0a0990fa TclServiceIdle + 63 9 Tcl 0x0a07c2f2 Tcl_DoOneEvent + 213 10 Tk 0x0b00e59e 0xb00 + 58782 11 Tcl 0x0a00d4bb 0xa00 + 54459 12 Tcl 0x0a00e448 Tcl_EvalObjv + 66 13 _tkinter.so 0x00591b45 Tkapp_Call + 725 (_tkinter.c:1379) 14 org.python.python 0x0004acbc PyCFunction_Call + 92 15 org.python.python 0x000a2bcd PyEval_EvalFrameEx + 15277 16 org.python.python 0x000a585d PyEval_EvalCodeEx + 1885 17 org.python.python 0x000a5a19 fast_function + 297 18 org.python.python 0x000a2c6d PyEval_EvalFrameEx + 15437 19 org.python.python 0x000a585d PyEval_EvalCodeEx + 1885 20 org.python.python 0x00035b5b function_call + 331 21 org.python.python 0xcad1 PyObject_Call + 97 22 org.python.python 0x0001e80e instancemethod_call + 462 23 org.python.python 0xcad1 PyObject_Call + 97 24 org.python.python 0x0009e47e PyEval_CallObjectWithKeywords + 174 25 org.python.python 0x0001a837 PyInstance_New + 295 26 org.python.python 0xcad1 PyObject_Call + 97 27 org.python.python 0x000a2e79 PyEval_EvalFrameEx + 15961 28 org.python.python 0x000a585d PyEval_EvalCodeEx + 1885 29 org.python.python 0x00035b5b function_call + 331 30 org.python.python 0xcad1 PyObject_Call + 97 31 org.python.python 0x0009e47e PyEval_CallObjectWithKeywords + 174 32 _tkinter.so 0x00595820 PythonCmd + 224 (_tkinter.c:2074) 33 Tcl 0x0a00b6d5 TclInvokeStringCommand + 110 34 Tcl 0x0a00d4bb 0xa00 + 54459 35 Tcl 0x0a00dfb3 0xa00 + 57267 36 Tcl 0x0a00e334 Tcl_GlobalEval + 72 37 Tk 0x0b0bc7d8 0xb00 + 772056 38 Tk 0x0b0bc817 0xb00 + 772119 39 com.apple.CoreFoundation 0x97f8cd11 -[NSObject performSelector:withObject:] + 65 40 com.apple.AppKit 0x95a79663 -[NSApplication sendAction:to:from:] + 232 41 com.apple.AppKit 0x95cb3968 -[NSCarbonMenuImpl performMenuAction:withTarget:] + 247 42 com.apple.AppKit 0x95ae61e9 -[NSMenu _performKeyEquivalentWithDelegate:] + 374 43 com.apple.AppKit 0x95ae6325 -[NSMenu _performKeyEquivalentWithDelegate:] + 690 44 com.apple.AppKit 0x95ae5d94 -[NSMenu performKeyEquivalent:] + 79 45 com.apple.AppKit 0x95ae48e6 -[NSApplication _handleKeyEquivalent:] + 594 46 com.apple.AppKit 0x959da34f -[NSApplication sendEvent:] + 5772 47 Tk 0x0b0c591e 0xb00 + 809246 48 Tk 0x0b0c5ca6 0xb00 + 810150 49 Tcl 0x0a07c2d1 Tcl_DoOneEvent + 180 50 _tkinter.so 0x00593ef3 Tkapp_MainLoop + 355 (_tkinter.c:2638) -- Kevin Walzer Code by Kevin http://www.codebykevin.com ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
Re: [Pythonmac-SIG] IDLE Crashes when Prefs are accessed on Python 3.3 on OSX 10.8.2
On 10 Oct, 2012, at 5:28, Kevin Walzer wrote: > On 10/9/12 5:26 AM, Ned Deily wrote: >> I've done some extensive building and bisecting of Fossil checkins to >> the tk-cocoa-8-5-backport branch and have isolated the regression to a >> particular checkin. I've opened Tk issue 3575664 with the details and >> provided a debug crash dump. > > I've done some additional testing of this in Tk, and cannot reproduce the > crash. Also, this sample Tkinter script runs without any crash: > > ### > from Tkinter import * > > root = Tk() > > w = Label(root, text="Hello, world!") > w.pack() > > def showPreferences(): >top = Toplevel() >top.title("About this application...") > > root.createcommand('::tk::mac::ShowPreferences', showPreferences) > root.mainloop() > > > I think the culprit is somewhere in IDLE's internals, but I can't be sure. If > the bug is in Tkinter's internals, this script should crash, but it doesn't. > Please try it to confirm. That odd. IDLE also uses '::tk::mac::ShowPreferences' for the configuration dialog. The only difference with your script is that the same command is also bound to '<>'. The code for this all is in idlelib.macosxSupport.overrideRootMenu in the stdlib. Ronald > > At this point I'm not sure what else to suggest. > > --Kevin > > -- > Kevin Walzer > Code by Kevin > http://www.codebykevin.com > ___ > Pythonmac-SIG maillist - Pythonmac-SIG@python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
Re: [Pythonmac-SIG] IDLE Crashes when Prefs are accessed on Python 3.3 on OSX 10.8.2
P.S. To fire the prefs dialog, type Command-, or command-comma. That is the default keybinding even though I did not explicitly enable it in the script. ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
Re: [Pythonmac-SIG] IDLE Crashes when Prefs are accessed on Python 3.3 on OSX 10.8.2
On 10/9/12 5:26 AM, Ned Deily wrote: I've done some extensive building and bisecting of Fossil checkins to the tk-cocoa-8-5-backport branch and have isolated the regression to a particular checkin. I've opened Tk issue 3575664 with the details and provided a debug crash dump. I've done some additional testing of this in Tk, and cannot reproduce the crash. Also, this sample Tkinter script runs without any crash: ### from Tkinter import * root = Tk() w = Label(root, text="Hello, world!") w.pack() def showPreferences(): top = Toplevel() top.title("About this application...") root.createcommand('::tk::mac::ShowPreferences', showPreferences) root.mainloop() I think the culprit is somewhere in IDLE's internals, but I can't be sure. If the bug is in Tkinter's internals, this script should crash, but it doesn't. Please try it to confirm. At this point I'm not sure what else to suggest. --Kevin -- Kevin Walzer Code by Kevin http://www.codebykevin.com ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
Re: [Pythonmac-SIG] IDLE Crashes when Prefs are accessed on Python 3.3 on OSX 10.8.2
In article <50737897.9030...@codebykevin.com>, Kevin Walzer wrote: > On 10/8/12 5:34 PM, Ned Deily wrote: > > As far as I can tell, the problem is not fixed in the source tree. The > > problem is trivial to reproduce with Python and IDLE. Try it with your > > own build of Tk 8.5 installed in /Library/Frameworks and with any of the > > current python.org 64-bit/32-bit installers > > (http://www.python.org/download/) or with the ActiveState Python > > installers. Launch the appropriate IDLE.app and select Preferences from > > the IDLE menu. > I've done some further testing of this, and have run into something very > odd. > > Just to be sure, I did a fresh checkout of Tk's core-8-5-branch and > rebuilt it, and then rebuilt my installation of Python to link to it. > (My recent Python apps have been linking to the Tk in > /System/Library/Frameworks because of the Mac App Store, but as I'm > moving away from the App Store that's no longer necessary.) > > After rebuilding and re-linking everything, I can indeed confirm the > crash in IDLE. Running Command-, causes the app to crash instead of > bringing up the preferences menu. However, I can't reproduce the crash > in Tk itself. Running Wish, I define the standard > tk::mac::ShowPrefrences procedure to print "foo" to standard output, and > it works as expected. This is why I said I didn't see the error and > wondered what version of Tk you were testing. I've done some extensive building and bisecting of Fossil checkins to the tk-cocoa-8-5-backport branch and have isolated the regression to a particular checkin. I've opened Tk issue 3575664 with the details and provided a debug crash dump. https://sourceforge.net/tracker/?func=detail&atid=112997&aid=3575664&grou p_id=12997 BTW, I've also opened Tk issue 3575681 to document that the earlier clipboard copy crash regression can still be reproduced with IDLE. -- Ned Deily, n...@acm.org ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
Re: [Pythonmac-SIG] IDLE Crashes when Prefs are accessed on Python 3.3 on OSX 10.8.2
On 10/8/12 5:34 PM, Ned Deily wrote: As far as I can tell, the problem is not fixed in the source tree. The problem is trivial to reproduce with Python and IDLE. Try it with your own build of Tk 8.5 installed in /Library/Frameworks and with any of the current python.org 64-bit/32-bit installers (http://www.python.org/download/) or with the ActiveState Python installers. Launch the appropriate IDLE.app and select Preferences from the IDLE menu. I've done some further testing of this, and have run into something very odd. Just to be sure, I did a fresh checkout of Tk's core-8-5-branch and rebuilt it, and then rebuilt my installation of Python to link to it. (My recent Python apps have been linking to the Tk in /System/Library/Frameworks because of the Mac App Store, but as I'm moving away from the App Store that's no longer necessary.) After rebuilding and re-linking everything, I can indeed confirm the crash in IDLE. Running Command-, causes the app to crash instead of bringing up the preferences menu. However, I can't reproduce the crash in Tk itself. Running Wish, I define the standard tk::mac::ShowPrefrences procedure to print "foo" to standard output, and it works as expected. This is why I said I didn't see the error and wondered what version of Tk you were testing. What happens if something crashes in Tkinter but not in Tk directly? Is this considered a bug in Python/Tkinter? Because IDLE's preferences method is calling into tk::mac::ShowPreferences, then it shouldn't crash unless Wish is also crashing. I don't know what to say if something crashes in Python/Tkinter but not in Tk. --Kevin -- Kevin Walzer Code by Kevin http://www.codebykevin.com ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
Re: [Pythonmac-SIG] IDLE Crashes when Prefs are accessed on Python 3.3 on OSX 10.8.2
On 10/8/12 5:34 PM, Ned Deily wrote: As far as I can tell, the problem is not fixed in the source tree. The problem is trivial to reproduce with Python and IDLE. Try it with your own build of Tk 8.5 installed in /Library/Frameworks and with any of the current python.org 64-bit/32-bit installers (http://www.python.org/download/) or with the ActiveState Python installers. Launch the appropriate IDLE.app and select Preferences from the IDLE menu. I moved my own build of Python out of the way, and installed ActivePython 2.7.2, which links against my custom build of Tcl/Tk in /Library/Frameworks, based on a week-old checkout of the tip of the core-8-5-branch. Launching IDLE and typing Command-, brings up the preferences dialog without any crash. Again, I'm not sure what version of Tk you are testing against? If you're testing against the most recent build of ActiveTcl, you won't see this fix, because ActiveState hasn't incorporated it yet. The fix was committed in the past month or so, I believe, as part of the input method patch submitted by Adrian Robert. --Kevin -- Kevin Walzer Code by Kevin http://www.codebykevin.com ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
Re: [Pythonmac-SIG] IDLE Crashes when Prefs are accessed on Python 3.3 on OSX 10.8.2
In article <50734448.30...@codebykevin.com>, Kevin Walzer wrote: > On 10/8/12 4:22 PM, Ned Deily wrote: > > It has not been fixed yet. > > Is this statement based on a fresh checkout of the core-8-5-branch from > http://core.tcl.tk/tk? Because my build of 8.5 dates from about a week > ago, and the preferences menu issue is fixed. > > What I said before holds: the fix is now in the source tree, but > ActiveState has not yet released an updated build of ActiveTcl to > include the fix. The OP can certainly download and build the Tcl/Tk > sources himself to get the fix; I agree that an alternative workaround > would be to revert to an older build of ActiveTcl, assuming it's still > available. As far as I can tell, the problem is not fixed in the source tree. The problem is trivial to reproduce with Python and IDLE. Try it with your own build of Tk 8.5 installed in /Library/Frameworks and with any of the current python.org 64-bit/32-bit installers (http://www.python.org/download/) or with the ActiveState Python installers. Launch the appropriate IDLE.app and select Preferences from the IDLE menu. -- Ned Deily, n...@acm.org ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
Re: [Pythonmac-SIG] IDLE Crashes when Prefs are accessed on Python 3.3 on OSX 10.8.2
On 10/8/12 4:22 PM, Ned Deily wrote: It has not been fixed yet. Is this statement based on a fresh checkout of the core-8-5-branch from http://core.tcl.tk/tk? Because my build of 8.5 dates from about a week ago, and the preferences menu issue is fixed. What I said before holds: the fix is now in the source tree, but ActiveState has not yet released an updated build of ActiveTcl to include the fix. The OP can certainly download and build the Tcl/Tk sources himself to get the fix; I agree that an alternative workaround would be to revert to an older build of ActiveTcl, assuming it's still available. --Kevin -- Kevin Walzer Code by Kevin http://www.codebykevin.com ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
Re: [Pythonmac-SIG] IDLE Crashes when Prefs are accessed on Python 3.3 on OSX 10.8.2
In article <5072aabc.8050...@codebykevin.com>, Kevin Walzer wrote: > On 10/8/12 3:46 AM, Scott Clausen wrote: > > Could their be a need for an update that I'm not aware of? > > Yes, probably--there was a crash in Tk 8.5.12 that has since been fixed, > but a binary release from ActiveState has not yet been made. When they > release a new version the crash should go away. It has not been fixed yet. The workaround at the moment is to revert to an older version of ActiveState, 8.5.11.1, as described here: http://www.python.org/download/mac/tcltk/ -- Ned Deily, n...@acm.org ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
Re: [Pythonmac-SIG] IDLE Crashes when Prefs are accessed on Python 3.3 on OSX 10.8.2
On 10/8/12 3:46 AM, Scott Clausen wrote: Could their be a need for an update that I'm not aware of? Yes, probably--there was a crash in Tk 8.5.12 that has since been fixed, but a binary release from ActiveState has not yet been made. When they release a new version the crash should go away. -- Kevin Walzer Code by Kevin http://www.codebykevin.com ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG