chatterino2
chatterino2 copied to clipboard
Crash in EditableModelView when using keyboard shortcuts on a new row
Checklist
- [X] I'm reporting a problem with Chatterino
- [X] I've verified that I'm running the most recent nightly build or stable release
- [X] I've looked for my problem on the wiki
- [X] I've searched the issues and pull requests for similar looking reports
Describe your issue
I was adding a Live Notification and encountered a crash when attempting to accomplish the task more quickly than usual. After experimenting, I have confirmed the bug also occurs in the Nicknames and Moderation buttons tables and therefore I conclude the issue is common to other uses of EditableModelView
.
Steps to reproduce:
- Open the Settings window.
- In Nicknames, click Add. If the table was empty, click Add again.
- Double click on the newest row to start editing.
- Use the keyboard shortcut to Remove (Alt+R) or Move up (Alt+M).
- Observe assertion failure and subsequent crash:
/usr/include/c++/14.1.1/bits/stl_vector.h:1130: constexpr std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](size_type) [with _Tp = chatterino::Nickname; _Alloc = std::allocator<chatterino::Nickname>; reference = chatterino::Nickname&; size_type = long unsigned int]: Assertion '__n < this->size()' failed.
Reproducing on a different table produces a similar assertion referring to the contents of that table (I don't know the appropriate C++ terminology), ie the chatterino::Nickname
parts become chatterino::LiveNotification
etc.
This crash does not occur when clicking those buttons, only when using the keyboard shortcuts. This crash does not occur for the first row added to an empty table.
Screenshots
No response
OS and Chatterino Version
Chatterino 2.5.1 (commit 6e104bde7) built with Qt 6.7.2 Running on Manjaro Linux, kernel: 6.6.44-1-MANJARO, DE: KDE Plasma 6.0.5