Closed
Bug 215112
Opened 22 years ago
Closed 16 years ago
"./run-mozilla.sh viewer" crashes in GTK2 build because gtk was not initialised
Categories
(Core Graveyard :: Embedding: GTK Widget, defect)
Core Graveyard
Embedding: GTK Widget
Tracking
(Not tracked)
RESOLVED
INCOMPLETE
People
(Reporter: mark.phillips, Assigned: blizzard)
Details
(Keywords: crash)
Attachments
(1 file)
860 bytes,
patch
|
blizzard
:
review-
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.4) Gecko/20030701
Build Identifier: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.4) Gecko/20030804
The build is a gcc 3.3, non-CTL, GTK2 build.
Running "run-mozilla.sh", with no arguments, attempts to start the "viewer", but
it crashes because GTK2 was not initialised.
This bug appears to have been fixed for GTK1
(http://bonsai.mozilla.org/cvsview2.cgi?diff_mode=context&whitespace_mode=show&root=/cvsroot&subdir=mozilla/webshell/tests/viewer/unix/gtk&command=DIFF_FRAMESET&file=nsGtkMain.cpp&rev2=1.27&rev1=1.26),
but needs fixing for GTK2.
The fix is trivial, just apply the following patch:-
--- webshell/tests/viewer/unix/gtk2/nsGtkMain.cpp.orig 2003-08-05
10:34:33.285327000 +0100
+++ webshell/tests/viewer/unix/gtk2/nsGtkMain.cpp 2003-08-05 11:04:04.562907000
+0100
@@ -35,6 +35,8 @@
*
* ***** END LICENSE BLOCK ***** */
+#include <gtk/gtk.h>
+
#include "nsViewerApp.h"
#include "nsBrowserWindow.h"
#include "nsGtkMenu.h"
@@ -178,6 +180,11 @@
signal(SIGABRT, ah_crap_handler);
#endif // CRAWL_STACK_ON_SIGSEGV
+#ifdef MOZ_WIDGET_GTK
+ gtk_set_locale();
+#endif
+ gtk_init(&argc, &argv);
+
// Initialize XPCOM
nsresult rv = NS_InitXPCOM2(nsnull, nsnull, nsnull);
NS_ASSERTION(NS_SUCCEEDED(rv), "NS_InitXPCOM failed");
Reproducible: Always
Steps to Reproduce:
1. cd dist/bin
2. "./run-mozilla.sh" or "./run-mozilla.sh viewer"
3.
Actual Results:
Crash with glib2's gtype.cc complaining g_type_init had not been called.
Expected Results:
Not crashed:-)
about:buildconfig
Build platform
target
sparc-sun-solaris2.8
Build tools
Compiler Version Compiler flags
gcc gcc version 3.3 -pedantic -Wno-long-long -pthreads -pipe
c++ gcc version 3.3 -fno-rtti -fno-exceptions -pedantic -Wno-long-long
-fshort-wchar -pthreads -pipe -I/usr/openwin/include
Configure arguments
--verbose --prefix=/vol/fsf.sol/mozilla-1.4-gcc
--x-includes=/usr/openwin/include --x-libraries=/usr/openwin/lib
--with-default-mozilla-five-home=/vol/fsf.sol/mozilla-1.4-gcc --with-pthreads
--with-system-jpeg --with-system-zlib --with-system-png --with-system-mng
--enable-default-toolkit=gtk2 --enable-optimize --enable-freetype2
--enable-crypto --disable-postscript --enable-tests --enable-calendar
--enable-extensions=all --enable-svg
Reporter | ||
Comment 1•22 years ago
|
||
For the curious, the actual error log is as follows:-
./run-mozilla.sh
Type Manifest File: /work/src/mozilla-gtk2-no-ctl/dist/bin/components/xpti.dat
+++ JavaScript debugging hooks installed.
nsNativeComponentLoader: autoregistering begins.
nsNativeComponentLoader: autoregistering succeeded
nNCL: registering deferred (0)
(process:27268): GLib-GObject-CRITICAL **: gtype.c:1871: initialization
assertion failed, use g_type_init() prior to this function
(process:27268): Gdk-CRITICAL **: file gdkrgb.c: line 3521
(gdk_screen_get_rgb_visual): assertion `GDK_IS_SCREEN (screen)' failed
Segmentation Fault - core dumped
Oh no! ./viewer just dumped a core file.
Reporter | ||
Comment 2•22 years ago
|
||
Change Hardware and OS, because I can reproduce this on both Solaris and Linux
OS: SunOS → All
Hardware: Sun → All
Updated•22 years ago
|
Comment 3•22 years ago
|
||
==> gtk
Assignee: general → blizzard
Component: Browser-General → Embedding: GTK Widget
QA Contact: general → pavlov
Assignee | ||
Comment 4•22 years ago
|
||
Yikes, does anyone use viewer? I've never tried to get it working with gtk2
because I've had the embedding harness.
Reporter | ||
Comment 5•22 years ago
|
||
Actually I didn't intend to use it, just forgot to specify mozilla-bin after
run-mozilla.sh:-)
Still it should not crash.
On the other hand maybe mozilla-bin is a better default for the run-mozilla.sh
script?!
Comment 6•21 years ago
|
||
> Yikes, does anyone use viewer?
Everyone uses it when running the layout regression tests, don't they? ;-)
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 7•21 years ago
|
||
Updated•21 years ago
|
Attachment #142554 -
Flags: review?(blizzard)
Assignee | ||
Comment 8•21 years ago
|
||
Comment on attachment 142554 [details] [diff] [review]
Mark's patch
I'm going to deny this because I don't think we're going to be maintaining
viewer at all going forward. In fact, I think we're actively trying to remove
it at this point.
Attachment #142554 -
Flags: review?(blizzard) → review-
Comment 9•21 years ago
|
||
How am I supposed to run the layout regression tests then?
Also, I find it invaluable to be able to dump the frame tree etc. from the
menus in Viewer - are there any plans for a replacement for Viewer or will
these debug features be rolled into [a debug build of] Mozilla?
Build with "--enable-extensions=default,layout-debug", and run "./mozilla
-layoutdebug"
Updated•16 years ago
|
QA Contact: pavlov → gtk-widget
Updated•16 years ago
|
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → INCOMPLETE
Updated•13 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•