Menu

#3018 [tk busy] causes crash on OS X/Cocoa

obsolete: 8.6b3
open
7
2012-10-01
2012-10-01
No

Per a bug reported on c.l.t by Christian Gollwitzer, the following code eventually causes a lockup and segfault on Tk-Aqua trunk. "The crash is triggered by first pressing the button, after it has 'finished', selecting the entry in the pulldown list of the combobox, maybe twice. Sometimes, this must be repeated several times."

package require Tk
pack [ttk::combobox .cbx1 -values {"Select to crash"}]
pack [ttk::frame .fr -width 200 -height 200]
pack [ttk::button .fr.button -text "Press me for processing" -command Doit]
pack [ttk::label .fr.prog -textvariable progress]

proc Doit {} {
tk busy hold .
for {set ::progress 0} {$::progress<100} {incr ::progress} {
after 10
update
}
tk busy forget .
}

Considering that busy is supposed to be no-op on Aqua, this is very strange indeed.

Discussion

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.