Closed Bug 273777 Opened 20 years ago Closed 19 years ago

Crash when starting sunbird

Categories

(Calendar :: General, defect)

x86
Linux
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: juergen.mangler, Assigned: mostafah)

References

Details

Attachments

(2 files)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041128 Firefox/1.0 (Debian package 1.0-4)
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041128 Firefox/1.0 (Debian package 1.0-4)

A crash occurs when starting sunbird, with version downloaded from nightly and
with a self-compiled version. Works fine when using a non gtk2 version.



Reproducible: Always
Steps to Reproduce:
1. ./sunbird
Actual Results:  
Segmentation Fault.

Expected Results:  
It should work :-)

(process:7802): GLib-GObject-CRITICAL **: gtype.c:2254: initialization assertion
failed, use IA__g_type_init() prior to this function

(process:7802): Gdk-CRITICAL **: gdk_screen_get_rgb_visual: assertion
`GDK_IS_SCREEN (screen)' failed
./run-mozilla.sh: line 131:  7802 Segmentation fault      "$prog" ${1+"$@"}

Does this mean something with gdk is wrong?

pkg-config gdk-x11-2.0 --modversion says: 2.5.6
I have got the same problem :
/usr/local/lib/sunbird-0.2b/run-mozilla.sh: line 423: 10937 Segmentation fault 
    (core dumped) "$prog" ${1+"$@"}

With nigthly build or with cvs version.
pkg-config gdk-x11-2.0 --modversion
2.6.0
I have got the same problem :
/usr/local/lib/sunbird-0.2b/run-mozilla.sh: line 423: 10937 Segmentation fault 
    (core dumped) "$prog" ${1+"$@"}

With nigthly build or with cvs version.
pkg-config gdk-x11-2.0 --modversion
2.6.0

If I try gdb /usr/local/lib/sunbird-0.2b/sunbird-bin core.30578. 
I have got the following :
GNU gdb 5.2.1-2mdk (Mandrake Linux)
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i586-mandrake-linux-gnu"...
Core was generated by `/usr/local/lib/sunbird-0.2b/sunbird-bin'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/local/lib/sunbird-0.2b/libmozjs.so...done.
Loaded symbols for /usr/local/lib/sunbird-0.2b/libmozjs.so
Reading symbols from /usr/local/lib/sunbird-0.2b/libxpcom.so...done.
Loaded symbols for /usr/local/lib/sunbird-0.2b/libxpcom.so
Reading symbols from /usr/local/lib/sunbird-0.2b/libxpcom_core.so...done.
Loaded symbols for /usr/local/lib/sunbird-0.2b/libxpcom_core.so
Reading symbols from /usr/local/lib/sunbird-0.2b/libplds4.so...done.
Loaded symbols for /usr/local/lib/sunbird-0.2b/libplds4.so
Reading symbols from /usr/local/lib/sunbird-0.2b/libplc4.so...done.
Loaded symbols for /usr/local/lib/sunbird-0.2b/libplc4.so
Reading symbols from /usr/local/lib/sunbird-0.2b/libnspr4.so...done.
Loaded symbols for /usr/local/lib/sunbird-0.2b/libnspr4.so
Reading symbols from /lib/libpthread.so.0...done.
Loaded symbols for /lib/libpthread.so.0
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /usr/lib/libgtk-x11-2.0.so.0...done.
Loaded symbols for /usr/lib/libgtk-x11-2.0.so.0
Reading symbols from /usr/lib/libgdk-x11-2.0.so.0...done.
Loaded symbols for /usr/lib/libgdk-x11-2.0.so.0
Reading symbols from /usr/lib/libatk-1.0.so.0...done.
Loaded symbols for /usr/lib/libatk-1.0.so.0
Reading symbols from /usr/lib/libgdk_pixbuf-2.0.so.0...done.
Loaded symbols for /usr/lib/libgdk_pixbuf-2.0.so.0
Reading symbols from /usr/lib/libpangoxft-1.0.so.0...done.
Loaded symbols for /usr/lib/libpangoxft-1.0.so.0
Reading symbols from /usr/lib/libpangox-1.0.so.0...done.
Loaded symbols for /usr/lib/libpangox-1.0.so.0
Reading symbols from /usr/lib/libpango-1.0.so.0...done.
Loaded symbols for /usr/lib/libpango-1.0.so.0
Reading symbols from /usr/lib/libgobject-2.0.so.0...done.
Loaded symbols for /usr/lib/libgobject-2.0.so.0
Reading symbols from /usr/lib/libgmodule-2.0.so.0...done.
Loaded symbols for /usr/lib/libgmodule-2.0.so.0
Reading symbols from /usr/lib/libglib-2.0.so.0...done.
Loaded symbols for /usr/lib/libglib-2.0.so.0
Reading symbols from /usr/X11R6/lib/libX11.so.6...done.
Loaded symbols for /usr/X11R6/lib/libX11.so.6
Reading symbols from /lib/libm.so.6...done.
Loaded symbols for /lib/libm.so.6
Reading symbols from /usr/lib/libstdc++.so.5...done.
Loaded symbols for /usr/lib/libstdc++.so.5
Reading symbols from /lib/libgcc_s.so.1...done.
Loaded symbols for /lib/libgcc_s.so.1
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /usr/X11R6/lib/libXrandr.so.2...done.
Loaded symbols for /usr/X11R6/lib/libXrandr.so.2
Reading symbols from /usr/X11R6/lib/libXinerama.so.1...done.
Loaded symbols for /usr/X11R6/lib/libXinerama.so.1
Reading symbols from /usr/X11R6/lib/libXext.so.6...done.
Loaded symbols for /usr/X11R6/lib/libXext.so.6
Reading symbols from /usr/X11R6/lib/libXft.so.2...done.
Loaded symbols for /usr/X11R6/lib/libXft.so.2
Reading symbols from /usr/lib/libfreetype.so.6...done.
Loaded symbols for /usr/lib/libfreetype.so.6
Reading symbols from /usr/X11R6/lib/libXrender.so.1...done.
Loaded symbols for /usr/X11R6/lib/libXrender.so.1
Reading symbols from /lib/libfontconfig.so.1...done.
Loaded symbols for /lib/libfontconfig.so.1
Reading symbols from /usr/X11R6/lib/libXcursor.so.1...done.
Loaded symbols for /usr/X11R6/lib/libXcursor.so.1
Reading symbols from /usr/lib/libpangoft2-1.0.so.0...done.
Loaded symbols for /usr/lib/libpangoft2-1.0.so.0
Reading symbols from /usr/lib/libexpat.so.0...done.
Loaded symbols for /usr/lib/libexpat.so.0
Reading symbols from /lib/libz.so.1...done.
Loaded symbols for /lib/libz.so.1
Reading symbols from /usr/X11R6/lib/X11/locale/lib/common/xlcDef.so.2...done.
Loaded symbols for /usr/X11R6/lib/X11/locale/lib/common/xlcDef.so.2
Reading symbols from /lib/libnss_files.so.2...done.
Loaded symbols for /lib/libnss_files.so.2
#0  0x405fd954 in free_pending_nulls (context=0x8059100, perform_nulls=1) at
goption.c:1031
1031		      *(n->ptr)[0] = '-';	      
(gdb) 

Try to get a stacktrace from gdb, and attach it here.
I have made this trace with :
gdb /usr/local/lib/sunbird-0.2b/sunbird-bin core.8708
Is it wath you need?
No, but it almost is :)
on the gdb prompt, use the bt command.
I have got this :
#0  0x405fd954 in free_pending_nulls (context=0x8059100, perform_nulls=1) at
goption.c:1031
#1  0x405fdaa6 in g_option_context_parse (context=0x8059100, argc=0x8057b40,
argv=0x8057b44, error=0x0) at goption.c:1351
#2  0x40318260 in gtk_parse_args (argc=0x8057b40, argv=0x8057b44) at gtkmain.c:668
#3  0x403182a0 in gtk_init_check (argc=0x8057b40, argv=0x8057b44) at gtkmain.c:699
#4  0x403182f0 in gtk_init (argc=0x8057b40, argv=0x8057b44) at gtkmain.c:737
#5  0x0804f218 in xre_main(int, char**, nsXREAppData const*) ()
#6  0x0804b2ee in main ()
#7  0x408154ad in __libc_start_main () from /lib/libc.so.6
Michiel,
Sorry for the message with the attached file but i realy need a calendar working
on my linux box!
I now trying to upgrade the glic package (hard work for me).
Do you think this could be a solution?
Thx
Looks more like a gtk problem. There is no sunbird code in that stack.

Or something doesn't like the wacky arguments hacks at
http://lxr.mozilla.org/seamonkey/source/calendar/sunbird/app/nsCalendarApp.cpp#59
(In reply to comment #8)
> Looks more like a gtk problem. There is no sunbird code in that stack.
> 
> Or something doesn't like the wacky arguments hacks at
> http://lxr.mozilla.org/seamonkey/source/calendar/sunbird/app/nsCalendarApp.cpp#59

What do you mean by wacky?
If it really is commandline handling, it should be fixed with bug 276588.

In the meantime, you can try to replace
http://lxr.mozilla.org/seamonkey/source/calendar/sunbird/app/nsCalendarApp.cpp#72
with a proper strcpy.
Depends on: 276588
Just to annotate that nothing changed with 0.2

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1220161408 (LWP 6772)]
0xb7a2fc25 in g_option_context_add_main_entries () from /usr/lib/libglib-2.0.so.0
(gdb) bt
#0  0xb7a2fc25 in g_option_context_add_main_entries () from
/usr/lib/libglib-2.0.so.0
#1  0xb7a2fdea in g_option_context_parse () from /usr/lib/libglib-2.0.so.0
#2  0xb7cacd2f in gtk_parse_args () from /usr/lib/libgtk-x11-2.0.so.0
#3  0xb7cacd62 in gtk_init_check () from /usr/lib/libgtk-x11-2.0.so.0
#4  0xb7cacda5 in gtk_init () from /usr/lib/libgtk-x11-2.0.so.0
#5  0x08659925 in nsPrintSession::QueryInterface ()
#6  0x0807313b in ?? ()
#7  0x00000002 in ?? ()
#8  0xbffff5c0 in ?? ()
#9  0x0868e6e0 in _IO_stdin_used ()
#10 0x08063985 in ?? ()
#11 0xb76cc7bc in ?? () from /lib/libgcc_s.so.1
#12 0x08844028 in ?? ()
#13 0x000f4240 in ?? ()
#14 0x0068e600 in ?? ()
#15 0xbffff833 in ?? ()
#16 0x0868e688 in _IO_stdin_used ()
#17 0x00000000 in ?? ()
#18 0xbffff5d8 in ?? ()
#19 0xb75c8918 in __cxa_atexit () from /lib/tls/libc.so.6
#20 0xb75b38c7 in __libc_start_main () from /lib/tls/libc.so.6
#21 0x08073011 in ?? ()
(gdb)
I get the same as in comment #11 using version 0.2 on Debian Unstable
I had the same problem with Debian unstable and libgtk2.0 version 2.6.2
installed. When downgrading gtk2 to version 2.4.14 sunbird just works fine. 

Jens
Hello all,

I'm running Debian unstable to (GLib 2.6.2) and I think I found a fix for the
problem. 

in main(), sunbird inserts "-calender" into what it passes to xre_main as argv.
This string is a literal and as that, read-only. GLib > 2.4 has a changed option
handling and might want to write into options if it cannot parse them. Now
-calender appears to GLib like -c -a -l etc. and due to some magic I do not have
the need to understand, it tries to write to the string in free_pending_nulls()
(goption.c, somewhere around line 1000). The fix for that is to assign a copy a
"-calendar" to the new argv, patch included.

The reason for the other stack traces being wrong is the missing -dbg libs for
glib - tricked me first, too; it's not possible to get a meaningful backtrace
without them.

greetings

Torsten
Attached patch Patched mentionend in #14 — — Splinter Review
Comment on attachment 174614 [details] [diff] [review]
Patched mentionend in #14

thanks for the patch,
unfortunately
>+  char *cal = (char*)malloc(10);
this can fail
>+  strncpy(cal, "-calendar", 10);
and then this will crash.
Attachment #174614 - Flags: first-review-
Also, this should be fixed on trunk, since the commandline handling has changed.
Now the hack to add -calendar isn't needed anymore.
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.7.5)
Gecko/20041108 Firefox/1.0
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.8a5) Gecko/20050203
Mozilla Sunbird/0.2

When I launch Sunbird 0.2 final GTK2+XFT, it's crach with this message :
./run-mozilla.sh: line 423:  7728 Erreur de segmentation  "$prog" ${1+"$@"}

And I found the problem, it's that Sunbird crash with GTK+ 2.6.2 (and I think
all the 2.6.x), I must reinstall the version 2.4 (I install with .deb) and with
the version 2.4 I have no problem.

But thunderbird and firefox 1.0 work with no problem with GTK+ 2.6.2. So it's
just a problem from sunbird.

Reproducible: Always
*** Bug 282911 has been marked as a duplicate of this bug. ***
Can we have a nightly build with the fix? I think this is quite a major
showstopper for 0.2 adoption.
should be fixed on trunk now
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → WORKSFORME
It may be fixed on the trunk, but sunbird 0.2 is still shipping with this
glaring bug three months later. Is there any intention to release a fix?
The bugspam monkeys have been set free and are feeding on Calendar :: General. Be afraid for your sanity!
QA Contact: gurganbl → general
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: