This tracker is a copy from https://sourceforge.net/tracker/?func=detail&atid=110894&aid=3161787&group_id=10894 on request from sebres:
I run into this from a "bigger" application where I did call an unknown method from an itcl object - doing this several times the application crashes with an unhandled exception. The small example I posted below brings up an "unable to realloc xxxxx bytes" before but then crashes in the same manner. So I assume it's something with the error propagation between the threads ...
How to reproduce: source the two procedures and call dotest from the console several times - sometimes it crashes on first call, sometimes I need to call it three times.
Environment used: Windows XP, TCL 8.5.9, Thread 2.6.7, Itcl 3.4
proc thread_procCrash {args} {
thread::send -async $::tid [concat testObj unkowncommand]
}
proc dotest {} {
package re Thread
set ::tid [thread::create {thread::wait}]
## create initial shared variables
puts $::tid
foreach package {Itcl} {thread::send $::tid [list package require $package]}
foreach import {itcl::*} {thread::send $::tid [list namespace import $import]}
thread::send $::tid {class TestClass {
public method z {} {expr 1+1}
public method a {} {expr 1+1}
public method b {} {expr 1+1}
public method c {} {expr 1+1}
public method d {} {expr 1+1}
public method e {} {expr 1+1}
public method f {} {expr 1+1}
public method g {} {expr 1+1}
public method h {} {expr 1+1}
public method i {} {expr 1+1}
public method j {} {expr 1+1}
public method k {} {expr 1+1}
public method l {} {expr 1+1}
public method m {} {expr 1+1}
public method n {} {expr 1+1}
public method o {} {expr 1+1}
public method p {} {expr 1+1}
public method q {} {expr 1+1}
public method r {} {expr 1+1}
public method s {} {expr 1+1}
public method t {} {expr 1+1}
public method u {} {expr 1+1}
public method v {} {expr 1+1}
public method w {} {expr 1+1}
public method x {} {expr 1+1}
public method y {} {expr 1+1}
public variable hello {}}
}
thread::send $::tid {TestClass testObj}
for {set index 0} {$index < 100000} {incr index} {thread_procCrash}
}
thx for your support
I can only handle 4.0 bugs, sorry. I don't know who is taking care of 3.4 bugs.