Gittyup icon indicating copy to clipboard operation
Gittyup copied to clipboard

Segmentation fault when using spacebar to select files in Unstaged Files

Open slackerbob opened this issue 3 years ago • 5 comments

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:

  1. Open program
  2. Open a repo with sidebar or "Open Repository" with one or more unstaged files.
  3. With the "Unstaged Files" window focused, press spacebar to select a file.
  4. 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.

slackerbob avatar Mar 04 '22 20:03 slackerbob

Acknowledged: Q_ASSERT(isStageEnabled()); in DetailView.cpp Remark: occurs every time a staged file is unstaged - might not be the same error described above

stefanknotzer avatar Mar 05 '22 11:03 stefanknotzer

I will have a look when I have time

Murmele avatar Mar 06 '22 13:03 Murmele

Test.zip

  1. Select "New Folder/New Folder2/Test123.txt"
  2. Press space

Murmele avatar Apr 19 '22 12:04 Murmele

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?

Murmele avatar Jun 02 '22 13:06 Murmele

@slackerbob is the issue still reproducable? We have a merge request pending so we prioritze it if still an issue

Murmele avatar Aug 11 '22 14:08 Murmele

I can no longer reproduce this issue.

Thank you for the fix!

And my apologies for taking so long to respond.

slackerbob avatar Aug 26 '22 13:08 slackerbob

Hmm strange. I am still able to reproduce it

Murmele avatar Aug 26 '22 20:08 Murmele