Observed:
Plugin stops and remains unchecked.
ACT's error log contains:
***** 2019-11-07T13:54:28 - Plugin Update Check
System.Threading.ThreadAbortException: Thread was being aborted.
at System.Threading.WaitHandle.WaitOneNative(SafeHandle waitableSafeHandle, UInt32 millisecondsTimeout, Boolean hasThreadAffinity, Boolean exitContext)
at System.Threading.WaitHandle.InternalWaitOne(SafeHandle waitableSafeHandle, Int64 millisecondsTimeout, Boolean hasThreadAffinity, Boolean exitContext)
at System.Threading.WaitHandle.WaitOne(Int32 millisecondsTimeout, Boolean exitContext)
at System.Windows.Forms.Control.WaitForWaitHandle(WaitHandle waitHandle)
at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
at Advanced_Combat_Tracker.ThreadInvokes.CheckboxSetChecked(Form parent, CheckBox target, Boolean isChecked)
at DFAssist.Helpers.ACTPluginUpdateHelper.FormActMain_UpdateCheckClicked()
at Advanced_Combat_Tracker.FormActMain.WriteExceptionLog(Exception ex, String MoreInfo)
at DFAssist.Helpers.ACTPluginUpdateHelper.FormActMain_UpdateCheckClicked()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
*****
The FFXIV plugin actually had this exact problem before, so it was easy to identify.
Your plugin deinit method will dispose objects and part of your disposing will abort owned threads.
My suggestion is to make the thread a background thread and avoid aborting it like this.
Steps:
Observed: Plugin stops and remains unchecked. ACT's error log contains:
The FFXIV plugin actually had this exact problem before, so it was easy to identify. Your plugin deinit method will dispose objects and part of your disposing will abort owned threads.
My suggestion is to make the thread a background thread and avoid aborting it like this.