Overview
| Artifact ID: | faaf23ea62c722a86b476ff14cfda7c9256cfd77a6b2e2e974f7ecca430a88af |
|---|---|
| Ticket: | 3161787fffffffffffffffffffffffffffffffff
Unhandled exception with threaded itcl objects |
| User & Date: | sebres on 2018-01-10 21:01:18 |
Changes
- assignee changed to: "aku"
- closedate changed to: "2458129.37590385"
- closer changed to: "sebres"
- comment changed to:
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 - icomment:
Seems to be itcl-issue (possible solved with suggested patch), so I close it here.
- login: "sebres"
- mimetype: "text/plain"
- resolution changed to: "Out of Date"
- severity changed to: "Minor"
- status changed to: "Closed"