Open Hrobo776 opened 8 months ago
What does it show in the details inside the unhandled exception error?
And it doesn't work when run as admin, since when running as admin it can't read the data from WMP that's running as user
This is what it says exactly
See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box.
** Exception Text ** System.NullReferenceException: Object reference not set to an instance of an object. at Discord_WMP.Form1.update_Tick(Object sender, EventArgs e) in C:\Users\tobik\Source\Repos\T0biasCZe\Windows-Media-Player-Discord-RPC\Discord WMP\Form1.cs:line 301 at System.Windows.Forms.Timer.OnTick(EventArgs e) at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
** Loaded Assemblies ** mscorlib Assembly Version: 4.0.0.0 Win32 Version: 4.8.9181.0 built by: NET481REL1LAST_C CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
Discord WMP Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///E:/DRP4WMP/Discord%20WMP.exe
System.Windows.Forms Assembly Version: 4.0.0.0 Win32 Version: 4.8.9181.0 built by: NET481REL1LAST_C CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
System Assembly Version: 4.0.0.0 Win32 Version: 4.8.9206.0 built by: NET481REL1LAST_B CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
System.Drawing Assembly Version: 4.0.0.0 Win32 Version: 4.8.9037.0 built by: NET481REL1 CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
System.Configuration Assembly Version: 4.0.0.0 Win32 Version: 4.8.9037.0 built by: NET481REL1 CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
System.Core Assembly Version: 4.0.0.0 Win32 Version: 4.8.9200.0 built by: NET481REL1LAST_C CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
System.Xml Assembly Version: 4.0.0.0 Win32 Version: 4.8.9037.0 built by: NET481REL1 CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
Accessibility Assembly Version: 4.0.0.0 Win32 Version: 4.8.9037.0 built by: NET481REL1 CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
Interop.WMPLib Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///E:/DRP4WMP/Interop.WMPLib.DLL
CsvHelper Assembly Version: 30.0.0.0 Win32 Version: 30.0.1.0 CodeBase: file:///E:/DRP4WMP/CsvHelper.DLL
Microsoft.Bcl.AsyncInterfaces Assembly Version: 1.0.0.0 Win32 Version: 4.700.19.46214 CodeBase: file:///E:/DRP4WMP/Microsoft.Bcl.AsyncInterfaces.DLL
System.Numerics Assembly Version: 4.0.0.0 Win32 Version: 4.8.9037.0 built by: NET481REL1 CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll
Microsoft.Bcl.HashCode Assembly Version: 1.0.0.0 Win32 Version: 4.700.19.46214 CodeBase: file:///E:/DRP4WMP/Microsoft.Bcl.HashCode.DLL
Anonymously Hosted DynamicMethods Assembly Assembly Version: 0.0.0.0 Win32 Version: 4.8.9181.0 built by: NET481REL1LAST_C CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/mscorlib/v4.0_4.0.0.0__b77a5c561934e089/mscorlib.dll
DiscordRPC Assembly Version: 1.2.1.24 Win32 Version: 1.2.1.24 CodeBase: file:///E:/DRP4WMP/DiscordRPC.DLL
** JIT Debugging ** To enable just-in-time (JIT) debugging, the .config file for this application or computer (machine.config) must have the jitDebugging value set in the system.windows.forms section. The application must also be compiled with debugging enabled.
For example:
When JIT debugging is enabled, any unhandled exception will be sent to the JIT debugger registered on the computer rather than be handled by this dialog box.
I updated the program but it still wouldnt open, still throwing the same Unhandled exception error as seen in the first image
hmm do you have discord installed and running? since in the error it mentions line 301, on which the discord rich presence is being set. and it may throw error
(if you do not want to use discord there is checkbox in settings to disable the discord functionality)
Also having this error, runs fine with Discord and Windows Media Player closed, but then immediately throws errors when Discord is opened
this is my error message
See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box.
** Exception Text ** System.NullReferenceException: Object reference not set to an instance of an object. at Discord_WMP.Form1.update_Tick(Object sender, EventArgs e) in C:\Users\tobik\Source\Repos\T0biasCZe\Windows-Media-Player-Discord-RPC\Discord WMP\Form1.cs:line 307 at System.Windows.Forms.Timer.OnTick(EventArgs e) at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
** JIT Debugging ** To enable just-in-time (JIT) debugging, the .config file for this application or computer (machine.config) must have the jitDebugging value set in the system.windows.forms section. The application must also be compiled with debugging enabled.
For example:
When JIT debugging is enabled, any unhandled exception will be sent to the JIT debugger registered on the computer rather than be handled by this dialog box.
please try this build if it works or if it still throws error [old file deleted]
unfortunately this now doesn't ask me about Discord at all and shows these windows. It does not sync with discord either, but there are no errors thrown
I apologize, I accidentally uploaded old zip, this is the file with the potential fix implemented: Discord WMP.zip
Hi again and thanks for all your help, Unfortunately, while not crashing and now displaying the data correctly in the window, it is not showing in Discord still at this stage. Is there anything more I need to do?
Also when I click the taskbar tray icon to open the window and view the data, it will work for a couple of seconds before crashing and closing, unfortunately without an error report
try inserting "1076519967631093891" into the empty textbox at the top (without the quotes)
Unfortunately this doesn't do anything When I click the settings button the app still crashes after a few seconds and it doesn't link to my Discord
When you restart it does the ID you entered get saved or not (it should) Because what worries me is that in the debug values, it shows "Initialized: False", so the Discord RPC doesn't want to get started for some reason even though it's enablrd
Dne po 22. 1. 2024 14:46 uživatel Casper @.***> napsal:
crash.discord.wmp.2.gif (view on web) https://github.com/T0biasCZe/Windows-Media-Player-Discord-RPC/assets/56348046/2bee9fce-3fd1-41df-aaac-47484f3fbe09
— Reply to this email directly, view it on GitHub https://github.com/T0biasCZe/Windows-Media-Player-Discord-RPC/issues/5#issuecomment-1904038618, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKTWPBQMM3FWQ2RDOMDASULYPZUUVAVCNFSM6AAAAABAYINF5CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBUGAZTQNRRHA . You are receiving this because you commented.Message ID: @.*** com>
Whenever I run the exe file, it detects the WMP and the song/music its playing, however, it throws an unhandled exception error right after it loads up.![image](https://github.com/T0biasCZe/Windows-Media-Player-Discord-RPC/assets/154055859/12dd5fb2-5974-404f-bdb9-682cb0e952a6)
I decided to run the exe as administrator hoping it would work, it loads just fine, however, it doesnt detect WMP and just says "Stopped". Console reads: "error trying to read WMP data, retrying", followed by another line saying "aborting", repeating every second![image](https://github.com/T0biasCZe/Windows-Media-Player-Discord-RPC/assets/154055859/e69ff7e7-2892-4bc8-9f50-4ea37da1ba28)