Hello,
 
If this is your program...
 
###############################
use Win32::GUI;
use threads;
 
$W = new GUI::Window(
    -title    => "Window",
    -left     => 100,
    -top      => 100,
    -width    => 550,
    -height   => 300,
    -name     => "Window",
) or print_and_die("new Window");
 
sub test
{
  threads->yield();
  sleep(1);
}
 
$thread = threads->new(\&test);
 
$W->Show;
Win32::GUI::Dialog();
 
$thread->join();
################################
 
...it crashes rather nastily. (Windows crash popup)
And you get the following perl error message: 
'Free to wrong pool 1a415d0 not 224ce8 at C:/Perl/site/lib/Win32/GUI.pm
line 3158
 during global destruction.'
 
It does not crash if you either:
1. comment out the Window creation
(Which makes sense as line 3158 is a Win32::GUI::DestroyWindow
statement)
 
2.comment out the $thread->join()... 
(?)
 
Still this seems to be the way to go, what am I missing?
 
I'm using ActivePerl 5.8.4
Frans
 
 
 

Reply via email to