[Bug 259292] Re: file-browser-applet crashed with SIGSEGV in g_cclosure_marshal_VOID()
Axel von Bertoldi
bertoldia at gmail.com
Mon Mar 16 16:19:17 UTC 2009
OK, I think(hope) I found and fixed the problem. I was defining the new
signal as follows:
applet_preferences_signals [PREFS_CHANGED] =
g_signal_new ("prefs_changed",
G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (AppletPreferencesClass, prefs_changed),
NULL,
NULL,
g_cclosure_marshal_VOID__INT,
G_TYPE_NONE,
1,
G_TYPE_POINTER);
where the prefs_changed is:
void (*prefs_changed)(AppletPreferences *a_prefs,
PrefsChangedSignalData *signal_data)
I see two problems:
1) g_cclosure_marshal_VOID__INT should be
g_cclosure_marshal_VOID__POINTER since the signal data type is not int,
but PrefsChangedSignalData*. The signal creation should then be
applet_preferences_signals [PREFS_CHANGED] =
g_signal_new ("prefs_changed",
G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (AppletPreferencesClass, prefs_changed),
NULL,
NULL,
g_cclosure_marshal_VOID__POINTER,
G_TYPE_NONE,
1,
G_TYPE_POINTER);
2) The signature we actually want for the callback function is
void (AppletPreferences*, PrefsChangedSignalData*, gpointer)
not
void (AppletPreferences*, PrefsChangedSignalData*)
so prefs_changed should be
void (*prefs_changed)(AppletPreferences *a_prefs, PrefsChangedSignalData *signal_data, gpointer user_data);
Make sense? Am I understanding the second and forth arguments correctly?
In any case, its curious that the program compiled and that this problem
only seems to show up when putting together/testing a version of Ubuntu.
I guess that's what testing and Q.A. is for. Are there any GTK DEBUG
flags that I should turn on as a dev?
Fix is in svn.
a.
--
file-browser-applet crashed with SIGSEGV in g_cclosure_marshal_VOID()
https://bugs.launchpad.net/bugs/259292
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
--
ubuntu-bugs mailing list
ubuntu-bugs at lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
More information about the universe-bugs
mailing list