From:  William Bardwell <>
Date:  05 Mar 2004 13:20:33 Hong Kong Time

gdk_rgb_init () crash in first mozilla use of graphics, missing init code?


I am working on a stand alone application using the mozilla libraries,
mostly do to do HTTP/HTTPS access, and I would like to let those
accesses pop-up dialog boxes when they want to (e.g. bad SSL
certs. or cookie issues), but my program seems to crash when
the netwerk code tries to do that.

I assume that there is some initialization code missing, but I don't 
understand what it would be...I do:
make an nsIComponentRegistrar
create the event queue, and then go into an event loop.

I tried adding making an AppShell, but that gives the same
crash during its Create() method.

I am using a semi-stock mozilla 1.5 build for the libraries and script.

What do I do to make this init-ing work right either on demand or
in the startup sequence of my program?

The crash is a SEGV:
#0  0x41e1381c in gdk_rgb_set_min_colors () from /usr/lib/
#1  0x41e13b26 in gdk_rgb_init () from /usr/lib/
#2  0x41f511be in _Xi18n_lock ()
    from components/
#3  0x40343e9a in NSGetModule ()
    from components/
#4  0x40344a0c in NSGetModule ()
    from components/
#5  0x40344487 in NSGetModule ()
    from components/
#6  0x41c8de62 in NSGetModule ()
    from components/
#7  0x41c8a39e in NSGetModule ()
    from components/
#8  0x4010f5c5 in XPTC_InvokeByIndex ()
#9  0x400fce61 in nsProxyObject::Post(unsigned, nsXPTMethodInfo*, 
nsXPTCMiniVariant*, nsIInterfaceInfo*) ()
#10 0x400f5750 in PL_HandleEvent ()
#11 0x400f69ab in nsEventQueueImpl::HandleEvent(PLEvent*) ()

William Bardwell