1

I'm confused by these two warnings. Can anyone explain how I might have come about triggering them, and how they would be able to be debugged in gdb?

(gtkworkbook:24668): GLib-GObject-CRITICAL **: g_cclosure_new: assertion `callback_func != NULL' failed

(gtkworkbook:24668): GLib-GObject-CRITICAL **: g_signal_connect_closure_by_id: assertion `closure != NULL' failed

2
  • I get these all the time... quite annoying. Commented Jul 16, 2009 at 17:15
  • What usually was the cause of the problem? Commented Jul 16, 2009 at 17:24

2 Answers 2

3

One thing you can try is pass in --g-fatal-warnings to Gtk::Main, this will cause warnings to assert. You can attach with gdb and maybe figure out some more detail about where this is failing.

Sign up to request clarification or add additional context in comments.

Comments

1

I found the problem.

This code was ported from an original implementation in C, and I had a requirement before to use an array of function pointers to call the functions inside of a shared library. Although this [seemed] to work at the time once I actually started using them it was not the case. I am a little stumped on why its not working, but I was able to centralized the problem to the following piece of code.

gtk_signal_connect (GTK_OBJECT (plugin()->workbook()->gtk_workbook), "switch-page",
 (GtkSignalFunc)this->signals[NOTEBOOK_SWITCHPAGE], plugin->workbook());

Was changed to the following:

gtk_signal_connect (GTK_OBJECT (plugin()->workbook()->gtk_workbook), "switch-page",
 (GtkSignalFunc)signal_gtknotebook_switchpage, plugin->workbook());

Now, the code compiles and I am not getting any nasty errors. I think this is the answer!

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.