Menu

#1 0xC0000005 in O2010 when rerunning w/"De-allocate memory..."

open
nobody
None
5
2010-06-13
2010-06-13
No

Orbiter 2010 doesn't unload plug-in modules when "De-allocate memory and display launchpad dialog" option of "Orbiter shutdown options" is used to close the simulation and return to the launchpad. This causes wrong initialization of TransX for the next run scenario with TransX used.

The Access Violation exception occurs in oapiGetRelativePos, which is called indirectly from opcPostStep callback, for the second OBJHANDLE argument of oapiGetRelativePos which is invalid (oapiGetRelativePos(hmajor,hcraft,&posvector);):
[code]
DLLCLBK void opcPostStep(double SimT, double SimDT, double mjd)
{
static int choose; // this shouldn't be static
if (choose!=0)
{
shipptrs::backgroundaction();
choose=0;
}
else
{
MFDFunction::donextaction();
choose=1;
}
}
[/code]
The main cause for access violation exception, is "static int choose", which isn't reset after simulation close.

In the back trace after the exception, the opcPostStep and subsequent functions were calling:
[list=1][*]void shipptrs::backgroundaction();
[*]bool transxstate::checkbasefunction();
[*]bool basefunction::soistatus();
[*]VECTOR3 posvector; oapiGetRelativePos(hmajor,hcraft,&posvector); // where hmajor and hcraft object handles might not be yet initialized properly after simulation restart.[/list]

The issue isn't present when Orbiter process is respawned or terminated before returning to the launchpad, prior to the next simulation session using TransX.

There might be useful details about this bug at Orbiter 2010 bug reports at O-F:
http://www.orbiter-forum.com/project.php?issueid=407

Discussion


Log in to post a comment.

MongoDB Logo MongoDB