sardelka9515 / scripthookvdotnetcore Goto Github PK
View Code? Open in Web Editor NEWScriptHookV for .NET Core. Supports JIT and NativeAOT mode
License: Other
ScriptHookV for .NET Core. Supports JIT and NativeAOT mode
License: Other
Game is showing a CPU spike and then crashing after a few seconds. The generated code seems to be duplicating the Core.RegisterScript calls:
public static unsafe partial class EntryPoint
{
static void ModuleSetup()
{
Core.RegisterScript(new GTAUI.Runner());
Core.RegisterScript(new GTAUI.Tester());
Core.RegisterScript(new GTAUI.Runner());
Core.RegisterScript(new GTAUI.Tester());
Core.RegisterScript(new GTAUI.Runner());
Core.RegisterScript(new GTAUI.Tester());
Core.RegisterScript(new GTAUI.Runner());
Core.RegisterScript(new GTAUI.Tester());
Core.RegisterScript(new GTAUI.Runner());
Core.RegisterScript(new GTAUI.Tester());
Core.RegisterScript(new GTAUI.Runner());
Core.RegisterScript(new GTAUI.Tester());
}
}
ScriptHookVDotNetCore.log:
[2023-02-05 23:10:16.223] [Core] [info] Logging system initilized
[2023-02-05 23:10:16.269] [Core] [info] API hook created
[2023-02-05 23:10:16.269] [Core] [info] Loading base script module
[2023-02-05 23:10:16.269] [Core] [info] Writing resource
[2023-02-05 23:10:16.535] [Core] [info] Loading module D:\Apps\Steam\steamapps\common\Grand Theft Auto V\ScriptHookVDotNetCore.BaseScript.dll
[2023-02-05 23:10:16.601] [Core] [debug] GetModuleHandleEx flag modified for module 140735729236144
[2023-02-05 23:10:16.601] [Core] [debug] GetModuleHandleEx flag modified for module 140735729292912
[2023-02-05 23:10:16.601] [Core] [debug] GetModuleHandleEx flag modified for module 140735731992864
[2023-02-05 23:10:16.603] [Core] [info] Registering script: SHVDN.BaseScript
[2023-02-05 23:10:16.604] [Core] [info] Script registered: SHVDN.BaseScript
[2023-02-05 23:10:16.604] [Core] [info] Loaded module D:\Apps\Steam\steamapps\common\Grand Theft Auto V\ScriptHookVDotNetCore.BaseScript.dll
[2023-02-05 23:10:19.070] [Core] [debug] GetModuleHandleEx flag modified for module 140703378643264
[2023-02-05 23:10:19.203] [Core] [debug] GetModuleHandleEx flag modified for module 140735729200768
[2023-02-05 23:11:09.801] [Core] [info] Loading module D:\Apps\Steam\steamapps\common\Grand Theft Auto V\CoreScripts\GTAUI.dll
[2023-02-05 23:11:09.880] [Core] [debug] GetModuleHandleEx flag modified for module 140734121113504
[2023-02-05 23:11:09.881] [Core] [debug] GetModuleHandleEx flag modified for module 140734121170272
[2023-02-05 23:11:09.881] [Core] [debug] GetModuleHandleEx flag modified for module 140734123847696
[2023-02-05 23:11:09.883] [Core] [info] Registering script: GTAUI.Runner
[2023-02-05 23:11:09.884] [Core] [info] Script registered: GTAUI.Runner
[2023-02-05 23:11:09.884] [Core] [info] Registering script: GTAUI.Tester
[2023-02-05 23:11:09.884] [Core] [info] Script registered: GTAUI.Tester
[2023-02-05 23:11:09.884] [Core] [info] Registering script: GTAUI.Runner
[2023-02-05 23:11:09.884] [Core] [info] Script registered: GTAUI.Runner
[2023-02-05 23:11:09.884] [Core] [info] Registering script: GTAUI.Tester
[2023-02-05 23:11:09.884] [Core] [info] Script registered: GTAUI.Tester
[2023-02-05 23:11:09.884] [Core] [info] Registering script: GTAUI.Runner
[2023-02-05 23:11:09.884] [Core] [info] Script registered: GTAUI.Runner
[2023-02-05 23:11:09.884] [Core] [info] Registering script: GTAUI.Tester
[2023-02-05 23:11:09.884] [Core] [info] Script registered: GTAUI.Tester
[2023-02-05 23:11:09.884] [Core] [info] Registering script: GTAUI.Runner
[2023-02-05 23:11:09.884] [Core] [info] Script registered: GTAUI.Runner
[2023-02-05 23:11:09.884] [Core] [info] Registering script: GTAUI.Tester
[2023-02-05 23:11:09.884] [Core] [info] Script registered: GTAUI.Tester
[2023-02-05 23:11:09.884] [Core] [info] Registering script: GTAUI.Runner
[2023-02-05 23:11:09.884] [Core] [info] Script registered: GTAUI.Runner
[2023-02-05 23:11:09.884] [Core] [info] Registering script: GTAUI.Tester
[2023-02-05 23:11:09.884] [Core] [info] Script registered: GTAUI.Tester
[2023-02-05 23:11:09.884] [Core] [info] Loaded module D:\Apps\Steam\steamapps\common\Grand Theft Auto V\CoreScripts\GTAUI.dll
Assertion failed!
Program: ...ommon\Grand Theft Auto V\ScriptHookVDotNetCore.asi
File: D:\Github\scripthookvdotnetcore\src\core\nativehost.cpp
Line: 48
Expression: load_assembly_and_get_function_pointer != nullptr && "Failure: get_dotnet_load_assembly()"
For information on how your program can cause an assertion
failure, see the Visual C++ documentation on asserts
(Press Retry to debug the application - JIT must be enabled)
There's a know issue with SHVDN which cause the script or the game to crash when a C++ exception is thrown in the script thread. So if you encounter any crash upon installing this or any other scripts, try removing SHVDN first, resolve the error logged in ScriptHookVDotNetCore.log
first then proceed.
Either this problem has to be fixed in SHVDN or I have to change the error handling logic in the C++ core, which is quite a bit of work, that this issue can be completely resolved.
When I press Home to reload the scripts (RAGECOOP) the game crashes.
Nome do aplicativo com falha: GTA5.exe, versão: 1.0.2845.0, carimbo de data/hora: 0x63ee4cf2
Nome do módulo com falha: clr.dll, versão: 4.8.4614.0, carimbo de data/hora: 0x63995bc5
Código de exceção: 0xc00000fd
Deslocamento da falha: 0x0000000000682e80
ID do processo com falha: 0x540
Hora de início do aplicativo com falha: 0x01d971358b206d84
Caminho do aplicativo com falha: D:\Grand Theft Auto V\GTA5.exe
Caminho do módulo com falha: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
Crash also occurs when a client resource is loaded (Race). Tried with SkipLegalScreen=false
but no difference.
I can't help you because of my limited ability, but I hope you can come on, this is great!
This repository was not update for like 10 months and there is already .NET 8 which is a LTS version.
If I remove ScriptHookVDotNetCore.asi, ReShade works no problem without any issues. Strangely, in the SHVDNC settings INI, when I enable the debug console window, then ReShade works with SHVDNC no problem. Hopefully this won't be too hard to fix, but I'm not sure why these two are interacting with each other in the first place. Thanks!
Unable to load ScriptHookVDotNetCore.BaseScript.dll: System.BadImageFormatException: Could not load file or assembly 'file:///F:\Grand Theft Auto V\ScriptHookVDotNetCore.BaseScript.dll' or one of its dependencies. The module was expected to contain an assembly manifest.
In the NativeAOT compiled dll, .NET runtime registers a vectored exception handler with AddVectoredExceptionHandler
, the handler is not unregistered when the dll is unloaded. Subsequent calls to ntdll.dll!RtlpCallVectoredHandlers()
, which triggered by win32 exception dispatch, will fall into the handler in the unloaded module, causing an access violation.
Solution:
Hook AddVectoredExceptionHandler
to intercept registered handlers and unregistered them with RemoveVectoredExceptionHandler
right after the dll was unloaded.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.