A few more findings today:
If I set
I'm guessing this is because those surface textures simply do not support TileFormat = 1? Removing the planet folders in
Some stepping through the code allowed me to narrow down the location where the access violation seems to occur:
Specifically, line 372 in
If I set
TileFormat = 1 in the Earth.cfg, Moon.cfg and Mars.cfg files, Orbiter starts successfully in console mode. But running with the D3D9client causes the program to CTD after the scene has initialized. I.e. the last lines in Orbiter.log look like this:
Code:
000025.669: D3D9: [Scene Initialized]
000025.888: Finished initialising panels
Textures does not cause a CTD.Some stepping through the code allowed me to narrow down the location where the access violation seems to occur:
Code:
Orbiter.exe!ZTreeMgr::Inflate(const unsigned char * inp, unsigned long ninp, unsigned char * outp, unsigned long noutp) Line 207
at S:\Orbiter-build\orbiter\Src\Orbiter\ZTreeMgr.cpp(207)
Orbiter.exe!ZTreeMgr::ReadData(unsigned long idx, unsigned char * * outp) Line 191
at S:\Orbiter-build\orbiter\Src\Orbiter\ZTreeMgr.cpp(191)
[Inline Frame] Orbiter.exe!ZTreeMgr::ReadData(int) Line 97
at S:\Orbiter-build\orbiter\Src\Orbiter\elevmgr.cpp(167)
Orbiter.exe!ElevationManager::LoadElevationTile(int lvl, int ilat, int ilng, double tgt_res) Line 167
at S:\Orbiter-build\orbiter\Src\Orbiter\elevmgr.cpp(167)
Orbiter.exe!ElevationManager::Elevation(double lat, double lng, int reqlvl, std::vector<ElevationTile,std::allocator<ElevationTile>> * tilecache, Vector * normal, int * reslvl) Line 372
at S:\Orbiter-build\orbiter\Src\Orbiter\elevmgr.cpp(372)
Orbiter.exe!Planet::Elevation(double lng, double lat) Line 984
at S:\Orbiter-build\orbiter\Src\Orbiter\Planet.cpp(984)
Orbiter.exe!Base::Setup() Line 340
at S:\Orbiter-build\orbiter\Src\Orbiter\Base.cpp(340)
Orbiter.exe!Planet::Setup() Line 700
at S:\Orbiter-build\orbiter\Src\Orbiter\Planet.cpp(700)
Orbiter.exe!Planet::Planet(char * fname) Line 427
at S:\Orbiter-build\orbiter\Src\Orbiter\Planet.cpp(427)
Orbiter.exe!PlanetarySystem::Read(char * fname, const Config * config, void(*)(const char *, int, void *) outputLoadStatus, void * callbackContext) Line 193
at S:\Orbiter-build\orbiter\Src\Orbiter\Psys.cpp(193)
Orbiter.exe!PlanetarySystem::PlanetarySystem(char * fname, const Config * config, void(*)(const char *, int, void *) outputLoadStatus, void * callbackContext) Line 28
at S:\Orbiter-build\orbiter\Src\Orbiter\Psys.cpp(28)
Orbiter.exe!Orbiter::InitializeWorld(char * name) Line 285
at S:\Orbiter-build\orbiter\Src\Orbiter\Orbiter.cpp(285)
Orbiter.exe!Orbiter::CreateRenderWindow(Config * pCfg, const char * scenario) Line 785
at S:\Orbiter-build\orbiter\Src\Orbiter\Orbiter.cpp(785)
Orbiter.exe!Orbiter::Launch(const char * scenario) Line 714
at S:\Orbiter-build\orbiter\Src\Orbiter\Orbiter.cpp(714)
Orbiter.exe!orbiter::LaunchpadDialog::DlgProc(HWND__ * hWnd, unsigned int uMsg, unsigned int wParam, long lParam) Line 350
at S:\Orbiter-build\orbiter\Src\Orbiter\Launchpad.cpp(350)
[External Code]
[Frames below may be incorrect and/or missing, no symbols loaded for user32.dll]
Orbiter.exe!orbiter::LaunchpadDialog::ConsumeMessage(tagMSG * pmsg) Line 149
at S:\Orbiter-build\orbiter\Src\Orbiter\Launchpad.cpp(149)
Orbiter.exe!Orbiter::Run() Line 1084
at S:\Orbiter-build\orbiter\Src\Orbiter\Orbiter.cpp(1084)
Orbiter.exe!WinMain(HINSTANCE__ * hInstance, HINSTANCE__ * __formal, char * strCmdLine, int nCmdShow) Line 246
at S:\Orbiter-build\orbiter\Src\Orbiter\Orbiter.cpp(246)
[External Code]
Specifically, line 372 in
elevmgr.cpp is the elevation tile loading loop, and the exception only occurs after the value of lvl falls to 6 (down from the initial value of 14). I'm guessing this points to some heap corruption that only kicks in after a certain number of tiles have been loaded.

