Saturday, July 6, 2013

#12027: wxCommandProcessor crash


There is a crash in wxCommandProcessor::Store when there is a limit for stored commands and m_currentCommand is first node.
Steps for reproduce this:
1) create a wxCommandProcessor with limited number of commands
2) submit max commands (m_maxNoCommands)
3) Undo (m_maxNoCommands - 1) commands
4) submit new command


in this case first node is deleted and m_currentCommand deleted too. And we have crash when trying to access m_currentCommand.


Attached file contains patch that fixed this problem: fist we remove unnecessary commands after m_currentCommand. and then we can try to remove first node.


This is reproduced in 2.8.10 and trunk brunches.
- Full Post

No comments:

Post a Comment