Makar8000 / ACT-Discord-Triggers

An ACT plugin for routing audio to discord
50 stars 14 forks source link

Error with DeInit of Discord Plugin #47

Closed Webberjo closed 2 years ago

Webberjo commented 5 years ago

I just noticed ACT_DicordTriggers.dll is causing the following error to be written to ACT's log file when I close ACT:

Application-Close 2019-05-30T21:44:24
***** 2019-05-30T21:44:24 - Entering SaveNewSettings
***** 2019-05-30T21:44:24 - Error with DeInit of Discord Plugin.
System.NullReferenceException: Object reference not set to an instance of an object.
   at DiscordAPI.DiscordClient.<deInIt>d__8.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at ACT_DiscordTriggers.DiscordPlugin.<DeInitPlugin>d__30.MoveNext()
   at Advanced_Combat_Tracker.FormActMain.WriteExceptionLog(Exception ex, String MoreInfo)
   at ACT_DiscordTriggers.DiscordPlugin.<DeInitPlugin>d__30.MoveNext()
   at System.Runtime.CompilerServices.AsyncVoidMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine)
   at ACT_DiscordTriggers.DiscordPlugin.DeInitPlugin()
   at Advanced_Combat_Tracker.FormActMain.SaveXmlActPlugins(XmlTextWriter xWriter)
   at Advanced_Combat_Tracker.FormActMain.SaveNewSettings(String XmlFileName)
   at Advanced_Combat_Tracker.FormActMain.FinalizeACT()
   at System.Windows.Forms.Form.OnFormClosing(FormClosingEventArgs e)
   at System.Windows.Forms.Form.WmClose(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at System.Windows.Forms.NativeWindow.DefWndProc(Message& m)
   at System.Windows.Forms.Form.DefWndProc(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.Form.WmSysCommand(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at System.Windows.Forms.NativeWindow.DefWndProc(Message& m)
   at System.Windows.Forms.Form.DefWndProc(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.Form.WmNcButtonDown(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at Advanced_Combat_Tracker.ActLoader.Main(String[] args)
*****
***** 2019-05-30T21:44:24 - Exiting SaveNewSettings: 253

This is logged for v1.0.1.0 as well as v1.0.0. This is logged when ACT is closed while ACT_DicordTriggers.dll is enabled, or when ACT is closed after disabling ACT_DicordTriggers.dll. This may or may not be the cause of recent technical difficulties I've been experiencing where trying to play a trigger while my bot is connected freezes ACT. For all I know it could be due to a recent Discord update.

Makar8000 commented 5 years ago

Can you try v1.0.1.1? Just pushed a fix.

Webberjo commented 5 years ago

Just tried v1.0.1.1 and got the exact same error message. Mind you, the only plugins I have added and enabled are FFXIV_ACT_Plugin.dll v1.7.2.14 and FFXIV_ACT_Plugin.dll v1.0.1.1.

Makar8000 commented 2 years ago

this should be fixed with the api update; feel free to open again if not