I agree with
tirwhan. I've seen that error quite often when doing initial prototypes of scripts using threads. You have to remember, that when you create a thread, it gets a complete copy of the parent, at the time of it's birth. So if you have a script that loads alot of modules, and creates a bunch of objects, THEN creates the threads, when the thread runs, there will be confusion between the parent's object, and the thread's copy. That's where the "double free" comes from, I believe, when the script tries to clean up an object when the thread exits, but a second copy exists. See
threads: spawn early to avoid the crush. and
Use thread with good care, but definitely keep using it
The Glib module tries to keep track of extra objects, to improve thread safety, with
#this line causes the warning, but dosn't die
die "Glib::Object thread safetly failed"
unless Glib::Object->set_threadsafe (TRUE);
so you may want to look into GLib, (which is the base object class for Gtk2, and works without X ).
The other thing to do, is try to keep your objects in the thread code block, don't create objects in the parent thread before the threads are created.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.