|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
Program Crashes when Removing a PageI have a notebook that crashes the program when
gtk_notebook_remove_page(GTK_NOTEBOOK(nb), page_num) is called. Each page of the notebook has a lot of stuff on it and the crash always happens on the same page. The source of gtk_notebook_remove_page() looks like it recursively traverses the page and removes everything. My suspicion is that there is something on my page that causes the crash, but I don't see what it could be. The following error message is what I get when gtk_notebook_remove_page() is called. 1285 if(page_num>0) { (gdb) 1286 gtk_notebook_remove_page(GTK_NOTEBOOK(nb), page_num); (gdb) Program received signal SIGSEGV, Segmentation fault. 0x00007fffd8340790 in ?? () How can I find out what's causing the crash? Thanks, dhk _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@... http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list |
|
|
Re: Program Crashes when Removing a PageOn Fri, Oct 30, 2009 at 06:09:16AM -0400, dhk wrote:
> I have a notebook that crashes the program when > gtk_notebook_remove_page(GTK_NOTEBOOK(nb), page_num) is called. Each > page of the notebook has a lot of stuff on it and the crash always > happens on the same page. The source of gtk_notebook_remove_page() > looks like it recursively traverses the page and removes everything. My > suspicion is that there is something on my page that causes the crash, > but I don't see what it could be. The following error message is what I > get when gtk_notebook_remove_page() is called. > 1285 if(page_num>0) { > (gdb) > 1286 gtk_notebook_remove_page(GTK_NOTEBOOK(nb), page_num); > (gdb) > > Program received signal SIGSEGV, Segmentation fault. > 0x00007fffd8340790 in ?? () > > How can I find out what's causing the crash? Run it under valgrind with G_SLICE=always-malloc http://library.gnome.org/devel/glib/stable/glib-running.html It will probably tell you that nb points to already-freed memory and where it was freed. If it's so you need to figure out who does not own a reference while he should, see also http://library.gnome.org/devel/gobject/stable/tools-refdb.html that may help. Or valgrind will tell you that nb is complete rubbish and why... Yeti _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@... http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list |
|
|
Re: Program Crashes when Removing a PageDavid Nečas wrote:
> On Fri, Oct 30, 2009 at 06:09:16AM -0400, dhk wrote: >> I have a notebook that crashes the program when >> gtk_notebook_remove_page(GTK_NOTEBOOK(nb), page_num) is called. Each >> page of the notebook has a lot of stuff on it and the crash always >> happens on the same page. The source of gtk_notebook_remove_page() >> looks like it recursively traverses the page and removes everything. My >> suspicion is that there is something on my page that causes the crash, >> but I don't see what it could be. The following error message is what I >> get when gtk_notebook_remove_page() is called. >> 1285 if(page_num>0) { >> (gdb) >> 1286 gtk_notebook_remove_page(GTK_NOTEBOOK(nb), page_num); >> (gdb) >> >> Program received signal SIGSEGV, Segmentation fault. >> 0x00007fffd8340790 in ?? () >> >> How can I find out what's causing the crash? > > Run it under valgrind with G_SLICE=always-malloc > http://library.gnome.org/devel/glib/stable/glib-running.html > It will probably tell you that nb points to already-freed memory and > where it was freed. If it's so you need to figure out who does not own > a reference while he should, see also > http://library.gnome.org/devel/gobject/stable/tools-refdb.html > that may help. Or valgrind will tell you that nb is complete rubbish > and why... > > Yeti > > Valgrind, found the problem. It was in a block of code the was not finished and forgotten about a few weeks ago. I commented it out and it works as before. Thanks, dhk _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@... http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list |
| Free embeddable forum powered by Nabble | Forum Help |