Skip to contentSkip to conversation

gitk: avoid crash if closed while reading references

PATCH In review Pat Thoyts 2 participants 2 messages Jun 15, 2016

lore
Share & tools
lore

Pat Thoyts

author
#0 lore raw

PATCH 1/1 gitk: avoid crash if closed while reading references

As recorded in msysGit issue 125 if the user closes gitk while it reports itself as still reading references then Tk will crash in the geometry management code. This has been fixed for Tk 8.5.7 and above. This patch avoids the problem by flushing outstanding geometry events before calling the readrefs procedure.

See also http://code.google.com/p/msysgit/issues/detail?id=125

---
 gitk |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
gitk +1 -0
index 656c2c1..a346bd5 100755
@@ -10952,6 +10952,7 @@ catch {
 # wait for the window to become visible
 tkwait visibility .
 wm title . "[file tail $argv0]: [file tail [pwd]]"
+update
 readrefs
 
 if {$cmdline_files ne {} || $revtreeargs ne {} || $revtreeargscmd ne {}} {
Signature · 1 line
1.6.2.2.1669.g7eaf8
#1 lore raw

Hi,

Quoted 10 lines · Pat Thoyts

As recorded in msysGit issue 125 if the user closes gitk while it reports itself as still reading references then Tk will crash in the geometry management code. This has been fixed for Tk 8.5.7 and above. This patch avoids the problem by flushing outstanding geometry events before calling the readrefs procedure.

See also http://code.google.com/p/msysgit/issues/detail?id=125

This is commit 3d3ecb65e34a62b83648516150ec8a99e1b3ace7 in 4msysgit's 'devel' branch now, and will be part of the next msysGit release.

Thanks,
Dscho