On 15/03/11 08:25, Martin Renold wrote: > > Follow-up Comment #10, bug #17650 (project mypaint): > > I did some stress-testing, managed to produce one exception and one crash. I > suspect they might not be related with this change. > > Crash: (cannot reproduce; I think I pressed some key while the file dialog > was disappearing) [...] > File "/home/martin/mypaint/gui/drawwindow.py", line 44, in wrapper > toplevel.window.set_cursor(None) > AttributeError: 'NoneType' object has no attribute 'set_cursor' > > I'm just showing those in case you have an idea what's causing them. They > might or might not be related to the recent changes, and I can't really > reproduce them.
Nice catch. This is part of the cursor reset code that fires while we return from the insensitive-&-spin-while-saving state, and it looks like the GDK window for your dialog went away while the GTK window was still valid. Probably perfectly sane under the X11/gdk model, though. We don't use threading, but the wrapped func() calls the gtk main loop multiple times. That might well destruct the underlying window. Either we catch the exception, or try to keep a ref to the gdk window throughout the wrapper. Catching the exception and explaining why we get it sometimes feels better Python to me (easier to ask forgiveness, and all that). -- Andrew Chadwick _______________________________________________ Mypaint-bugs mailing list [email protected] https://mail.gna.org/listinfo/mypaint-bugs
