Re: [[gtkmm] Help, Can't create subclassed window]



Please see the entry about dynamic_cast<> in the gtkmm FAQ. And if that is not
relevant then please provide simple-as-possible compileable test code in a
bugzilla bug.

"Benjamin A. Cooper" <bacooper bacwater net> wrote:
> Good day,
> 
> I recently released my first Gtkmm app baculator.bacwater.com.  I tested
> it on my Solaris 8 development box and all works well.  However, I
> recently installed linux (debian 3.0 with 2.4.18 SMP kernel) on one of
> my other Sun machines (a dule processor SS20), and compiled all of the
> Gtkmm2 libs and prereqs.  I am using gtkmm-1.3.21 and sigc++-1.1.13.
> 
> I then tested my app on this platform, the compilation went smoothly,
> however I get a Bus Error (or a Seg Fault if I dynamically allocate the
> window) uppon starting the app.
> 
> My program uses a class derived from Gtk::Window, just as in the
> gtkmm_hello sample app (which BTW runs fine).  I have determined that
> the error occures somewhere within the initialisation of the main
> program window. If I replace the main window with a Gtk::Window it works
> fine, excapt of course that none of the main window initialisation stuff
> is actually called (and hence I don't have a real app).  Using GDB (with
> which I am an ameture at best) I have found that the seg fault occures
> in the Glib::ObjectBase::is_derived_ (this=0x0) function call. The fact
> that this equalls null does not seam right at all and is probably the
> cause of the fault.  My question would then be how did it get that way? 
> poking around with gdb I noticed these lines as being suspect (to my
> uneducated mind):
> 
> (gdb) bt
> #0  0x50534a08 in SigC::Control_::remove_dependency ()
>    from /usr/local/gnome2/lib/libsigc-1.1.so.5
> ..
> 
> (gdb) bt
> #0  0x50534a20 in SigC::Object::Object (this=0x0, __in_chrg=0) at
> object.cc:110
> ..
> 
> This would indicate to me where the null came from, but I have no idea
> really what is going on.
> 
> Am I looking in the right direction, or is this prefectly normal, and
> the cause of the seg fault is really somewhere in my code?
> 
> Any help at further understanding what is going on here would be greatly
> apprecieated.
> Thanks.
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list



Murray Cumming
murrayc usa net
www.murrayc.com




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