Skip to content
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

Native.Function.Call can only be called from the main thread. #24

Open
notaimless opened this issue Mar 26, 2020 · 2 comments
Open

Native.Function.Call can only be called from the main thread. #24

notaimless opened this issue Mar 26, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@notaimless
Copy link
Contributor

I have gotten this before. Reloading scripts usually fixed it . But now its every time. Even the example script. The only way i can stop it is to set tick to 1000. Then after a few seconds set tick to 1.
[19:44:49] [ERROR] Caught fatal unhandled exception:
System.InvalidOperationException: Native.Function.Call can only be called from the main thread.
at RDR2.Native.Function.Call[T](Hash hash, InputArgument[] arguments)
at RDR2.Game.get_Player()
at ExampleScript.Main.OnTick(Object sender, EventArgs e) in c:\Program Files (x86)\Steam\steamapps\common\Red Dead Redemption 2\scripts\ExampleScript.cs:line 24
at RDR2DN.Script.MainLoop()
[19:44:49] [ERROR] The exception was thrown while executing the script ExampleScript.Main.
[19:44:49] [WARNING] Aborted script ExampleScript.Main.
[19:44:54] [ERROR] Script 'ExampleScript.Main' is not responding! Aborting ...
[19:44:54] [WARNING] Aborted script ExampleScript.Main.

@Saltyq Saltyq added the bug Something isn't working label Apr 1, 2020
@Saltyq
Copy link
Owner

Saltyq commented Apr 1, 2020

Thanks for reporting, and sorry for delayed response.
Working to fix.

@notaimless
Copy link
Contributor Author

Reinstalled C++ runtimes. And its working again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants