GNOME Bugzilla – Bug 553024
switching notebook pages while removing them fails ungracefully
Last modified: 2009-07-23 05:10:09 UTC
When removing pages from a notebook, using set_current_page() with an invalid page number sometimes causes it to fail ungracefully. I'll attach a test case which shows this behavior. The page switch signal triggers a function that prevents the user from selecting the last page (I'm using this in http://beatwaves.net/files/images/software/summercode/all/sshot.png ). For some reason this causes a crash when removing pages from a notebook with only two pages. With a notebook with three pages it doesn't crash, hence the "add third page" button in the test application. The crash can be avoided by manually testing that the requested page is valid, but nevertheless, the behavior is buggy IMO.
Created attachment 119042 [details] Testcase for the bug compile with: g++ `pkg-config --libs --cflags gtkmm-2.4` -o crash crash.cc
I tried with your test application but cannot reproduce the crash with lastest gtkmm. Everything seems to work fine. Can you be more specific what and how I have to click in the crash application to get the crash? Thanks!
In the test application, clicking "Remove all but last page" _without_ doing anything before that causes me a segfault with gtkmm 2.12.5 (on Ubuntu 8.04). If I click "Add third page" _before_ "Remove all but last page" all is fine. If this behavior is not present in newer gtkmm the bug can be closed...
I guess it is best you check yourself once you update to a more recent version. At least I cannot reproduce it here.
Sakari, could you please check this?
Sorry this took so long, confirmed to be fixed in 2.16.0.