Re: Strange problem running a Gnome App

Ok, I've just isolated the cause of the problemo. Check out the
following code snippet:

	const static int LOGO_SIZE_X = 75;
	const static int LOGO_SIZE_Y = 75;
	const static int LOGO_SPEED = 100;

	Animator& logoDefault = *manage(new Animator(LOGO_SIZE_X, LOGO_SIZE_Y));
	Animator& logoWin = *manage(new Animator(LOGO_SIZE_X, LOGO_SIZE_Y));

	logoDefault.append_frames(GCHCH_PIXMAP_PATH "logo-1.png", 0, 0, 1, LOGO_SIZE_X);
	logoDefault.set_playback_speed(1.0 / LOGO_SPEED);

	logoWin.append_frames(GCHCH_PIXMAP_PATH "logo-2.png", 0, 0, 1, LOGO_SIZE_X);
	logoWin.set_playback_speed(1.0 / LOGO_SPEED);

	EventBox& logoBox1 = getWidget<EventBox>("logo_event1");
	EventBox& logoBox2 = getWidget<EventBox>("logo_event2");

	//FIXME logoBox1.add(logoDefault);
	logoBox1.button_press_event.connect(retbind(bind(slot(this, &Root::animateLogo), &logoDefault), 1));;

	//FIXME logoBox2.add(logoWin);
	logoBox2.button_press_event.connect(retbind(bind(slot(this, &Root::animateLogo), &logoWin), 1));;

(getWidget is just a utility function I wrote which looks up an XML
object from libglade for a widget with the given name.)

The two lines with a FIXME are what I commented out in order for the
program to run flawlessly (of course missing those two animations). If I
enable those lines, my program crashes as I had written earlier.

On my box where it crashes unless those lines are disable:
	gtk+-1.2.10 (mdk)
	gnome-libs-1.2.13 (mdk)
	gtkmm-1.2.5 (mdk)
	gnomemm-1.1.17 (mdk)
On my box where it runs fine even with those lines enabled:
	gtk+-1.2.10 (ximian)
	gnome-libs-1.2.13 (ximian)
	gtkmm-1.2.5 (ximian)
	gnomemm-1.1.15 (ximian)

Maybe Gnome::Animator broke somehow between 1.1.15 and 1.1.17?
Any ideas?

On Thu, May 24, 2001 at 02:17:09PM -0700, Loban Amaan Rahman wrote:
> I'm developing a small application using Gnome-- and Gtk--. I've written
> and compiled it successfully on my Mandrake 8.0 system, which has the
> latest versions of Gtk, Gnome, and their respective C++ wrapper
> libraries. For some strange reason, it crashes when I run it on my
> system, but if I copy and run the exact program on my Redhat 7.1 box, it
> works just fine. Here is a gdb backtrace on my problematic system:
> Starting program: /home/loban/usr/bin/gchch --disable-crash-dialog
> [New Thread 1024 (LWP 18213)]
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 1024 (LWP 18213)]
> 0x405b1648 in gdk_gc_set_tile () from /usr/lib/
> (gdb) bt
> #0  0x405b1648 in gdk_gc_set_tile () from /usr/lib/
> #1  0x405b15f0 in gdk_gc_set_tile () from /usr/lib/
> #2  0x0818c5f0 in ?? ()
> #3  0x408c2c40 in __morecore () from /lib/
> #4  0x0001c479 in ?? ()
> Cannot access memory at address 0xff00ffff
> (gdb) 
> ---------------------------------------------------------------------------
> I'm not sure what the cause of the problem is. I'm pretty sure the

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]