-On [20000404 00:05], Lars Clausen ([EMAIL PROTECTED]) wrote:
>
>Ok, a shot in the dark (Alex may know more about this): the gdk_rgb_init()
>call in app_init() in app/app_procs.c appears after the gdk_imlib_init()
>call. Possibly that's not a good thing. Could you try moving this up
>(since you can recreate the error)? Do you use Gnome or not?
OK, gdk_imlib_init() is called from dia_image.c in the lib directory.
So in app_procs.c I would need to place gdk_rgb_init() above the
dia_image_init().
So I thought something like this:
#ifdef GNOME
gnome_init_with_popt_table(PACKAGE, VERSION, argc, argv, options,
0, &poptCtx);
client = gnome_master_client();
if(client == NULL) {
g_warning(_("Can't connect to session manager!\n"));
}
else {
gtk_signal_connect(GTK_OBJECT (client), "save_yourself",
GTK_SIGNAL_FUNC (save_state), NULL);
gtk_signal_connect(GTK_OBJECT (client), "die",
GTK_SIGNAL_FUNC (session_die), NULL);
}
#else
#ifdef HAVE_POPT
poptCtx = poptGetContext(PACKAGE, argc, argv, options, 0);
poptSetOtherOptionHelp(poptCtx, _("[OPTION...] [FILE...]"));
if((rc = poptGetNextOpt(poptCtx)) < -1) {
fprintf(stderr,
_("Error on option %s: %s.\nRun '%s --help' to see a full list of
available command line options.\n"),
poptBadOption(poptCtx, 0),
poptStrerror(rc),
argv[0]);
exit(1);
}
if(rc == 1) {
poptPrintHelp(poptCtx, stderr, 0);
exit(0);
}
#endif
gtk_init (&argc, &argv);
dia_image_init();
#endif
gdk_rgb_init();
So I moved the gdk_rgb_init to above the #ifdef GNOME
Got an instant Segmentation Fault.
And no, I compiled it with Gnome.
--
Jeroen Ruigrok van der Werven Network- and systemadministrator
<[EMAIL PROTECTED]> VIA NET.WORKS The Netherlands
BSD: Technical excellence at its best http://www.bart.nl
These are the times that try men's souls...