I experience a Tcl crash under Windows 11 for almost every simple error.
A variable is not defined: Crash
A procedure is not defined: Crash
A namespace is not defined: Crash
By "Crash" I mean the program exits, closes.
Why is this happening?
Am 07.09.2025 um 20:56 schrieb meshparts:
I experience a Tcl crash under Windows 11 for almost every simple error.
A variable is not defined: Crash
A procedure is not defined: Crash
A namespace is not defined: Crash
By "Crash" I mean the program exits, closes.
Why is this happening?
I have no such experience. My application only exits on the exit command.
Sorry,
Harald
https://www.tcl-lang.org/man/tcl9.0/TkCmd/systray.html
Am 07.09.2025 um 21:17 schrieb Harald Oehlmann:
Am 07.09.2025 um 20:56 schrieb meshparts:
I experience a Tcl crash under Windows 11 for almost every simple error. >>>
A variable is not defined: Crash
A procedure is not defined: Crash
A namespace is not defined: Crash
By "Crash" I mean the program exits, closes.
Why is this happening?
I have no such experience. My application only exits on the exit command.
Sorry,
Harald
After long searching, I found out the reason for the crash.
I have a baground error handler (bgerror) that not only writes the error information to a file but also creates a system notification, as
supported by Tcl 9.
This seems to crash the Tcl/Tk app in most of the cases.
I suppose there are some things that are not allowed in a system notification message.
Here is the last example that causes the crash:
tk sysnotify Warning {*** START OF ERROR MESSAGE ***
bad index "": must be integer?[+-]integer? or end?[+-]integer?
*** ERROR INFO ***
bad index "": must be integer?[+-]integer? or end?[+-]integer?
while executing
"lsearch -nocase -start $start $values $value*"
(procedure "::ttk::combobox::CompleteEntry" line 33)
invoked from within
"::ttk::combobox::CompleteEntry .fkm.sw.sf.mf.cf.f3.e5 1 "
(command bound to event)
*** ERROR STACK ***
INNER:invokeStk1
CALL:::ttk::combobox::CompleteEntry .fkm.sw.sf.mf.cf.f3.e5 1
*** END OF ERROR MESSAGE ***}
* meshparts <[email protected]>System tray is kind of general concept. In Windows it's placed on the
| Here is the last example that causes the crash:
| tk sysnotify Warning {*** START OF ERROR MESSAGE ***
https://www.tcl-lang.org/man/tcl9.0/TkCmd/sysnotify.html
PLATFORM NOTES
Windows
The image is taken from the system tray, i.e., sysnotify can only be
called when a systray was installed.
I have no idea what a systray is, but did you install one?
https://www.tcl-lang.org/man/tcl9.0/TkCmd/systray.html
Agreed, Tk should not crash, but if the invocation of the error handler raises an error which calls the error handler which raises an error
which [repeat ad inf]...
R'
Am 08.09.2025 um 16:59 schrieb meshparts:
Am 07.09.2025 um 21:17 schrieb Harald Oehlmann:
Am 07.09.2025 um 20:56 schrieb meshparts:
I experience a Tcl crash under Windows 11 for almost every simple
error.
A variable is not defined: Crash
A procedure is not defined: Crash
A namespace is not defined: Crash
By "Crash" I mean the program exits, closes.
Why is this happening?
I have no such experience. My application only exits on the exit
command.
Sorry,
Harald
After long searching, I found out the reason for the crash.
I have a baground error handler (bgerror) that not only writes the
error information to a file but also creates a system notification, as
supported by Tcl 9.
This seems to crash the Tcl/Tk app in most of the cases.
I suppose there are some things that are not allowed in a system
notification message.
Here is the last example that causes the crash:
tk sysnotify Warning {*** START OF ERROR MESSAGE ***
bad index "": must be integer?[+-]integer? or end?[+-]integer?
*** ERROR INFO ***
bad index "": must be integer?[+-]integer? or end?[+-]integer?
while executing
"lsearch -nocase -start $start $values $value*"
(procedure "::ttk::combobox::CompleteEntry" line 33)
invoked from within
"::ttk::combobox::CompleteEntry .fkm.sw.sf.mf.cf.f3.e5 1 "
(command bound to event)
*** ERROR STACK ***
INNER:invokeStk1
CALL:::ttk::combobox::CompleteEntry .fkm.sw.sf.mf.cf.f3.e5 1
*** END OF ERROR MESSAGE ***}
lsearch -nocase -start {} {0 16 32 100 150 300} 1*
It says: the argument of "-start" may not be the empty string.
Unfortunately, it is. This is the index reform. See migration notes.
Take care,
Harald
…
The thing is, that Tcl crashes when I write the error trace to the
system tray. There is something in that message string that causes the crash.
Sysop: | DaiTengu |
---|---|
Location: | Appleton, WI |
Users: | 1,071 |
Nodes: | 10 (0 / 10) |
Uptime: | 57:32:27 |
Calls: | 13,744 |
Files: | 186,974 |
D/L today: |
1,119 files (393M bytes) |
Messages: | 2,421,332 |