Thanks Nicholas for the reproducer! I tried some variations to narrow down the scope (as it's not easy to get an actual crash/core dump/backtrace of that):
* With gnome-calculator it doesn't crash (GeditWindow → MathWindow, GtkToolButton/name='EditUndo' → GtkButton/BuilderName='calc_undo_button'
* With gedit it doesn't crash if I call self.app.select_single() instead of self.main_window.select_single(), i. e. the additional self.app.select_single('GeditWindow') in the loop (through the main_window property) is significant.
Thanks Nicholas for the reproducer! I tried some variations to narrow down the scope (as it's not easy to get an actual crash/core dump/backtrace of that):
* With gnome-calculator it doesn't crash (GeditWindow → MathWindow, GtkToolButton/ name='EditUndo' → GtkButton/ BuilderName= 'calc_undo_ button'
* With gedit it doesn't crash if I call self.app. select_ single( ) instead of self.main_ window. select_ single( ), i. e. the additional self.app. select_ single( 'GeditWindow' ) in the loop (through the main_window property) is significant.
We have a very similar stress test in the test suite already (from the last attempt at fixing that): http:// bazaar. launchpad. net/~autopilot/ autopilot- gtk/trunk/ view/head: /tests/ autopilot/ tests/test_ properties. py#L140 . Bumping that to 1000 and up doesn't crash, but this uses self.app.
* I tried to make test_stress() more similar to the test case by looping over
w = self.app. select_ single( BuilderName= 'window_ app').select_ single( 'GtkButton' , label='gtk-quit')
but that also does not crash.