-
-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crashes caused by "Unsupported key press" #524
Comments
I really have no idea how it could be happening. Somehow an unknown key arrives inside the emulator code at a point where that really shouldn't be happening. I can easily not make the emulation crash, just do nothing when that happens, but I'd really like to know how it comes to this. It happens 100% when pressing that certain button on the Razer Naga Pro mouse? Or is it somehow random? |
It's 100% of the time, at any point in the game. I've just found that DBP is detecting multiple key presses simultaneously. So when i use the volume wheel/knob on my keyboard, i can increase Windows 11 volume without any lock ups or crashes with Q2DOS. But when i do the same thing with a button on my mouse, that uses the exact same "Volume Up" Windows command, it then crashes Q2DOS. I've also now discovered that, for this specific mouse button, it locks up Q2DOS 100% of the time when Game Focus is either enabled or disabled. It makes no difference. The other key being detected is the right arrow key. Because when on the DBP Start Menu, if i press the same Volume Up mouse button, instead of just increasing the Windows volume, it will also input the right arrow key, because it's also changing the Auto Start and Skip Frames. No other core or any software does this, but DBP somehow detects a right arrow key press. Again, enabling/disabling Game Focus makes no difference. It might also be detecting other key presses apart from the right arrow key, because in QDOS (not Q2DOS), if i hold down the same Volume Up mouse button, it will move me backwards during gameplay, but very slowly, as if the down arrow key is quickly being tapped, instead of held down. Game Focus still makes no difference. I know this sounds like it could somehow be a problem with my mouse, but pressing a key while Game Focus is not enabled can also lock up both Windows 98 and DOS games in the same way. The only 2 differences are that it only happens when Game Focus is not enabled, and it happens very rarely. It's random. Certain keys are more likely to cause a lock up/freeze. This also happens with different keyboards and a laptop, which are not Razer products. Being as keys do different things when Game Focus isn't enabled, maybe that's interfering? Like in QDOS i've mapped |
All these cases you mention end with
or
in the log? |
Always for the mouse button. As for the key presses, I'm not sure if it was 100% of the time. So today i've been trying to recreate it, but being as it's rare and totally random, i can't get it to happen so far... But i'm certain that for at least some of the lock ups/freezes i see the "Unsupported key press" pop-up notification from RetroArch. |
To maybe figure out what that certain mapped button on the Razer Naga Pro does I wrote a simple input event logging tool. Can you try to do this for me:
Hopefully it logs something like this:
|
Here's the results for the Volume Up mouse button:
And this doesn't cause a crash so far, but just in case these buttons are doing something weird, here's the Volume Down mouse button as well:
|
Thank you! So it is quite similar to what I get from pressing just a regular volume up keyboard key. One more thing, can you check in RetroArch what you have set under Settings -> Drivers -> Input? |
I'm using the default And i just tried |
Interesting. I can't reproduce it by faking an input event that matches what your mouse is emitting so I'm still a bit lost. I just committed the only idea I have for what could be wrong. Can you try a build including the latest commit I just did? |
That's fixed it! :) I've tried As for the random and rare crashes caused by keyboard key presses, i'll just have to wait and see if these still happen, because i can't reproduce them, but after spamming loads of keys without Game Focus being enabled, i haven't had any problems so far. So i'll give it some time and if things continue looking good then i'll close this issue. |
Ah, now it all makes sense 😅 |
When recently testing many games for #519 i found that 4 or so games would crash when pressing certain keys/mouse buttons and Game Focus was not enabled.
When a crash happens the game will completely lock up most of the time, but other times it will crash back to the DOS command prompt and the sound will be stuck in a short 0.5 second loop. RA doesn't lock up though, so i can restart the game, which will fix the issue.
The problem with replicating this is that i've mostly forgot which keys/buttons i pressed whenever this has happened, but it always happens by pressing a certain button on my Razer Naga Pro mouse, and this button has been remapped to Volume Up in the Razer Synapse software. Obviously this can't be replicated without at least having a Razer mouse and this software. But i can consistently get the Quake II DOS backport to always crash when pressing the Volume Up button on this mouse. I also remember a game would crash simply by pressing the arrow keys, but can't remember which game.
Here is the Q2 crash from the log file:
This log isn't from a debug build, because annoyingly the DBP debug build does not crash with Q2! lol. It's only when i compile a "Release" build that the Q2 crash happens.
This "Unsupported key press" crash isn't a new problem either. For a long time now (maybe 3+ years) it has been a problem, but the crashes were rare so i didn't bothered reporting it, but recently it's been happening more due to the many games i've been testing. Again, it only happens when Game Focus is NOT enabled.
It will happen with:
Keyboard Layout
Core Option has been selected).The text was updated successfully, but these errors were encountered: