deadpickle has asked for the wisdom of the Perl Monks concerning the following question:
GLib-GObject-CRITICAL **: g_object_steal_qdata: assertion `G_IS_OBJECT + (object)' failed during global destruction. GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (obje +ct)' faile d during global destruction. GLib-GObject-CRITICAL **: g_object_steal_qdata: assertion `G_IS_OBJECT + (object)' failed, <GEN4> line 9 during global destruction. GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (obje +ct)' faile d, <GEN4> line 9 during global destruction.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Glib Errors on close
by Joost (Canon) on Feb 16, 2008 at 19:13 UTC | |
In other words, at line 37, right above the frobniz() function.
| [reply] |
by deadpickle (Pilgrim) on Feb 17, 2008 at 06:42 UTC | |
Attempt to free unreferenced scalar: SV 0x43314ac, Perl interpreter: 0x41083fc a
t GRRUVI-v0.45.pl line 133.
at GRRUVI-v0.45.pl line 133
and refers to the code lines: though the output is a little strange with it referring to line zero of the program. The threads are stopped by the join command. I wonder if the threads I have are being exited incorrectly? I'm not sure what this attempt to free unreferenced scalar is?!
| [reply] [d/l] [select] |
by Joost (Canon) on Feb 17, 2008 at 11:45 UTC | |
Given that you're using threads, it really could be either, but I would probably start by not using threads and see if the problem goes away. There really aren't many situations where threads are the best option (at least, not in perl).
| [reply] |
|
Re: Glib Errors on close
by plobsing (Friar) on Feb 16, 2008 at 18:06 UTC | |
What modules are you using? How is your perl configured? How do you expect us to fix anything with almost no information? It looks like you are having some errors at the C/XS level. There are tools for dealing with this such as gdb and valgrind. But I'm just guessing here. It could also be that you are mixing eventloops or using threads with something that doesn't play nice with threads. | [reply] |
|
Re: Glib Errors on close
by zentara (Cardinal) on Feb 17, 2008 at 17:28 UTC | |
at the top of your code? If that dosn't do it, you are probably setting up your threads improperly, and you need to show a complete working snippet to demonstrate the problem. Gtk2 tries to be better at thread clean-up than Tk, BUT it is not perfect. If you try to dynamically create threads from anywhere in your program, you are quite likely to hit problems. Your thread code contains some complex ssh and sftp code, and they may not be threadsafe, or you need to do cleanup on the ssh/sftp connection before closing the thread. Try putting simpler code in the sftp thread sub, and see if it works. Like just connect, get a dirlist, and disconnect. If it works, then start adding complexity and testing as you go. I'm not really a human, but I play one on earth. Cogito ergo sum a bum | [reply] [d/l] |