After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 745065 - GtkPrintOperation dialog creation fails when GTK is locally loaded
GtkPrintOperation dialog creation fails when GTK is locally loaded
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
3.14.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2015-02-24 05:22 UTC by Scott Talbert
Modified: 2015-03-05 01:45 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Scott Talbert 2015-02-24 05:22:44 UTC
When GTK+ is loaded locally, ie, with dlopen(xxx, RTLD_LOCAL), gtk_print_operation_run() fails with:

Gtk-CRITICAL **: Error building template class 'GtkPrintUnixDialog' for an instance of type 'GtkPrintUnixDialog': Invalid object type `GtkPrinterOptionWidget' on line 567

This is because the dlsym() lookup for gtk_printer_option_widget_get_type fails.

This is similar to the problem report in bug #710096.  It seems that either the gtkprinteroptionwidget.c should get added to gtktypefuncs.c, or GtkPrintUnixDialog should have a g_type_ensure for GtkPrinterOptionWidget.
Comment 1 Scott Talbert 2015-03-04 04:21:53 UTC
Would you consider adding a g_type_ensure(GTK_TYPE_PRINTER_OPTION_WIDGET) just for this case because it is a private type that I can't do a g_type_ensure() for externally.  Calling gtk_test_register_all_types() doesn't load it either.
Comment 2 Matthias Clasen 2015-03-04 11:38:58 UTC
yes
Comment 3 Matthias Clasen 2015-03-04 11:39:41 UTC
it should probably go in the class init of GtkPrintUnixDialog
Comment 4 Scott Talbert 2015-03-05 01:45:56 UTC
Thanks.  Do you mind cherry-picking to 3.14 also?