RESOLVED FIXED Bug 81977
WebKitWebView signals with GError parameters cause crashes when using GObject Introspection
https://bugs.webkit.org/show_bug.cgi?id=81977
Summary WebKitWebView signals with GError parameters cause crashes when using GObject...
Gary Kramlich
Reported 2012-03-22 15:24:59 PDT
If you connect to the WebKetWebView::load-error or WebKitWebView::resource-load-error signals when using WebKit-3.0.typelib your program will crash upon signal emission for those 2 signals with the following error: CRITICAL **: Converting of type 'void' is not implemented This is because the closures for both signals call out the GError parameter as a pointer when it should be specified as a GBoxed type. For reference, GError was made a boxed type in Gtk 2.26. There should be no issues with existing C/C++ code since the pointer that is passed from the signal is type casted back into a GError in the callback function. I will be uploading a patch shortly which resolves the issue by adding 2 closures and changing the type's passed to g_signal_new. I have verified the changes manually but I can provide example code if needed.
Attachments
Patch (2.97 KB, patch)
2012-03-22 15:27 PDT, Gary Kramlich
mrobinson: review+
mrobinson: commit-queue-
Gary Kramlich
Comment 1 2012-03-22 15:27:25 PDT
Martin Robinson
Comment 2 2012-03-25 21:57:07 PDT
We still support versions of GTK+ older than 2.26, so I do not think we can merge this change as-is. Perhaps we could make the defintion of these signals a compile-time decision.
Martin Robinson
Comment 3 2012-03-25 21:58:21 PDT
Comment on attachment 133364 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=133364&action=review > Source/WebKit/gtk/ChangeLog:5 > + Added marshallers for BOOLEAN:OBJECT,STRING,BOXED and VOID:OBJECT,OBJECT,BOXED and changed the signal signatures for WebKitWebView::load-fail and WebKitWebView::resource-load-failed to use the new marshallers since GError has been a GBoxed type since Gtk 2.26. This fixes these signals for the gobject-introspection bindings. > + https://bugs.webkit.org/show_bug.cgi?id=81977 > + I really appreciate you including a ChangeLog for this change. In the future, it's better to generate the ChangeLog with Tools/Scripts/prepare-ChangeLogs and to put the long-form description below the "Revied by..." line.
Martin Robinson
Comment 4 2012-03-25 22:05:03 PDT
Comment on attachment 133364 [details] Patch Of course, the GLib version is the one that matters here, so this patch is fine. :)
Gary Kramlich
Comment 5 2012-03-25 22:07:05 PDT
Yeah sorry about the confusion, clearly I *meant* glib :) Also I used "webkit-patch upload" as mentioned at http://www.webkit.org/coding/contributing.html. I'll use the other one in the future! Thanks.
Martin Robinson
Comment 6 2012-03-26 09:25:04 PDT
Note You need to log in before you can comment on or make changes to this bug.