| Summary: | KDiff3 crashes on a git merge conflict with "Severe Internal Error line != i for srcSelector= 1" | ||
|---|---|---|---|
| Product: | [Applications] kdiff3 | Reporter: | vlovich |
| Component: | application | Assignee: | michael <reeves.87> |
| Status: | RESOLVED FIXED | ||
| Severity: | crash | CC: | svist, tiagoefmoraes |
| Priority: | NOR | ||
| Version First Reported In: | 1.9.3 | ||
| Target Milestone: | --- | ||
| Platform: | Arch Linux | ||
| OS: | Linux | ||
| Latest Commit: | e2f46c065c4de3ae05363bad8f3d530f9e75ab85 | Version Fixed/Implemented In: | 1.10.2 |
| Sentry Crash Report: | |||
| Attachments: | 3 files to reproduce Severe Internal Error | ||
The problematic setting appears to be Diff3AlignBC=true. If I set that to false the crash resolves. Created attachment 147446 [details]
3 files to reproduce Severe Internal Error
I can reproduce this on KDiff3 Version 1.9.5 (64 bit), the files are from an OSS project so I attached them here.
To reproduce save the 3 in the attachment to a folder and run kdiff3 base.exs local.exs remote.exs
org.kde.kdiff3: "Loading A: base.exs"
org.kde.kdiff3: "Loading B: local.exs"
org.kde.kdiff3: "Loading C: remote.exs"
org.kde.kdiff3: "Diff: A <-> B"
org.kde.kdiff3: Enter: calcDiff3LineListUsingAB
org.kde.kdiff3: Leave: calcDiff3LineListUsingAB
org.kde.kdiff3: "Diff: A <-> C"
org.kde.kdiff3: "Diff: B <-> C"
org.kde.kdiff3: "Severe Internal Error." line != i for srcSelector= 1
*** Bug 447996 has been marked as a duplicate of this bug. *** Looks like some else got a minimal repo on this linked as dup so it doesn't get lost again. Weirdly both these cases work on my machine with the latest commits on master and 1.9. The 1.9 has two unrelated bug fixes which wouldn't have impacted the diff process. That's on comparing the files via the GUI and contextual menu. @michael See the duped bug, you need to enable option "Align B and C for 3 input files" -- that's when the crashes happen. I'm currently on 1.9.6 and it's still crashing with the example files The current stable branch is 1.10.x this appears fixed there and in master however I have no recollection of the exact commit. Awaiting confirmation. Finally got a reproducible error for a different input set. Turns out this is a defective check that does not always work properly if Diff3AlignBC=true. This a result how the alignment adjustment works specifically m_diff3LineList can have multiple references to a line in one file if its replaced by multiple lines in another. This appears to be specific to aligning B and C. There appears to be no real problem beyond this and the check is now disabled in this case. |
SUMMARY I've observed Kdiff3 sporadically failing to open certain merge conflicts. On the command-line it prints "Severe Internal Error." line != i for srcSelector= 1. STEPS TO REPRODUCE Running git mergetool on a file that conflicts. Not really sure what is it about the merge conflict & haven't figured out how to reduce this to a more standalone case. OBSERVED RESULT org.kde.kdiff3: "Loading A: somefile_BASE_1458148.c++" org.kde.kdiff3: "Loading B: somefile_LOCAL_1458148.c++" org.kde.kdiff3: "Loading C: somefile_REMOTE_1458148.c++" org.kde.kdiff3: "Diff: A <-> B" org.kde.kdiff3: Enter: calcDiff3LineListUsingAB org.kde.kdiff3: Leave: calcDiff3LineListUsingAB org.kde.kdiff3: "Diff: A <-> C" org.kde.kdiff3: "Diff: B <-> C" org.kde.kdiff3: "Severe Internal Error." line != i for srcSelector= 1 EXPECTED RESULT The merge conflict should open SOFTWARE/OS VERSIONS Linux/KDE Plasma: Arch Linux (available in About System) KDE Plasma Version: 5.22.5 KDE Frameworks Version: 5.85.0 Qt Version: 5.15.2 Kdiff3 1.9.3 (64 bit) ADDITIONAL INFORMATION My gitconfig has [merge] tool = kdiff3 conflictstyle = diff3 if that matters. When I delete the attached kdiff3rc file the merge succeeds.