gitk hangs if Shift+F5 is pressed rapidly a couple of times

Bug #2020350 reported by Mikko Rantalainen
This bug affects 1 person
Affects Status Importance Assigned to Milestone
git (Ubuntu)

Bug Description

Steps to reproduce:

Start `gitk` in any sizeable repository such as Linux kernel. Press Shift+F5 a couple of times.

Expected results:

gitk should re-render the whole version history a couple of times.

Actual results:

gitk shows an error dialog which says:

Application Error

can't read "treediffs(74c95549178884338d2252ebd2a5a37fceadc2df)": no such variable
can't read "treediffs(74c95549178884338d2252ebd2a5a37fceadc2df)": no such variable
    while executing
"lsearch -exact $treediffs($ids) $fname"
    (procedure "makediffhdr" line 7)
    invoked from within
"makediffhdr $fname $ids"
    (procedure "parseblobdiffline" line 54)
    invoked from within
"parseblobdiffline $ids $line"
    (procedure "getblobdiffline" line 16)
    invoked from within
"getblobdiffline file9 74c95549178884338d2252ebd2a5a37fceadc2df"
    ("eval" body line 1)
    invoked from within
"eval $script"
    (procedure "dorunq" line 11)
    invoked from within
    ("after" script)

Actual commit ids depend on the repository, of course.

The dialog has button OK and Skip Messages and pressing either one results in UI hanging. (The UI is still redrawn if window is resized but the DAG area has infinite wait cursor state and all the history is replaced with one line saying "Reading commits..." and gitk doesn't actually execute anything or read any data.

This is probably a race condition in the code where the "Reload" action is not re-entrant but it's execute twice in this case.

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: gitk 1:2.25.1-1ubuntu3.11
ProcVersionSignature: Ubuntu 5.15.0-71.78~20.04.1-lowlatency 5.15.92
Uname: Linux 5.15.0-71-lowlatency x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.20.11-0ubuntu27.26
Architecture: amd64
CasperMD5CheckResult: skip
CurrentDesktop: MATE
Date: Mon May 22 12:25:12 2023
EcryptfsInUse: Yes
InstallationDate: Installed on 2019-01-05 (1597 days ago)
InstallationMedia: Ubuntu 18.04.1 LTS "Bionic Beaver" - Release amd64 (20180725)
PackageArchitecture: all
SourcePackage: git
UpgradeStatus: Upgraded to focal on 2022-09-13 (250 days ago)
modified.conffile..etc.init.d.apport: [modified]
mtime.conffile..etc.init.d.apport: 2022-05-19T12:50:20.029158

Revision history for this message
Mikko Rantalainen (mira) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.