in reply to Re^2: segmentation fault while using thread and gtk2
in thread segmentation fault while using thread and gtk2

For the pattern and other tips see Re: Win32::GUI window freezing, even with threading., Re: Win32::GUI window freezing, even with threading. (win32-gui-tk-thread-dequeue.pl, Thread::Queue::popnow/push),

can't share Tk mainwondow between threads, Re^3: Threads and TCL DeleteInterpProc, Re^3: Using MCE to write to multiple files. with commentary on the complexity at Re^4: Using MCE to write to multiple files.

for more stuff to sift through see ?node_id=3989;BIT=use%20thread%3BTk;BIS=%3B;a=%5BAnonymous%20Monk%5D%5Bzentara%5D%5BBrowserUk%5D

Maybe simply adding

Glib::Object->set_threadsafe (1); use Gtk2 qw/-init -threads-init/;
could make your program magically work ... its better strategy to have a gui thread and a background worker thread