Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: f1d151e68094b1879ebc2fe34c87bc01c6692608
Ticket: 3161787fffffffffffffffffffffffffffffffff
Unhandled exception with threaded itcl objects
User & Date: tombert on 2011-01-19 15:34:54
Changes

  1. assignee changed to: "andreas_kupries"
  2. cmimetype changed to: "text/plain"
  3. 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
    
    
  4. foundin changed to: "obsolete: 8.5.9"
  5. is_private changed to: "0"
  6. priority changed to: "5 Medium"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "tombert"
  10. subsystem changed to: "49. Threading"
  11. title changed to: "Unhandled exception with threaded itcl objects"
  12. type changed to: "Bug"