I am using perl 5.61 from ActiveState. I am using Win32::GUI .558 binary install from ActiveState.
The following is a modified code snippet that I took from a post in the Win32::GUI archived mailing list. The original post concerned crashing with a simple Win32::GUI and fork. I simplified the original and I also have an error when I click the button a few times in a row (sometimes its after 10, other times its after 3 clicks). I cannot understand why I am getting the page faults. The fork doesn't do anything whatsoever. Is this a problem with Win32::GUI and thread safety or is this a problem with perl's forking under windows? Thanks in advance for any assistance, Michael --------- use Win32::GUI; use Win32::API; my $win = Win32::GUI::Window->new ( -top => 0, -left => 0, -width => 200, -height => 200, -minsize => 200,200 -text => "Main", -name => "winMain", ); my $download = $win->AddButton( -text => "test", -left => 100, -top => 100, -height => 25, -name => "download", ); sub download_Click { $download->Disable(); if ($error=fork() ) {} else { $download->Enable(); exit(0); } return 1; } sub winMain_Terminate { $win->Hide(); return -1; } $win->Show (); Win32::GUI::Dialog();