Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Crash when using KVM switches?  (Read 2347 times)

0 Members and 1 Guest are viewing this topic.

Koobazaur

  • Newbie
  • *
  • Posts: 28
    • View Profile
Crash when using KVM switches?
« on: August 26, 2013, 09:36:52 pm »
Hey all,

so my game Postmortem: one must die has been out for a while running on SFML 2.0 beautifully - thanks for the amazing library guys :D

One user just told me he gets a crash about 30% of the time if he triggers his KVM switch while the game is running. He said windows crashed report had this:

Quote
*****
Problem signature:
  Problem Event Name:    APPCRASH
  Application Name:    PostmortemGame.exe
  Application Version:    0.0.0.0
  Application Timestamp:    520b06d3
  Fault Module Name:    DINPUT.DLL
  Fault Module Version:    6.1.7600.16385
  Fault Module Timestamp:    4a5bd9c0
  Exception Code:    c0000005
  Exception Offset:    00013f1d
  OS Version:    6.1.7601.2.1.0.256.48
  Locale ID:    1033
  Additional Information 1:    0a9e
  Additional Information 2:    0a9e372d3b4ad19135b953a78882e789
  Additional Information 3:    0a9e
  Additional Information 4:    0a9e372d3b4ad19135b953a78882e789

Read our privacy statement online:
  http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409

If the online privacy statement is not available, please read our privacy statement offline:
  C:\Windows\system32\en-US\erofflps.txt
*****

DINPUT - direct input. I don't do any handling directly or Joypad support, it all goes through the standard SF mouse and keybaord events. I searched forums and bug repository and didn't see anything, so wondering if it's really SFML/my game related or something on the end user. anyone every encountered this or might have any thoughts on the topic?
« Last Edit: August 26, 2013, 09:39:11 pm by Koobazaur »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: Crash when using KVM switches?
« Reply #1 on: August 26, 2013, 11:32:38 pm »
For those that don't know what a KVM switch is: Keyboard Video Mouse switch

Well it seems like the Windows API abstraction is in the end somewhere using DINPUT, unfortunately I couldn't figure out what exactly - not that it would really help, but would've been fun/interesting (interestingly enough opengl32.dll depends on ddraw.dll).

This issues seems like a Windows related one and not really something SFML can change. If you want you can ask him to try other games (that use dinput "somehow"), I'm fairly certain he'll get issues there as well. Of course it doesn't help your game, but at some point one can't always fix everything, especially if it's a driver or similar issue.
If however you could get your hands on a similar KVM you could try to nail down the issue and might come up with something to prevent it, other than that it seems like a lost case. :-\
« Last Edit: August 26, 2013, 11:34:23 pm by eXpl0it3r »
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

The Hatchet

  • Full Member
  • ***
  • Posts: 135
    • View Profile
    • Email
Re: Crash when using KVM switches?
« Reply #2 on: August 27, 2013, 05:05:53 am »
No computer likes having their inputs/outputs switched around on the fly.  It seems to be a problem with the direct input driver (mouse/keyboard) with the OS may have issues with.  To me flipping a KVM switch mid game is like throwing your car from Drive to Reverse while still in 3rd gear...nothing good can come from it. 

You'd probably have to include code to check for different inputs/outputs every few seconds to correct for this.  Which depending if this is more of an OS level coding may or may not be process intensive :/

 

anything