On 2013-08-02 22:37 +0200, Markus Engel wrote:
So far, only the crash with the text tool can be reproduced consistently (after 4 or at most ~8 times tapping the space bar).
However, with some patience I'm able to make your branch crash when tool-switching with other tools as well:
The backtrace looks like a double-free. There could be some leftover manual calls to member constructors / destructors in InkNodeTool >and SPTextContext.
Regards, Krzysztof
Hm, I didn't find any, but I'm sure this has got to do with the way I rewrote the part that switches the tools, see src/desktop.cpp:675. The old method is right underneath it, commented out. I reordered it, maybe this will help. Could you try it out once more?
Looks ok with GTK2 builds now: haven't been able to reproduce a crash with latest revision 11725 so far (I skipped building and testing r11724 separately).
Last night I also compiled your branch configured to use GTK3 (experimental) - these builds still can be triggered to crash on tool switch (mostly with the text tool). I'll upload some backtraces later tonight.
If you just comment out line 691 ("delete ec_old;"), does it still crash?
Haven't tested this yet because the GTK2-based builds no longer crash with r11725, but will try with the GTK3 builds tonight.