question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Game crashes when holding down keys during a loading screen

See original GitHub issue

Please note: ScriptHookVDotNet is NOT ScriptHookV!

Issue only occurs when ScriptHookVDotNet.dll is installed


Version Both latest release 3.6.0 and latest main commit f75c4a5

Description This has been known for years in the speedrunning community but I haven’t had the time to investigate it. Originally it was believed that holding down any character switch key during a loading screen causes ScriptHookVDotNet to crash the game (this is used in a glitch called savewarping).

I decided to investigate because I’m planning on using ScriptHookVDotNet for a project. It seems that the game will crash if you hold down any button. This is related to the console and I’ve pasted an Event Viewer error below (couldn’t debug it in VS because the anticheat/DRM crashes the game if you have a debugger attached during a loading screen regardless).

Application: GTA5.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.AppDomainUnloadedException
   at SHVDN.Console.DoKeyEvent(System.Windows.Forms.Keys, Boolean)
   at <Module>.?A0xddd40208.ScriptHookVDotnet_ManagedKeyboardMessage(UInt32, Boolean, Boolean, Boolean, Boolean)

It doesn’t crash 100% of the time, I loaded successfully once with F6 and twice with U. I tried adding try/catches for the exception but it didn’t seem to solve the issue. I’ll leave this to someone more experienced to investigate I think.

Issue Analytics

  • State:closed
  • Created 6 months ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
kagikncommented, Apr 12, 2023

Just noting that the issue seems to be fixed with #1192 but out of nowhere I’ve started to experience the Project 1.27 crash on one of my two devices. Really weird because I’m almost confident it worked before when I tested f75c4a5. On my other device both 3.6.0, f75c4a5 and 5c368c3 work fine. I’ll probably open another issue about it

I just Identified what commit made SHVDN being imcompatible with Project 1.27. It’s ee58753. You can track the issue in #1202.

0reactions
Gogsicommented, Apr 5, 2023

Just noting that the issue seems to be fixed with #1192 but out of nowhere I’ve started to experience the Project 1.27 crash on one of my two devices. Really weird because I’m almost confident it worked before when I tested f75c4a5. On my other device both 3.6.0, f75c4a5 and 5c368c38e9236d33c6e01ed9f1286b02784bf993 work fine. I’ll probably open another issue about it

Read more comments on GitHub >

github_iconTop Results From Across the Web

GamePass User, has the Load Screen SPACEBAR = ...
The best solution for me is to open the game multiple times at once (it lets you). Then when one crashes, the other...
Read more >
Programs freeze when Holding a key down. " Saurbraten ...
1. Click Start, type msconfig in the Start Search box, and then press ENTER. If you are prompted for an administrator password or ......
Read more >
Game freezes/lags when holding any key. :: Garry's Mod ...
I tried holding down a key in the main menu and the same thing happened. I couldn't click on anything and nothing would...
Read more >
Game crashes when bracket keys are pressed
Upon pressing the bracket keys to switch vessels, the game will crash. The game will remain to play, but I lose the ability...
Read more >
PC Crash on loading savegame [DO:2DE]
Try doing a clean boot and then test the game. Start/restart your Mac and hold the Shift key down as soon as the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found