Tk Source Code

View Ticket
Login
Ticket UUID: 49cd46f5c982d0fbb63c635b1a64fe41a79d876a
Title: revised_text branch crashes when trying to run widget demo
Type: Bug Version: revised_text
Submitter: kevin_walzer Created on: 2017-06-12 20:28:46
Subsystem: 83. Mac OS X Build Assigned To: fvogel
Priority: 5 Medium Severity: Critical
Status: Closed Last Modified: 2023-07-19 08:39:26
Resolution: Works For Me Closed By: fvogel
    Closed on: 2023-07-19 08:39:26
Description:
Latest update of Tcl trunk and Tk revised_text branch. Builds cleanly, but when I try to run the built-in widget demo, Wish crashes. macOS 10.12. First part of the crashlog:

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       EXC_I386_GPFLT
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Segmentation fault: 11
Termination Reason:    Namespace SIGNAL, Code 0xb
Terminating Process:   exc handler [0]

Application Specific Information:
Performing @selector(tkDemo:) from sender NSMenuItem 0x7f8c7ef2ae70

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   Tk                            	0x000000010a8967cb Tk_AllocFontFromObj + 31
1   Tk                            	0x000000010a891070 0x10a87e000 + 77936
2   Tk                            	0x000000010a89166a Tk_SetOptions + 302
3   Tk                            	0x000000010a93e1cd 0x10a87e000 + 786893
4   Tk                            	0x000000010a93c828 0x10a87e000 + 780328
5   Tk                            	0x000000010a90031c 0x10a87e000 + 533276
6   Tcl                           	0x000000010aa088bf 0x10a9f2000 + 92351
7   Tcl                           	0x000000010aa058da TclNRRunCallbacks + 80
8   Tcl                           	0x000000010aa06aaa 0x10a9f2000 + 84650
9   Tcl                           	0x000000010aaa697e Tcl_FSEvalFileEx + 642
10  Tk                            	0x000000010a976b72 0x10a87e000 + 1018738
User Comments: fvogel added on 2023-07-19 08:39:26:

Thank you for your feedback!

I have no news from Gregor either.

The revised text widget is currently placed in a branch revised_text of the Tk repository.

TIP #466 sums up the situation about this I think.


stevenaaus added on 2023-07-19 08:14:04:
Latest build runs ok for me on Mojave 10.14.6

Since this old ticket has been dug up again for ... some reason ... Can i ask if there is any place where revised_text is still being discussed/considered. Gregor Cramer hasn't been online for 5 years or more.

chrstphrchvz added on 2023-07-18 20:43:34:

To clarify, I never observed this crash myself, as I had not tried the revised text widget until very recently. I only meant to provide some retrospective analysis for this stale ticket. I have no idea whether the crash is still possible.


fvogel added on 2023-07-18 19:21:04:

Still, I do not manage to reproduce on macOS (13.4.1 here, i.e. Ventura).

You say it happens when running the "widget" script through File > Run Widget Demo, but on my side this action does not trigger any crash (same when running source ./library/demos/widget from Wish).


chrstphrchvz added on 2023-07-18 09:31:26:

Sorry, I mixed those up in the last comment. The backtrace with TkConfigureText is for a text command, and the one with TkConfigureTag is for a .t tag configure … command.


chrstphrchvz added on 2023-07-18 09:26:45:

The crashes in this ticket occurred immediately after invoking File > Run Widget Demo, during commands in the widget script. The crash in the description was during a command with a -font option, either the text command where the backtrace would have:

Tk_AllocFontFromObj
DoObjConfig
Tk_SetOptions
TkConfigureTag
TkBTreeLoad
TextWidgetObjCmd
Dispatch
TclNRRunCallbacks
or a text widget tag configure command where (like in [39e510f69e]) the backtrace would have:
Tk_AllocFontFromObj
DoObjConfig
Tk_SetOptions
TkConfigureText
CreateWidget
Tk_TextObjCmd
Dispatch
TclNRRunCallbacks

For the more crash in Kevin’s more recent comment, I probably cannot guess which command it may have occurred in.


fvogel added on 2018-10-19 20:07:32:
I cannot reproduce. Could you please be more specific about what demo you're exactly running, the detailed actions you take, and so on...?

kevin_walzer added on 2018-10-19 12:04:59:
Still crashes for me on 10.14 after recent merges:

=COW  /Library/Frameworks/Tk.framework/Versions/8.7/Resources/Wish.app/Contents/MacOS/Wish

Application Specific Information:
Performing @selector(tkDemo:) from sender NSMenuItem 0x7fa8c2c58680

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   Tk                            	0x00000001028bf327 0x1027c5000 + 1024807
1   Tk                            	0x00000001028bf2f0 0x1027c5000 + 1024752
2   Tk                            	0x0000000102807f2d 0x1027c5000 + 274221
3   Tcl                           	0x000000010294d1e9 0x102937000 + 90601
4   Tcl                           	0x000000010294a11a TclNRRunCallbacks + 80
5   Tcl                           	0x000000010294b388 0x102937000 + 82824
6   Tcl                           	0x00000001029e8ab5 Tcl_FSEvalFileEx + 549
7   Tk                            	0x00000001028c22a8 0x1027c5000 + 1036968
8   com.apple.AppKit              	0x00007fff3a9a2d03 -[NSApplication(NSResponder) sendAction:to:from:] + 312
9   com.apple.AppKit              	0x00007fff3a9ffd73 -[NSMenuItem _corePerformAction] + 323
10  com.apple.AppKit              	0x00007fff3a9ffae6 -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] + 114
11  com.apple.AppKit              	0x00007fff3aa64152 -[NSMenu performActionForItemAtIndex:] + 133
12  com.apple.AppKit              	0x00007fff3aa640bd -[NSMenu _internalPerformActionForItemAtIndex:] + 94
13  com.apple.AppKit              	0x00007fff3aa63eeb -[NSCarbonMenuImpl _carbonCommandProcessEvent:handlerCallRef:] + 106
14  com.apple.AppKit              	0x00007fff3a9ce13d NSSLMMenuEventHandler + 902
 ...etc.

fvogel added on 2018-10-07 09:38:04:
Kevin, could you please report whether you are still seeing the crash you originally reported? Otherwise let's just close this ticket. Thanks!

stevenaaus added on 2017-08-19 22:28:59:
Yes... all text widgets from the widget demo run fine for me on El Capitan with snapshots of revised tktext from a few days ago.

(Log-in problem synopsis - i view the ticket page without logging in. Then i log in, and am redirected away from the ticket page. Using the browser history (firefox and safari were the same), i then go back to the ticket page and page refresh. This behaviour would normally work with most web sites and then keep me logged in and able to edit the page, but is not working for me here. Sorry for the hassle.. but obviously  i have sorted it out enough to be able to post. Cheers)

bll added on 2017-08-19 15:48:25:
Tested with 8.6.7 and the revised_text branch and no crashes in the widget demo.

bll added on 2017-08-19 15:11:26:
The login is acting very weird right now.
It complains I do not have permissions, I have to reload or re-sign in.
It's quite annoying.
I did change browsers to firefox.  Have to try again with chrome.

fvogel added on 2017-08-19 10:27:10:
I just tried to login as anonymous. Works.

I tried creating a new account, using the page available to everyone. Also works.

It's unclear to me whether Steven's issue is about creating an account or if it's about having more privileges.
If Steven still has issues please let's get in touch directly though email.

gcramer added on 2017-08-19 08:52:14:
He has written the following to me, I don't know more about this:

> So, I created an "Core" account, but can't seem to post to the bug reports, and might not have enough priviledges ?

I will tell him to try posting as "anonymous".

fvogel added on 2017-08-19 08:36:03:
> Steven Atkinson - developer of Scid vs PC, who has not the
> privileges for posting to bug reports

What do you mean?? Anybody can post in this tracker, at worse as anonymous. And if you want him to have a non-anonymous account don't you think you or he could just ask?

gcramer added on 2017-08-19 08:07:36:

This bug report seems to be out-of-date. Due to Steven Atkinson - developer of Scid vs PC, who has not the privileges for posting to bug reports - all the text widgets demos are running fine with [0c5839c9].


bll added on 2017-06-13 02:31:27:
Unable to duplicate on Mac OS X 10.12.5 with a clean copy of revised_text.

kevin_walzer added on 2017-06-12 22:25:18:
This is already based on the latest revision of revised_text, with Tcl_GuardedDecrRefCount() removed from tkTextLineBreak.c

gcramer added on 2017-06-12 21:16:08:
This look exactly like bug report [39e510f69e], which has been solved with [d349ffb168]. If you update to newest revision, is it possible to reproduce this error?