Re: Strange problem running a Gnome App
- From: Loban Amaan Rahman <loban enigma caltech edu>
- To: gnome-devel-list gnome org
- Subject: Re: Strange problem running a Gnome App
- Date: Thu, 24 May 2001 14:33:38 -0700
Ok, I've just isolated the cause of the problemo. Check out the
following code snippet:
void
Gchch::GUI::Root::initLogo()
{
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_loop_type(GNOME_ANIMATOR_LOOP_RESTART);
logoDefault.set_playback_speed(1.0 / LOGO_SPEED);
logoDefault.set_playback_direction(1);
logoDefault.start();
logoWin.append_frames(GCHCH_PIXMAP_PATH "logo-2.png", 0, 0, 1, LOGO_SIZE_X);
logoWin.set_loop_type(GNOME_ANIMATOR_LOOP_RESTART);
logoWin.set_playback_speed(1.0 / LOGO_SPEED);
logoWin.set_playback_direction(1);
logoWin.start();
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));
logoDefault.show();
//FIXME logoBox2.add(logoWin);
logoBox2.button_press_event.connect(retbind(bind(slot(this, &Root::animateLogo), &logoWin), 1));
logoWin.show();
}
(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/libgdk-1.2.so.0
> (gdb) bt
> #0 0x405b1648 in gdk_gc_set_tile () from /usr/lib/libgdk-1.2.so.0
> #1 0x405b15f0 in gdk_gc_set_tile () from /usr/lib/libgdk-1.2.so.0
> #2 0x0818c5f0 in ?? ()
> #3 0x408c2c40 in __morecore () from /lib/libc.so.6
> #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]