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 660579 - FTBFS: libyelp-scan segfaults when when no dbus session running
FTBFS: libyelp-scan segfaults when when no dbus session running
Status: RESOLVED FIXED
Product: yelp
Classification: Applications
Component: Crashers
3.2.x
Other Linux
: Normal major
: ---
Assigned To: Yelp maintainers
Yelp maintainers
Depends on:
Blocks:
 
 
Reported: 2011-09-30 17:10 UTC by Michael Biebl
Modified: 2012-01-20 20:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Pass &error to g_bus_get_sync () so it is set when used later (913 bytes, patch)
2011-10-01 04:54 UTC, Michael Biebl
accepted-commit_now Details | Review

Description Michael Biebl 2011-09-30 17:10:14 UTC
Version: 3.2.0

When compiling yelp with --enable-gtk-doc in build chroot (no X or dbus session),
the build fails:


gtk-doc: Linking scanner
libtool: link: gcc -Wall -Wno-uninitialized -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-sign-compare -Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-sign-compare -g -O2 .libs/libyelp-scan.o -pthread -o .libs/libyelp-scan  -lbz2 -llzma /usr/lib/libexslt.so /usr/lib/libxslt.so /usr/lib/libxml2.so /usr/lib/libsqlite3.so -lwebkitgtk-3.0 -lgtk-3 -lsoup-2.4 -lgdk-3 /usr/lib/i386-linux-gnu/libatk-1.0.so /usr/lib/libcairo-gobject.so -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 /usr/lib/libcairo.so -lpango-1.0 /usr/lib/i386-linux-gnu/libfreetype.so -lfontconfig /usr/lib/libgio-2.0.so /usr/lib/libgobject-2.0.so /usr/lib/libgmodule-2.0.so /usr/lib/libgthread-2.0.so -lrt /usr/lib/libglib-2.0.so ../../libyelp/.libs/libyelp.so -pthread 
gtk-doc: Running scanner libyelp-scan

(process:17131): Gtk-CRITICAL **: gtk_icon_theme_get_for_screen: assertion `GDK_IS_SCREEN (screen)' failed
Segmentation fault
Scan failed: 
make[3]: *** [scan-build.stamp] Error 139
make[3]: Leaving directory `/tmp/buildd/yelp-3.2.0/docs/libyelp'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/tmp/buildd/yelp-3.2.0/docs'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/buildd/yelp-3.2.0'
make: *** [all] Error 2

Running inside gdb, I get:

(gdb) run
Starting program: /tmp/buildd/yelp-3.2.0/docs/libyelp/.libs/libyelp-scan 
[Thread debugging using libthread_db enabled]
[New Thread 0xb4370b70 (LWP 17222)]
[New Thread 0xb3a0cb70 (LWP 17223)]

(process:17219): Gtk-CRITICAL **: gtk_icon_theme_get_for_screen: assertion `GDK_IS_SCREEN (screen)' failed

Program received signal SIGSEGV, Segmentation fault.
0xb5e38c37 in yelp_settings_constructed (object=0x8072038) at yelp-settings.c:255
255	        g_warning ("Unable to connect to dbus: %s", error->message);
(gdb) bt full
  • #0 yelp_settings_constructed
    at yelp-settings.c line 255
  • #1 g_object_newv
    at /build/buildd-glib2.0_2.28.6-1-i386-A3fp41/glib2.0-2.28.6/./gobject/gobject.c line 1507
  • #2 g_object_new_valist
    at /build/buildd-glib2.0_2.28.6-1-i386-A3fp41/glib2.0-2.28.6/./gobject/gobject.c line 1596
  • #3 g_object_new
    at /build/buildd-glib2.0_2.28.6-1-i386-A3fp41/glib2.0-2.28.6/./gobject/gobject.c line 1311
  • #4 yelp_settings_get_default
    at yelp-settings.c line 446
  • #5 yelp_view_class_init
    at yelp-view.c line 362
  • #6 yelp_view_class_intern_init
    at yelp-view.c line 173
  • #7 type_class_init_Wm
    at /build/buildd-glib2.0_2.28.6-1-i386-A3fp41/glib2.0-2.28.6/./gobject/gtype.c line 2216
  • #8 g_type_class_ref
    at /build/buildd-glib2.0_2.28.6-1-i386-A3fp41/glib2.0-2.28.6/./gobject/gtype.c line 2916
  • #9 get_object_types
    at libyelp-scan.c line 64
  • #10 main
    at libyelp-scan.c line 120

Comment 1 Michael Biebl 2011-10-01 02:37:36 UTC
(In reply to comment #0)
> yelp-settings.c:255
> 255            g_warning ("Unable to connect to dbus: %s", error->message);

Inside the build chroot, no dbus session bus was running and DISPLAY is not set.

Running "dbus-launch make" makes libyelp-scan finish successfully.

This is obviously only a workaround and no solution.

The package should be buildable without a running dbus session bus.
Comment 2 Michael Biebl 2011-10-01 04:54:43 UTC
Created attachment 197939 [details] [review]
Pass &error to g_bus_get_sync () so it is set when used later
Comment 3 Michael Biebl 2012-01-10 00:12:11 UTC
ping?
Comment 4 Shaun McCance 2012-01-10 01:03:08 UTC
Sorry, missed this. Patch is pretty obvious. Please push to master.
Comment 5 Michael Biebl 2012-01-10 02:15:57 UTC
(In reply to comment #4)
> Sorry, missed this. Patch is pretty obvious. Please push to master.

Done