Current behaviour
The application crashes.
Expected behaviour
The application should not crash.
Steps to reproduce
This is an issue that seems to have appeared around the 3.0 release but I never took the time to investigate it. In this case I used the Visual Studio (2019) extension to open the 'File history', then went to the blame tab, clicked a commit, ctrl+g to go to line, then click the cross to close the window. It also happened in other scenarios, but I do not have details for those.
Screenshots
N/A
Did this work in previous version of GitExtensions
2.x did not have this issue as far as I can remember.
Environment
- Git Extensions 3.3.1.7897
- Build 5a97671
- Git 2.20.1.windows.1 (recommended: 2.23.0 or later)
- Microsoft Windows NT 6.3.9600.0
- .NET Framework 4.8.4069.0
- DPI 96dpi (no scaling)
Diagnostics
I attached WinDbg as the JIT debugger, loaded the CLR magic and did !analyze -v:
*******************************************************************************
* *
* Exception Analysis *
* *
*******************************************************************************
DEBUG_FLR_EXCEPTION_CODE(80131509) and the ".exr -1" ExceptionCode(e0434352) don't match
MethodDesc: 00007ffc39451d70
Method Name: System.Reactive.Concurrency.SynchronizationContextScheduler.Schedule[[System.ValueTuple`2[[System.__Canon, mscorlib],[System.__Canon, mscorlib]], System.ValueTuple]](System.ValueTuple`2<System.__Canon,System.__Canon>, System.Func`3<System.Reactive.Concurrency.IScheduler,System.ValueTuple`2<System.__Canon,System.__Canon>,System.IDisposable>)
Class: 00007ffc6c661a38
MethodTable: 00007ffc6cf35ba0
mdToken: 00000000060011ac
Module: 00007ffc6c411000
IsJitted: yes
CodeAddr: 00007ffc3934e360
Transparency: Critical
GetUrlPageData2 (WinHttp) failed: 12007.
KEY_VALUES_STRING: 1
Key : CLR.System.InvalidOperationException._message
Value: Invoke or BeginInvoke cannot be called on a control until the window handle has been created.
STACKHASH_ANALYSIS: 1
TIMELINE_ANALYSIS: 1
Timeline: !analyze.Start
Name: <blank>
Time: 2020-02-09T11:40:20.189Z
Diff: 189 mSec
Timeline: Dump.Current
Name: <blank>
Time: 2020-02-09T11:40:20.0Z
Diff: 0 mSec
Timeline: Process.Start
Name: <blank>
Time: 2020-02-09T11:28:18.0Z
Diff: 722000 mSec
Timeline: OS.Boot
Name: <blank>
Time: 2020-02-08T17:42:47.0Z
Diff: 64653000 mSec
DUMP_CLASS: 2
DUMP_QUALIFIER: 0
FAULTING_IP:
KERNELBASE!RaiseException+68
00007ffc`a7ea908c 488b8c24c0000000 mov rcx,qword ptr [rsp+0C0h]
EXCEPTION_RECORD: (.exr -1)
ExceptionAddress: 00007ffca7ea908c (KERNELBASE!RaiseException+0x0000000000000068)
ExceptionCode: e0434352 (CLR exception)
ExceptionFlags: 00000001
NumberParameters: 5
Parameter[0]: ffffffff80131509
Parameter[1]: 0000000000000000
Parameter[2]: 0000000000000000
Parameter[3]: 0000000000000000
Parameter[4]: 00007ffc98890000
FAULTING_THREAD: 0000355c
EXCEPTION_CODE: (HRESULT) 0x80131509 (2148734217) - <Unable to get error code text>
EXCEPTION_CODE_STR: 80131509
WATSON_BKT_PROCSTAMP: 5e1310a0
WATSON_BKT_PROCVER: 3.3.1.7897
PROCESS_VER_PRODUCT: Git Extensions
WATSON_BKT_MODULE: KERNELBASE.dll
WATSON_BKT_MODSTAMP: 5d26b6e9
WATSON_BKT_MODOFFSET: 908c
WATSON_BKT_MODVER: 6.3.9600.19425
MODULE_VER_PRODUCT: Microsoft® Windows® Operating System
BUILD_VERSION_STRING: 9600.19538.amd64fre.winblue_ltsb_escrow.191014-1700
MODLIST_WITH_TSCHKSUM_HASH: df2f56be8a0696f82716407072ad4ed21ead6261
MODLIST_SHA1_HASH: 9690281bff8311518c56da0e4508e1122854eb02
NTGLOBALFLAG: 400
PROCESS_BAM_CURRENT_THROTTLED: 0
PROCESS_BAM_PREVIOUS_THROTTLED: 0
APPLICATION_VERIFIER_FLAGS: 0
PRODUCT_TYPE: 1
SUITE_MASK: 272
DUMP_TYPE: fe
PROCESS_NAME: unknown
MISSING_CLR_SYMBOL: 0
ANALYSIS_SESSION_HOST: DESKTOP
ANALYSIS_SESSION_TIME: 02-09-2020 12:40:20.0189
ANALYSIS_VERSION: 10.0.17763.132 amd64fre
MANAGED_CODE: 1
MANAGED_ENGINE_MODULE: clr
MANAGED_ANALYSIS_PROVIDER: SOS
MANAGED_THREAD_ID: 355c
MANAGED_EXCEPTION_ADDRESS: 991d69ea68
LAST_CONTROL_TRANSFER: from 00007ffc988aa451 to 00007ffca7ea908c
THREAD_ATTRIBUTES:
THREAD_SHA1_HASH_MOD_FUNC: 496307919b5c20eda4b6b1d7f8f57fe40ecc2624
THREAD_SHA1_HASH_MOD_FUNC_OFFSET: 27cfc7cdea8e40dd4dc3a7ebac53d16e2aeb6dac
OS_LOCALE: NLD
BUGCHECK_STR: CLR_EXCEPTION_System.InvalidOperationException
DEFAULT_BUCKET_ID: CLR_EXCEPTION_System.InvalidOperationException
PRIMARY_PROBLEM_CLASS: CLR_EXCEPTION
PROBLEM_CLASSES:
ID: [0n254]
Type: [CLR_EXCEPTION]
Class: Primary
Scope: DEFAULT_BUCKET_ID (Failure Bucket ID prefix)
BUCKET_ID
Name: Add
Data: Omit
PID: [Unspecified]
TID: [0x355c]
Frame: [0] : KERNELBASE!RaiseException
ID: [0n252]
Type: [@ManagedObjectName]
Class: Addendum
Scope: DEFAULT_BUCKET_ID (Failure Bucket ID prefix)
BUCKET_ID
Name: Omit
Data: Add
String: [System.InvalidOperationException]
PID: [0x3510]
TID: [Unspecified]
Frame: [0]
STACK_TEXT:
00000099`3515f1f0 00007ffc`7de31173 System_Windows_Forms_ni!System.Windows.Forms.Control.MarshaledInvoke+0x3d3
00000099`3515f330 00007ffc`7de30c72 System_Windows_Forms_ni!System.Windows.Forms.Control.BeginInvoke+0x62
00000099`3515f3a0 00007ffc`7e8b2b71 System_Windows_Forms_ni!System.Windows.Forms.WindowsFormsSynchronizationContext.Post+0x51
00000099`3515f3f0 00007ffc`3934e47b System_Reactive_ni!System.Reactive.Concurrency.SynchronizationContextScheduler.Schedule[[System.ValueTuple_2[[System.__Canon,_mscorlib],[System.__Canon,_mscorlib]],_System.ValueTuple]]+0x11b
00000099`3515f460 00007ffc`6cb979b4 System_Reactive_ni!System.Reactive.Concurrency.Scheduler.ScheduleAction[[System.__Canon,_mscorlib]]+0x154
00000099`3515f4e0 00007ffc`6ccb6771 System_Reactive_ni!System.Reactive.Linq.ObservableImpl.EventProducer_2+Session+__c[[System.__Canon,_mscorlib],[System.__Canon,_mscorlib]]._Connect_b__5_0+0xf1
00000099`3515f560 00007ffc`6ccc23e2 System_Reactive_ni!System.Reactive.Disposables.AnonymousDisposable_1[[System.ValueTuple_3[[System.__Canon,_mscorlib],[System.__Canon,_mscorlib],[System.__Canon,_mscorlib]],_System.ValueTuple]].Dispose+0x82
00000099`3515f5c0 00007ffc`6cb9478e System_Reactive_ni!System.Reactive.Disposables.Disposable.TryDispose+0x5e
00000099`3515f600 00007ffc`6cca9314 System_Reactive_ni!System.Reactive.Linq.ObservableImpl.Throttle_1+_[[System.__Canon,_mscorlib]].Dispose+0x24
00000099`3515f630 00007ffc`6cba797b System_Reactive_ni!System.Reactive.Sink_1[[System.__Canon,_mscorlib]].Dispose+0xab
00000099`3515f690 00007ffc`6cb9478e System_Reactive_ni!System.Reactive.Disposables.Disposable.TryDispose+0x5e
00000099`3515f6d0 00007ffc`6cba9003 System_Reactive_ni!System.Reactive.ObserveOnObserverNew_1[[System.__Canon,_mscorlib]].Dispose+0x23
00000099`3515f710 00007ffc`6cba797b System_Reactive_ni!System.Reactive.Sink_1[[System.__Canon,_mscorlib]].Dispose+0xab
00000099`3515f770 00007ffc`6e1a697b GitUI_ni!GitUI.CommitInfo.CommitInfoHeader.DisposeCustomResources+0x1b
00000099`3515f7a0 00007ffc`6e0b6643 GitUI_ni!GitUI.GitModuleControl.Dispose+0x53
00000099`3515f7e0 00007ffc`96873371 System_ni!System.ComponentModel.Component.Finalize+0x11
STACK_COMMAND: !sos.pe 0x991d69ea68 ; ** Pseudo Context ** ManagedPseudo ** Value: d18d513200 ** ; kb
THREAD_SHA1_HASH_MOD: 15163896b4156cc0a0208a3b87e3d5d6d3923e94
FOLLOWUP_IP:
System_Windows_Forms_ni+2c1173
00007ffc`7de31173 90 nop
FAULT_INSTR_CODE: 1247e890
SYMBOL_STACK_INDEX: 0
SYMBOL_NAME: System_Windows_Forms_ni!System.Windows.Forms.Control.MarshaledInvoke+2c1173
FOLLOWUP_NAME: MachineOwner
MODULE_NAME: System_Windows_Forms
IMAGE_NAME: System.Windows.Forms.dll
DEBUG_FLR_IMAGE_TIMESTAMP: 5d7a9e88
FAILURE_BUCKET_ID: CLR_EXCEPTION_System.InvalidOperationException_80131509_System.Windows.Forms.dll!System.Windows.Forms.Control.MarshaledInvoke
BUCKET_ID: CLR_EXCEPTION_System.InvalidOperationException_System_Windows_Forms_ni!System.Windows.Forms.Control.MarshaledInvoke+2c1173
FAILURE_EXCEPTION_CODE: 80131509
FAILURE_IMAGE_NAME: System.Windows.Forms.dll
BUCKET_ID_IMAGE_STR: System.Windows.Forms.dll
FAILURE_MODULE_NAME: System_Windows_Forms
BUCKET_ID_MODULE_STR: System_Windows_Forms
FAILURE_FUNCTION_NAME: System.Windows.Forms.Control.MarshaledInvoke
BUCKET_ID_FUNCTION_STR: System.Windows.Forms.Control.MarshaledInvoke
BUCKET_ID_OFFSET: 2c1173
BUCKET_ID_MODPRIVATE: 1
BUCKET_ID_MODTIMEDATESTAMP: 5d7a9e88
BUCKET_ID_MODCHECKSUM: 0
BUCKET_ID_MODVER_STR: 4.8.4042.0
BUCKET_ID_PREFIX_STR: CLR_EXCEPTION_System.InvalidOperationException_
FAILURE_PROBLEM_CLASS: CLR_EXCEPTION
FAILURE_SYMBOL_NAME: System.Windows.Forms.dll!System.Windows.Forms.Control.MarshaledInvoke
WATSON_STAGEONE_URL: http://watson.microsoft.com/StageOne/unknown/3.3.1.7897/5e1310a0/KERNELBASE.dll/6.3.9600.19425/5d26b6e9/80131509/0000908c.htm?Retriage=1
TARGET_TIME: 2020-02-09T11:40:27.000Z
OSBUILD: 9600
OSSERVICEPACK: 19538
SERVICEPACK_NUMBER: 0
OS_REVISION: 0
OSPLATFORM_TYPE: x64
OSNAME: Windows 8.1
OSEDITION: Windows 8.1 WinNt SingleUserTS
USER_LCID: 0
OSBUILD_TIMESTAMP: 2019-10-14 20:45:31
BUILDDATESTAMP_STR: 191014-1700
BUILDLAB_STR: winblue_ltsb_escrow
BUILDOSVER_STR: 6.3.9600.19538.amd64fre.winblue_ltsb_escrow.191014-1700
ANALYSIS_SESSION_ELAPSED_TIME: 1bfa
ANALYSIS_SOURCE: UM
FAILURE_ID_HASH_STRING: um:clr_exception_system.invalidoperationexception_80131509_system.windows.forms.dll!system.windows.forms.control.marshaledinvoke
FAILURE_ID_HASH: {c279e3a4-dab2-09ec-a135-2281bfa61101}
Followup: MachineOwner
---------
Additionally I ran !CLRStack -a:
OS Thread Id: 0x355c (2)
Child SP IP Call Site
000000993515f108 00007ffca7ea908c [HelperMethodFrame: 000000993515f108]
000000993515f1f0 00007ffc7de31173 System.Windows.Forms.Control.MarshaledInvoke(System.Windows.Forms.Control, System.Delegate, System.Object[], Boolean)
PARAMETERS:
this (0x000000993515f330) = 0x000000991cc28098
caller (0x000000993515f338) = 0x000000991cc28098
method (0x000000993515f340) = 0x000000991d69e9f0
args (0x000000993515f348) = 0x000000991d69ea30
synchronous (0x000000993515f350) = 0x0000000000000000
LOCALS:
<no data>
<no data>
<no data>
<no data>
<no data>
<no data>
<no data>
<no data>
<no data>
000000993515f330 00007ffc7de30c72 System.Windows.Forms.Control.BeginInvoke(System.Delegate, System.Object[])
PARAMETERS:
this = <no data>
method = <no data>
args = <no data>
LOCALS:
0x000000993515f368 = 0x000000991d69ea50
<no data>
0x000000993515f360 = 0x0000000000000000
000000993515f3a0 00007ffc7e8b2b71 System.Windows.Forms.WindowsFormsSynchronizationContext.Post(System.Threading.SendOrPostCallback, System.Object)
PARAMETERS:
this = <no data>
d = <no data>
state = <no data>
000000993515f3f0 00007ffc3934e47b System.Reactive.Concurrency.SynchronizationContextScheduler.Schedule[[System.ValueTuple`2[[System.__Canon, mscorlib],[System.__Canon, mscorlib]], System.ValueTuple]](System.ValueTuple`2, System.Func`3,System.IDisposable>)
PARAMETERS:
this = <no data>
state = <no data>
action = <no data>
LOCALS:
<CLR reg> = 0x000000991d69e8e0
000000993515f460 00007ffc6cb979b4 System.Reactive.Concurrency.Scheduler.ScheduleAction[[System.__Canon, mscorlib]](System.Reactive.Concurrency.IScheduler, System.__Canon, System.Action`1)
PARAMETERS:
scheduler = <no data>
state = <no data>
action = <no data>
000000993515f4e0 00007ffc6ccb6771 System.Reactive.Linq.ObservableImpl.EventProducer`2+Session+c[[System.__Canon, mscorlib],[System.__Canon, mscorlib]].b__5_0(System.ValueTuple`3,System.Reactive.Linq.ObservableImpl.EventProducer`2,System.IDisposable>)
PARAMETERS:
this (0x000000993515f560) = 0x000000991ce21b18
tuple = <no data>
LOCALS:
<no data>
<CLR reg> = 0x000000991cec5ec0
0x000000993515f510 = 0x000000991cec5f00
<no data>
<no data>
000000993515f560 00007ffc6ccc23e2 System.Reactive.Disposables.AnonymousDisposable`1[[System.ValueTuple`3[[System.__Canon, mscorlib],[System.__Canon, mscorlib],[System.__Canon, mscorlib]], System.ValueTuple]].Dispose()
PARAMETERS:
this (<CLR reg>) = 0x000000991cec63d8
000000993515f5c0 00007ffc6cb9478e System.Reactive.Disposables.Disposable.TryDispose(System.IDisposable ByRef)
PARAMETERS:
fieldRef = <no data>
LOCALS:
<no data>
000000993515f600 00007ffc6cca9314 System.Reactive.Linq.ObservableImpl.Throttle`1+_[[System.__Canon, mscorlib]].Dispose(Boolean)
PARAMETERS:
this = <no data>
disposing = <no data>
000000993515f630 00007ffc6cba797b System.Reactive.Sink`1[[System.__Canon, mscorlib]].Dispose()
PARAMETERS:
this (<CLR reg>) = 0x000000991cec6198
000000993515f690 00007ffc6cb9478e System.Reactive.Disposables.Disposable.TryDispose(System.IDisposable ByRef)
PARAMETERS:
fieldRef = <no data>
LOCALS:
<no data>
000000993515f6d0 00007ffc6cba9003 System.Reactive.ObserveOnObserverNew`1[[System.__Canon, mscorlib]].Dispose(Boolean)
PARAMETERS:
this (<CLR reg>) = 0x000000991cec5f90
disposing (<CLR reg>) = 0x0000000000000001
000000993515f710 00007ffc6cba797b System.Reactive.Sink`1[[System.__Canon, mscorlib]].Dispose()
PARAMETERS:
this (<CLR reg>) = 0x000000991cec5f90
000000993515f770 00007ffc6e1a697b GitUI.CommitInfo.CommitInfoHeader.DisposeCustomResources()
PARAMETERS:
this = <no data>
000000993515f7a0 00007ffc6e0b6643 GitUI.GitModuleControl.Dispose(Boolean)
PARAMETERS:
this (<CLR reg>) = 0x000000991ceb8388
disposing (<CLR reg>) = 0x0000000000000000
000000993515f7e0 00007ffc96873371 System.ComponentModel.Component.Finalize()
PARAMETERS:
this = <no data>
000000993515fbe0 00007ffc98896c26 [DebuggerU2MCatchHandlerFrame: 000000993515fbe0]
I also collected two dumps with .dump /m and .dump /mf, contact me (See GitHub profile) if those are necessary. I would like to avoid posting them in public because I'm not sure what's in them.
Current behaviour
The application crashes.
Expected behaviour
The application should not crash.
Steps to reproduce
This is an issue that seems to have appeared around the 3.0 release but I never took the time to investigate it. In this case I used the Visual Studio (2019) extension to open the 'File history', then went to the blame tab, clicked a commit, ctrl+g to go to line, then click the cross to close the window. It also happened in other scenarios, but I do not have details for those.
Screenshots
N/A
Did this work in previous version of GitExtensions
2.x did not have this issue as far as I can remember.
Environment
Diagnostics
I attached WinDbg as the JIT debugger, loaded the CLR magic and did
!analyze -v:Additionally I ran
!CLRStack -a:I also collected two dumps with
.dump /mand.dump /mf, contact me (See GitHub profile) if those are necessary. I would like to avoid posting them in public because I'm not sure what's in them.