Welcome to the Monastery | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
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 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. I'm not really a human, but I play one on earth. Cogito ergo sum a bum In reply to Re: glibc error in linux
by zentara
|
|