LoadScript Fails #859
Closed
hudkinsnoah
started this conversation in
Support requests
Replies: 1 comment
-
I was able to resolve this issue. There was nothing wrong with the JSBsim code. It had to do with calling loadmodel before calling loadscript which causes ModelLoaded to be set to false. Once I took out that call, it worked just fine |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to load a script by invoking
FDMExec->LoadScript(SGPath(script))
This never returns because of a null access exception. The call stack looks like this:My local source file will invoke LoadScript, this calls the FGScript instance of LoadScript, and during this call, at line 185, there is a call to GetIC. This is where it is failing, saying
this was nullptr
. I don't understand though, why this would be null? I have called GetIC just before invoking LoadScript and it returns fine.Any help would be appreciated with this!
UPDATE: After doing some debugging, it seems to be coming from the call to
LoadModel
. Directly after this, the reference is null. When looking at this function, it checks if a model is loaded already and if so it will deallocate, and reallocate a lot of information. I would think that this would reinitialize the IC variable, but it doesn't appear to be doing that.Beta Was this translation helpful? Give feedback.
All reactions