Author Topic: SharpDX Exception  (Read 1743 times)

BobTheDestroyer

  • Newbie
  • *
  • Posts: 3
SharpDX Exception
« on: June 10, 2021, 11:46:19 AM »
Good Day!

I currently bought voiceattack and VIACOM PRO for use with DCS.

Voiceattack is crashing after attempting to assign a joystick in Joystick Options. Upon clicking Assign Joystick, I get a program does not respond, but after 30 seconds Im able to assign a Joystick. However, when testing, VA does not recognize any assigned joystick input and soon after crashes. This started occuring while I was testing in DCS. I ALT TABBED out of DCS to troubleshoot a input issue I was having and to be sure I did not have any Hotkeys activated. I opened the Joystick Option to be sure the correct device was assigned and then attempted to test the device in VA. Thats when VA crashed with the exception and continues to do so ONLY when attempting to assign a device and test. I am using a VPC WarBRD base for my Thrustmaster A10 Stick and the Thrustmaster A10 Throttle. I assigned the Throttle as the primary device.

I have attempted to use other devices with the same outcome. I have unistalled/reinstalled both VA and VIACOM PRO plugins, I have run diagdx.exe in command prompt with no issues, and updated the device drivers. The only solution I have not attempted is to uninstall/reinstall the devices and drivers. Any help would be greatly appreciated.

Event Viewer gives me this Error

Quote
Log Name:      Application
Source:        VoiceAttack
Date:          6/10/2021 1:21:16 PM
Event ID:      5150
Task Category: None
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      DESKTOP-JM8HCIR
Description:
SharpDX.SharpDXException: HRESULT: [0x80070006], Module: [General], ApiCode: [E_HANDLE/Invalid handle], Message: The handle is invalid.

   at SharpDX.Result.CheckError()
   at SharpDX.DirectInput.Device.SetCooperativeLevel(IntPtr arg0, CooperativeLevel arg1)
   at VAJS.VAJS.(Guid , Int32 )
   at VAJS.VAJS.()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   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()
***VoiceAttack v1.8.7 - Windows 10.0.19041.0
Event Xml:
<Event xmlns='http://schemas.microsoft.com/win/2004/08/events/event'><System><Provider Name='VoiceAttack'/><EventID Qualifiers='0'>5150</EventID><Version>0</Version><Level>2</Level><Task>0</Task><Opcode>0</Opcode><Keywords>0x80000000000000</Keywords><TimeCreated SystemTime='2021-06-10T17:21:16.1339538Z'/><EventRecordID>11004</EventRecordID><Correlation/><Execution ProcessID='0' ThreadID='0'/><Channel>Application</Channel><Computer>DESKTOP-JM8HCIR</Computer><Security/></System><EventData><Data>SharpDX.SharpDXException: HRESULT: [0x80070006], Module: [General], ApiCode: [E_HANDLE/Invalid handle], Message: The handle is invalid.

   at SharpDX.Result.CheckError()
   at SharpDX.DirectInput.Device.SetCooperativeLevel(IntPtr arg0, CooperativeLevel arg1)
   at VAJS.VAJS.(Guid , Int32 )
   at VAJS.VAJS.()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   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()
***VoiceAttack v1.8.7 - Windows 10.0.19041.0</Data></EventData></Event>]


Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4761
  • RTFM
Re: SharpDX Exception
« Reply #1 on: June 10, 2021, 11:57:04 AM »
Does this freeze/hang also occur if you attempt to open the "Joystick Options" window while all of your joystick devices are disconnected?


Just to make sure: Does it still occur when you disable plugin support? Click the wrench icon on VoiceAttack's main window, and on the "General" tab of the VoiceAttack options window uncheck the "Enable Plugin Support" option, click "OK", click "OK", then restart VoiceAttack

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2825
Re: SharpDX Exception
« Reply #2 on: June 10, 2021, 12:03:35 PM »
Hi, BobTheDestroyer

I haven't seen that type of error since 2016:  https://forum.voiceattack.com/smf/index.php?topic=285.0

From that thread, the solution for the OP ended up being the just downloading the zipped package and replacing the files in the installation directory (not sure how that fixed it, but apparently it did).

You can download the zipped install by going here:  http://www.voiceattack.com/currentzipped

Hope that helps!

BobTheDestroyer

  • Newbie
  • *
  • Posts: 3
Re: SharpDX Exception
« Reply #3 on: June 10, 2021, 12:10:00 PM »
No the freeze does not occur when opening the Joystick Options.

I just solved my issue, for now. For some reason my Corsair K55 keyboard is causing the freeze/hang up. While the freeze was occurring I unplugged my Keyboard and it unfroze. I was able to assign my throttle and the test validated my throttle inputs.

It dawned on me to unplug my keyboard because this has happened with Assetto Corsa (racing sim) while attempting to assign input devices. Id have to unplug my keyboard to unfreeze and to get other devices recognized and once the freeze and devices are assigned Id plug my keyboard back in. Pain in the rear and an odd error but it works.

If I run into any more issues regarding this exception Ill be sure to drop them here. I found 9 older posts with the same issue so I assume this is a rare issue.

EDIT: Pfeil and Gary thanks for the quick responses and tips.
 

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4761
  • RTFM
Re: SharpDX Exception
« Reply #4 on: June 10, 2021, 12:14:51 PM »
When you try to open the dialog listing joystick devices after clicking the "Assign" button, rather*


Have you checked for any driver or companion software updates for your keyboard?

BobTheDestroyer

  • Newbie
  • *
  • Posts: 3
Re: SharpDX Exception
« Reply #5 on: June 10, 2021, 12:20:52 PM »
When you try to open the dialog listing joystick devices after clicking the "Assign" button, rather*


Have you checked for any driver or companion software updates for your keyboard?

Yes the freeze occurs after clicking the "Assign" button. Good clarification.

Looking into that right now. Hopefully updated drivers will work. If not then I at least know where the problem is and hopefully will help someone else in the future if they run into the same issue. Just start unplugging devices and troubleshoot from there lol.