Re: Segmentation Fault in Referencer

On Sun, 2010-08-08 at 17:10 -0700, Matej Urbas wrote:
> Hi, everyone,
> I am trying to fix a strange segmentation fault in Referencer
> ( ).

Have you tried valgrind? Have you tried gdb?

> The segfault happens predictably in one particular function, but not at
> the same spot. However, I managed to isolate the culprit to GTKMM API
> calls.
> So, the error happens in a function called 'load'. However, it works
> fine if I simply remove all UI code from it (comment it out, or just
> make sure the UI bits don't get executed). Note that the UI code just
> asks the user a simple question and updates the progress bar.
> Please find the (abridged) code of the 'load' function attached in
> 'load.C', I will refer to it now:
> So, if I comment out lines 3, 5, 8, 32 and also make sure the execution
> never goes into the 'if' in line 10 (that is, if I make sure 'something'
> is always false), then things will work fine. However, if I don't
> comment out the above lines, it will segfault randomly within the
> for-loop (because of calls to 'progress'). Also, if I don't ensure that
> 'something' is always false, then the code will segfault exactly when we
> want show the message box.
> The above 'load' function is called within 'onOpenLibrary', which is
> registered to an action group like this:
> 	actiongroup_->add( Gtk::Action::create("OpenLibrary",
> 		Gtk::Stock::OPEN, _("_Open...")),
>   	sigc::mem_fun(*this, &RefWindow::onOpenLibrary));
> Thank you very much,
> ---
> Matej
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org

murrayc murrayc com

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