Segmentation fault when using spacebar to select files in Unstaged Files
Frequently, while selecting files by pressing the spacebar in the Unstaged Files window, the program crashes with:
Segmentation fault (core dumped)
More messages:
Diff Header:
"@@ -1,7 +1,7 @@\n"
Staged Header:
"@@ -1,7 +1,7 @@\n"
Patch lines: 8
0 ) "Origin: ; OldLine: 1; NewLine: 1"
1 ) "Origin: ; OldLine: 2; NewLine: 2"
2 ) "Origin: ; OldLine: 3; NewLine: 3"
3 ) "Origin: -; OldLine: 4; NewLine: "
4 ) "Origin: +; OldLine: ; NewLine: 4"
5 ) "Origin: ; OldLine: 5; NewLine: 5"
6 ) "Origin: ; OldLine: 6; NewLine: 6"
7 ) "Origin: ; OldLine: 7; NewLine: 7"
Staged linesStaged: 1
Staged patch No. 0
0 ) "Origin: ; OldLine: 1; NewLine: 1"
1 ) "Origin: ; OldLine: 2; NewLine: 2"
2 ) "Origin: ; OldLine: 3; NewLine: 3"
3 ) "Origin: -; OldLine: 4; NewLine: "
4 ) "Origin: +; OldLine: ; NewLine: 4"
5 ) "Origin: ; OldLine: 5; NewLine: 5"
6 ) "Origin: ; OldLine: 6; NewLine: 6"
7 ) "Origin: ; OldLine: 7; NewLine: 7"
Name: "Staged" Row: 0 : "Services" ; Count: 1
Name: "Staged" , countCollapsed(): 1
Name: "Staged" Current Collapsed: 1 ; New Collapsed: 1
Segmentation fault (core dumped)
Steps to reproduce:
- Open program
- Open a repo with sidebar or "Open Repository" with one or more unstaged files.
- With the "Unstaged Files" window focused, press spacebar to select a file.
- Roughly 20% of the time, this will result in the program closing with a segmentation fault.
System info: Arch Linux x64 5.16.11-arch1-1 gcc version: 11.2.0-3 Compiled from source, via the AUR On current commit as of March 4th
If there's any additional info/tests you need, I'm happy to help.
Acknowledged: Q_ASSERT(isStageEnabled()); in DetailView.cpp
Remark: occurs every time a staged file is unstaged - might not be the same error described above
I will have a look when I have time
I tried this again out and I get a segfault in the qt library it self and not in DetailView.cpp. @slackerbob can you try to reproduce?
@slackerbob is the issue still reproducable? We have a merge request pending so we prioritze it if still an issue
I can no longer reproduce this issue.
Thank you for the fix!
And my apologies for taking so long to respond.
Hmm strange. I am still able to reproduce it