Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 65857

Summary: app-sci/celestia-1.3.2 segfault on startup with "USE=gnome"
Product: Gentoo Linux Reporter: Gregory McLean <gregm>
Component: Current packagesAssignee: Disenchanted (RETIRED) <morfic>
Severity: normal CC: gad.kadosh, magnade
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Package list:
Runtime testing required: ---

Description Gregory McLean 2004-09-29 16:22:38 UTC
(gdb) run
Starting program: /usr/bin/celestia
[Thread debugging using libthread_db enabled]
[New Thread 1100215152 (LWP 10535)]
nStars: 112524

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1100215152 (LWP 10535)]
0x410b0023 in strlen () from /lib/
(gdb) bt
#0  0x410b0023 in strlen () from /lib/
#1  0x080b8247 in readGConfMain(AppPreferences*) (p=0xbfffdde0)
    at char_traits.h:258
#2  0x080b82f1 in loadSavedPreferences(AppPreferences*) (p=0xbfffddb0)
    at gtkmain.cpp:3949
#3  0x080b8788 in main (argc=1, argv=0xbfffdea4) at gtkmain.cpp:4214

Reproducible: Always
Steps to Reproduce:
1. emerge celestia
2. celestia

Actual Results:  

Expected Results:  
application start

Portage 2.0.50-r11 (gcc34-x86-2004.2, gcc-3.4.2, glibc-,
System uname: 2.6.8-gentoo-r3 i686 Intel(R) Pentium(R) 4 CPU 2.40GHz
Gentoo Base System version 1.4.16
distcc 2.16 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632)
[disabled]Autoconf: sys-devel/autoconf-2.59-r4
Automake: sys-devel/automake-1.8.5-r1
CFLAGS="-O3 -march=i686 -fomit-frame-pointer -pipe"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown
/usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config
/usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/
/usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/
/usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O3 -march=i686 -fomit-frame-pointer -pipe"
FEATURES="autoaddcvs ccache nostrip sandbox"
USE="X acpi aim alsa arts avi berkdb bitmap-fonts calendar cdr crypt cups debug
divx4linux dvd dvdr emacs encode esd evo exif fam fftw flac foomaticdb ftp gd
gdbm gif gmp gnome gpm gstreamer gtk gtkhtml guile iconv imagemagick imlib
inifile java jikes jpeg libg++ libgda libwww lzo mad mbox mikmod mime ming mmap
mmx mng motif mozilla mpeg mysql mysqli ncurses nls nptl odbc offensive
oggvorbis openal opengl oscar oss pam pdflib perl pic png postgres ppds python
qt quicktime readline sasl scanner sdl shared sharedmem slang speex spell sse
sse2 ssl svg svga tcltk tcpd tetex tiff truetype usb videos wxwindows x86 xine
xinerama xml xml2 xmms xpm xprint xsl xv xvid zlib"
Comment 1 Gregory McLean 2004-09-29 16:33:26 UTC
emerging without gnome support 'fixes' the seg fault.
Comment 2 Bret Towe 2004-09-29 18:06:11 UTC
i just tried this and its working for me
what video card and xorg/xfree are you using?

from looks of backtrace it looks like its having a problem with loading
some prefs but i didnt know celestia had any to save...
if you can find out where that file is might try trashing it and see if it loads
Comment 3 Gregory McLean 2004-09-30 12:52:33 UTC
Using an Nvidia card, XOrg 6.8.0-r1

Here is what it is trying to load:
void readGConfMain(AppPreferences* p) {
        // This area should, in theory, have error checking
        p->winWidth = gconf_client_get_int(client, "/apps/celestia/winWidth", NULL);
        p->winHeight = gconf_client_get_int(client, "/apps/celestia/winHeight", NULL);
        p->winX = gconf_client_get_int(client, "/apps/celestia/winX", NULL);
        p->winY = gconf_client_get_int(client, "/apps/celestia/winY", NULL);
        p->ambientLight = gconf_client_get_float(client, "/apps/celestia/ambientLight", NULL);
        p->visualMagnitude = gconf_client_get_float(client, "/apps/celestia/visualMagnitude", NULL);
        p->showLocalTime = gconf_client_get_bool(client, "/apps/celestia/showLocalTime", NULL);
        p->hudDetail = gconf_client_get_int(client, "/apps/celestia/hudDetail", NULL);
        p->fullScreen = gconf_client_get_bool(client, "/apps/celestia/fullScreen", NULL);
        p->starStyle = (Renderer::StarStyle)gconf_client_get_int(client, "/apps/celestia/starStyle", NULL);
        p->altSurfaceName = gconf_client_get_string(client, "/apps/celestia/altSurfaceName", NULL);

I'm guessing its choaking on that p->atlSurfaceName bit as its not set.

 gconftool-2 -a /apps/celestia
 winWidth = 640
 winHeight = 480
 starStyle = 0
 altSurfaceName =
 winX = -1
 hudDetail = 1
 winY = -1
 ambientLight = 0.10000000149011612
 showLocalTime = true
 fullScreen = false
 visualMagnitude = 8.5

I don't understand enough about the code in celestia to know what its doing, trying to do. But looking at it:

        p->altSurfaceName = "";

        #ifdef GNOME

The string gets set to an empty string, then later looks like it gets NULL'd out. which strlen will barf on.

Beats me.

Comment 4 Bret Towe 2004-10-03 19:00:12 UTC
well i looked at my configuration info 
and it matchs yours
perhaps try --recursive-unset with gconftool on the celestia config items
and see if it loads then
or perhaps set a string for the altSurfaceName item and see if it works then
ill look over the code for this section in the mean time and see if i can setup a quick NULL check 
as i cant reproduce it after i make it ill have to have you test it if your still having the problem by then
Comment 5 Bret Towe 2004-10-11 18:17:18 UTC
hmm i notice your on 808 glibc snapshot
on another bug the user upgraded to the glibc snapshot 1006
perhaps this is also your problem

ill play with this idea on my test system also
Comment 6 gad.kadosh 2004-11-13 12:08:57 UTC
I'm having a segfault on celestia startup too. version 1.3.2.
I have a radeon 9000 IGP card if that matters.

My emerge info:

Portage 2.0.51-r3 (default-linux/x86/2004.3, gcc-3.3.4, glibc-, 2.6.9 i686)
System uname: 2.6.9 i686 Mobile Intel(R) Pentium(R) 4     CPU 2.40GHz
Gentoo Base System version 1.4.16
Autoconf: sys-devel/autoconf-2.59-r5
Automake: sys-devel/automake-1.8.5-r1
Binutils: sys-devel/binutils-
Headers:  sys-kernel/linux26-headers-
Libtools: sys-devel/libtool-1.5.2-r5
CFLAGS="-march=pentium4 -mcpu=pentium4 -O2 -pipe -fomit-frame-pointer -ftracer"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=pentium4 -mcpu=pentium4 -O2 -pipe -fomit-frame-pointer -ftracer"
FEATURES="autoaddcvs ccache distlocks sandbox sfperms"
USE="X acl acpi alsa avi berkdb bitmap-fonts cdr crypt cups dbus dvd encode f77 fam flac foomaticdb fortran gdbm gif gimpprint gnome gphoto2 gstreamer gtk gtk2 hal howl imagemagick imlib ipv6 java jpeg junit ldap libg++ libwww mad mikmod mmx mozilla mpeg ncurses nls nptl oggvorbis opengl pam pdflib perl pic png posix ppds python quicktime readline rtc samba scanner sdl spell sse sse2 ssl tcpd tiff truetype unicode usb userlocales x86 xml2 xv zlib"
Comment 7 Disenchanted (RETIRED) gentoo-dev 2005-01-27 18:49:27 UTC
is there still an issue i can still not reproduce any segfaults with USE=gnome
if anyone still has this issue i need feedback or else the bug will be closed in the next 24-48 hours
Comment 8 Gregory McLean 2005-01-28 18:21:59 UTC
Seems to be fixed with gnome 2.8.1
Comment 9 gad.kadosh 2005-01-29 00:39:32 UTC
works here fine indeed
Comment 10 Disenchanted (RETIRED) gentoo-dev 2005-02-06 14:17:15 UTC
some aweful long 48 hours later.....