kvirc / KVIrc

The KVIrc IRC Client
http://www.kvirc.net/
GNU General Public License v2.0
232 stars 76 forks source link

Crash on undo #2617

Closed wRAR closed 3 months ago

wRAR commented 3 months ago

Just typing something (e.g. in the server connection tab) and pressing Ctrl-Z crashes KVIrc. This is a locally built 5.2.2.

(gdb) bt
#0  std::_Tuple_impl<0ul, KviInputEditor::EditCommand*, std::default_delete<KviInputEditor::EditCommand> >::_Tuple_impl (this=0x7fff8db240b0) at /usr/include/c++/13/tuple:527
#1  std::tuple<KviInputEditor::EditCommand*, std::default_delete<KviInputEditor::EditCommand> >::tuple (this=0x7fff8db240b0) at /usr/include/c++/13/tuple:1351
#2  std::__uniq_ptr_impl<KviInputEditor::EditCommand, std::default_delete<KviInputEditor::EditCommand> >::__uniq_ptr_impl (__u=..., this=0x7fff8db240b0) at /usr/include/c++/13/bits/unique_ptr.h:185
#3  std::__uniq_ptr_data<KviInputEditor::EditCommand, std::default_delete<KviInputEditor::EditCommand>, true, true>::__uniq_ptr_data (this=0x7fff8db240b0) at /usr/include/c++/13/bits/unique_ptr.h:242
#4  std::unique_ptr<KviInputEditor::EditCommand, std::default_delete<KviInputEditor::EditCommand> >::unique_ptr (this=0x7fff8db240b0) at /usr/include/c++/13/bits/unique_ptr.h:366
#5  KviInputEditor::undo (this=0x55ab759a7310) at ./src/kvirc/ui/KviInputEditor.cpp:2606

Happens every time so should be easy to debug.

ctrlaltca commented 3 months ago

Hi @wRAR , thank you for the ticket. The fix is in https://github.com/kvirc/KVIrc/pull/2618