From: SourceForge.net <no...@so...> - 2011-07-07 02:08:45
|
Bugs item #3285355, was opened at 2011-04-12 10:05 Message generated for change (Comment added) made by wordtech You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112997&aid=3285355&group_id=12997 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: 11. Aqua Menus Group: obsolete: 8.6b1 Status: Open Resolution: None Priority: 7 Private: No Submitted By: Michael Leuschel (mleuschel) Assigned to: Kevin Walzer (wordtech) Summary: Active Tcl/Tk 8.6b5 hangs for simple example Initial Comment: When selecting Open in the attached Tcl/Tk script an error message should appear and report that procWhichDoesNotExist does not exist. However, Tcl/Tk seems to hand, displaying a white rectangle (where the error message should be) in front of all other windows. Even switching to other Mac applications does not make the rectangle disappear; only killing Wish works (using Force Quite for example). The bug appears on a MacPro Intel Xeon 6-core processor using the latest Active Tcl/Tk 8.6b5. This bug is an example for a variety of similar issues which currently make Tcl/Tk unusable on the Mac (at least for our application). I believe that 8.5.9.2 has the same problem (Active Tcl 8.5.9.0 works perfectly). This bug was previously posted as bug #89715 to http://bugs.activestate.com. ---------------------------------------------------------------------- >Comment By: Kevin Walzer (wordtech) Date: 2011-07-06 21:08 Message: #3028676, which seems to be driving this issue, is exceptionally complex and beyond my skills to address at this time. I still maintain that the specific issue with bgerror is so easily fixed (by rewriting the procedure, as I do in my Tk-Cocoa apps) that the underlying bug, while serious, is not a showstopper. ---------------------------------------------------------------------- Comment By: Kevin Walzer (wordtech) Date: 2011-07-05 20:23 Message: Looks like this bug is a manifestation of issues raised with the Tcl notifier in bug 3028676. I'm going to focus on fixing that bug, as it should resolve this one and others like it. ---------------------------------------------------------------------- Comment By: Jeffrey Hobbs (hobbs) Date: 2011-07-04 22:21 Message: Related bug 3348994 indicates that this is actually a larger issue, and the bgerror trick doesn't solve it. You can use 'after 100' or something (after idle wasn't enough), but it would seem that somehow deferring it properly at the C level seems necessary. ---------------------------------------------------------------------- Comment By: Kevin Walzer (wordtech) Date: 2011-07-04 20:47 Message: It's so trivial to rewrite the bgerror command that I wonder if it might make sense simply to define an alternate proc for Tk-Cocoa, something like: proc bgerror {msg} { tk_messageBox -icon info -message $msg } I've taken a look at the code in tkMacOSXMenu.c and some of the stack traces, and this seems like a very deep, hard-to-find bug. This alternative approach would be much simpler to implement and would solve the issue of the application freezing. Thoughts? ---------------------------------------------------------------------- Comment By: Kevin Walzer (wordtech) Date: 2011-04-23 21:18 Message: One workaround for this issue is to define an alternate bgerror proc, cf: proc bgerror {args} { puts $args } That removes the popup dialog altogether for unhandled errors in Tk-Cocoa. ---------------------------------------------------------------------- Comment By: Jeffrey Hobbs (hobbs) Date: 2011-04-15 01:29 Message: The source of the problem is the vwait in $tk_library/bgerror.tcl. Calling this while we are still entwined with the OS X menu handling event loop gets you stuck. If you do an 'update idle' just before it and disable the "PlaceWindow" call (which has its own update call), you see the window better. Basically though any update here is also bad for similar reasons. Error handling in menus seems problematic. ---------------------------------------------------------------------- Comment By: Jeffrey Hobbs (hobbs) Date: 2011-04-14 23:41 Message: The change in versions indicates that this is likely a Carbon to Cocoa transition issue. The trimmed down report shows more clearly that this is caused by an error occurring in the menu callback. Perhaps tkerror isn't set up correctly, a tkwait is made that shouldn't be, or some interaction between trying to exit the OS X menu loop and get into Tk. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112997&aid=3285355&group_id=12997 |