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

Crash after a few minutes #74

Closed
crosire opened this issue May 14, 2015 · 17 comments
Closed

Crash after a few minutes #74

crosire opened this issue May 14, 2015 · 17 comments
Labels

Comments

@crosire
Copy link
Owner

crosire commented May 14, 2015

Apparently 4f10ef0 introduced a new bug where the game does crash after being ingame for a few minutes.

@crosire crosire added the bug label May 14, 2015
@froggz19
Copy link

Same here but after a few seconds, not minutes.

@MarcusBlackX
Copy link

Yes but for me it's around 5 - 10 seconds after story mode loads and crashes.

@ghost
Copy link

ghost commented May 15, 2015

Same here, crashing after 3-5 seconds

@Monsterxsync
Copy link

Same here after story loads pretty much instantly. Just using old version
for now.
On 15/05/2015 6:31 pm, "Johannes Jacobs" notifications@github.com wrote:

Same here, crashing after 3-5 seconds


Reply to this email directly or view it on GitHub
#74 (comment)
.

@Nacorpio
Copy link
Contributor

I won't update my mod to the new version unless this gets fixed.

@Ethenal
Copy link

Ethenal commented May 15, 2015

You can check out the commit before the bugged one if you want to have a functioning version.

@ghost
Copy link

ghost commented May 15, 2015

I hope this will get fixed soon.

@crosire
Copy link
Owner Author

crosire commented May 15, 2015

Rewrote the whole script management backend. Each script now gets its own thread to run in. They are still executed sequentially (some tests showed that things started to go crazy if not), but it comes with some benefits:

  • Scripts can be aborted completly (and cleanly).
  • Script Hook now checks if scripts are responsive. If one blocks the game and times out it will be aborted automatically to prevent the game from crashing.
  • Calling "Script::Wait" no longer blocks everything, it only waits in the script it was requested in, all others continue to run.

@IncoCode
Copy link
Contributor

Good job 👍

@RainerHilmer
Copy link

Excellent! 👍

@froggz19
Copy link

Great job 👍

@Nacorpio
Copy link
Contributor

I get an error in the Main constructor when I try to launch the script.
[15:18:33] [ERROR] Failed to instantiate script 'GTAV_purge_mod.Main' because constructor threw an exception: System.NullReferenceException: Objektreferensen har inte angetts till en instans av ett objekt.

I'm sure that there isn't a NullReferenceException in any of the fields.

Full error:
*[15:29:24] [ERROR] Failed to instantiate script 'GTAV_purge_mod.Main' because constructor threw an exception: System.NullReferenceException: Objektreferensen har inte angetts till en instans av ett objekt. vid GTA.ScriptDomain.ExecuteTask(IScriptTask task) vid GTA.Native.Function.Call[T](UInt64 hash, InputArgument[] arguments) vid GTA.Game.get_Player() vid GTAV_purge_mod.Main..ctor()*

@crosire
Copy link
Owner Author

crosire commented May 16, 2015

Natives cannot be called in the constructor currently.

@Nacorpio
Copy link
Contributor

I remove the natives, and now I get the following error:
*System.NullReferenceException: Objektreferensen har inte angetts till en instans av ett objekt. vid GTAV_purge_mod.Main.OnTick(Object sender, EventArgs e) vid GTA.Script.raise_Tick(Object value0, EventArgs value1) vid GTA.Script.MainLoop()*

@ghost
Copy link

ghost commented May 16, 2015

Getting NullReferenceExceptions as fuck.

@Nacorpio
Copy link
Contributor

Somehow, it works for me now.
I don't know what I did to make it work, but it does.

@crosire
Copy link
Owner Author

crosire commented May 16, 2015

You can now (starting with 7900b0c) call natives in the constructor again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants