-
-
Notifications
You must be signed in to change notification settings - Fork 458
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash in EditableModelView when using keyboard shortcuts on a new row #5566
Comments
There is no accelerators on 6e104bd or current master. Could you
please share more information about your DE and its configuration
regarding accelerators?
However I can reproduce with the changes available on the test_buggy_accelerators branch. Your DE seems to be
doing this I guess?
|
My apologies, I was unaware of the possibility for that to be a feature of my desktop environment. If that's the case, I'm using KDE Plasma 6.0.5 and have not configured anything specific to Chatterino, nor have I deliberately configured Alt+R or Alt+M to do anything globally (those letters are just underlined on the buttons the same as other accelerator keys). |
A stack trace would be really helpful if you have one. |
I'm unsure how to generate one on my system, the wiki only seems to describe the procedure on Windows. |
I don't really have the time to fully diagnose and fix this but here is the stack trace. This is a similar but not exactly the same crash, Arch, built on the test branch. This was removing a Nickname while editing one. Stacktrace
|
This can be fixed by the following patch: diff --git a/src/common/SignalVectorModel.hpp b/src/common/SignalVectorModel.hpp
index 620ca452d..f04401438 100644
--- a/src/common/SignalVectorModel.hpp
+++ b/src/common/SignalVectorModel.hpp
@@ -167,7 +167,7 @@ public:
int vecRow = this->getVectorIndexFromModelIndex(row);
// TODO: This is only a safety-thing for when we modify data that's being modified right now.
// It should not be necessary, but it would require some rethinking about this surrounding logic
- if (vecRow >= this->vector_->readOnly()->size())
+ if (vecRow >= this->vector_->raw().size())
{
return false;
} Basic issue is that chatterino2/src/common/SignalVector.hpp Lines 124 to 127 in 6e104bd
|
Checklist
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:
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 becomechatterino::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 6e104bd) built with Qt 6.7.2 Running on Manjaro Linux, kernel: 6.6.44-1-MANJARO, DE: KDE Plasma 6.0.5
The text was updated successfully, but these errors were encountered: