Git Product home page Git Product logo

scripthookvdotnetcore's People

Contributors

sardelka9515 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

scripthookvdotnetcore's Issues

Running duplicated instances of every script

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

Crash at the beginning of the game


Microsoft Visual C++ Runtime Library

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)

Issue running with ScriptHookVDotNet

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.

Game crashes on script reload

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.

It's incredible!!

I can't help you because of my limited ability, but I hope you can come on, this is great!

Is this still maintained?

This repository was not update for like 10 months and there is already .NET 8 which is a LTS version.

ScriptHookVDotNetCore prevents ReShade (dxgi.dll) from loading

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.

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.

Crash when a c++ exception is thrown after a module was unloaded

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.