- Joined
- Aug 6, 2011
- Messages
- 405
- Reaction score
- 3
- Points
- 18
In my work on catch-ctd, I realized that, depending on the problems involved, I might be able to "hot-patch" the Orbiter API for certain vessels, so they would work.
If I could use my hooks to change the functionality of the API to what the addon is expecting, the addon could work in new versions of Orbiter.
So I started with my personal favorite vessel, the DGIV, which may or may not be updated to the Beta when it is released (There was something about Dansteph stopping Orbiter development).
Here's the last call that crashes from catch-ctd:
The absense of dots shows me that oapiGetBaseByName did not return, and probably crashed on that call (it's the last thing logged)
Reading the API documentation, I would expect that function to return NULL.
Here's what the DGIV does on Orbiter 2010P1:
On it's first PostStep, the DGIV continues to check for a base named "no target", for every gbody in the simulation.
Has oapiGetBaseByName changed? It seems like a strange call to crash...
---------- Post added at 12:23 PM ---------- Previous post was at 12:19 PM ----------
Confirmed, getBaseByName is crashing on the beta. I replaced the function with one that always returns NULL and I get this in the logs:
the DGIV continues and exits out of the first post-step call. Of course it crashes later :lol: but I'm working on it 
If I could use my hooks to change the functionality of the API to what the addon is expecting, the addon could work in new versions of Orbiter.
So I started with my personal favorite vessel, the DGIV, which may or may not be updated to the Beta when it is released (There was something about Dansteph stopping Orbiter development).
Here's the last call that crashes from catch-ctd:
Code:
Inside DeltaGliderIV::GL-01::clbkPostStep:simt:0.01, simdt:0.01, mjd:60246.8
---snip---
Inside DeltaGliderIV::GL-01::clbkRCSMode:mode:1
...
oapiGetObjectByName:(name:no target)
returned:00000000...
oapiGetGbodyByIndex:(index:0)
returned:0AA4E480...
oapiGetBaseByName:(hPlanet:0AA4E480 , name:no target)
Reading the API documentation, I would expect that function to return NULL.
Here's what the DGIV does on Orbiter 2010P1:
Code:
oapiGetObjectByName:(name:no target)
returned:00000000...
oapiGetGbodyByIndex:(index:0)
returned:07B08048...
oapiGetBaseByName:(hPlanet:07B08048 , name:no target)
returned:00000000...
oapiGetGbodyByIndex:(index:1)
returned:0875F168...
oapiGetBaseByName:(hPlanet:0875F168 , name:no target)
returned:00000000...
--snip, continues---
Has oapiGetBaseByName changed? It seems like a strange call to crash...
---------- Post added at 12:23 PM ---------- Previous post was at 12:19 PM ----------
Confirmed, getBaseByName is crashing on the beta. I replaced the function with one that always returns NULL and I get this in the logs:
Code:
oapiGetObjectByName:(name:no target)
returned:00000000...
oapiGetGbodyByIndex:(index:0)
returned:0A9AE480...
oapiGetBaseByName_EDITED:(hPlanet:0A9AE480 , name:no target)
returned:00000000...
oapiGetGbodyByIndex:(index:1)
returned:1157ECF8...
oapiGetBaseByName_EDITED:(hPlanet:1157ECF8 , name:no target)
returned:00000000...
oapiGetGbodyByIndex:(index:2)
returned:115A09D8...
oapiGetBaseByName_EDITED:(hPlanet:115A09D8 , name:no target)
returned:00000000...
oapiGetGbodyByIndex:(index:3)
returned:115E6BB0...
oapiGetBaseByName_EDITED:(hPlanet:115E6BB0 , name:no target)
returned:00000000...
oapiGetGbodyByIndex:(index:4)
returned:115E3E80...
--snip--