I want to add a couple of functions to the LuaInterpreter.dll that suit my needs for a challenge I am creating.
Before adding anything to the source files, I tried to recompile the vanilla ones that come with Orbiter 2010 P1, to see if I have the development environment setup properly.
But I am getting these warnings:
they correspond to these lines of code (which I haven't touched) in the Interpreter.cpp file (bold):
When I run a scripted scenario with the recompiled dll (In the D3D9 client), I see no problems during the simulation, but when I exit I get this msg:
And here are the contents of the log:
with the Inline client, I get this when I exit Orbiter:
with these "problem details"
And these contents on Orbiter.log
At first I thought it was the AscensionUltra creating a problem, but I've also tested it on a clean installation with the same results.
Any ideas on how to fix this? I am mainly interested in the D3D9 client, since my aged PC gets a much better frame-rate.
Before adding anything to the source files, I tried to recompile the vanilla ones that come with Orbiter 2010 P1, to see if I have the development environment setup properly.
But I am getting these warnings:
Code:
1>------ Build started: Project: LuaInterpreter, Configuration: Release Win32 ------
1>Copy interpreter header file to SDK include directory
1> 1 file(s) copied.
1>Compiling...
1>Interpreter.cpp
1>.\LuaInterpreter\Interpreter.cpp(243) : warning C4244: '=' : conversion from 'lua_Number' to 'float', possible loss of data
1>.\LuaInterpreter\Interpreter.cpp(246) : warning C4244: '=' : conversion from 'lua_Number' to 'float', possible loss of data
1>.\LuaInterpreter\Interpreter.cpp(249) : warning C4244: '=' : conversion from 'lua_Number' to 'float', possible loss of data
1>.\LuaInterpreter\Interpreter.cpp(252) : warning C4244: '=' : conversion from 'lua_Number' to 'float', possible loss of data
1>Linking...
1> Creating library ..\..\..\..\Orbiter\LuaInterpreter.lib and object ..\..\..\..\Orbiter\LuaInterpreter.exp
1>Embedding manifest...
1>Build log was saved at "file://d:\Users\jim\Desktop\Orbiter\Orbitersdk\samples\LuaScript\LuaInterpreter\Release\BuildLog.htm"
1>LuaInterpreter - 0 error(s), 4 warning(s)
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
they correspond to these lines of code (which I haven't touched) in the Interpreter.cpp file (bold):
Code:
COLOUR4 Interpreter::lua_torgba (lua_State *L, int idx)
{
COLOUR4 col = {0,0,0,0};
lua_getfield (L, idx, "r");
[B]if (lua_isnumber(L,-1)) col.r = lua_tonumber (L, -1);[/B]
lua_pop (L,1);
lua_getfield (L, idx, "g");
[B]if (lua_isnumber(L,-1)) col.g = lua_tonumber (L, -1);[/B]
lua_pop (L,1);
lua_getfield (L, idx, "b");
[B]if (lua_isnumber(L,-1)) col.b = lua_tonumber (L, -1);[/B]
lua_pop (L,1);
lua_getfield (L, idx, "a");
[B]if (lua_isnumber(L,-1)) col.a = lua_tonumber (L, -1);[/B]
lua_pop (L,1);
return col;
}
When I run a scripted scenario with the recompiled dll (In the D3D9 client), I see no problems during the simulation, but when I exit I get this msg:
And here are the contents of the log:
Code:
**** Orbiter.log
Build Aug 30 2010 [v.100830]
Timer precision: 6.98413e-008 sec
Found 0 joystick(s)
Module AscensionUltraConfigurator.dll [Build 140705, API 100830]
Module AtlantisConfig.dll .... [Build 100830, API 100830]
Module AtmConfig.dll ......... [Build 100830, API 100830]
Module DGConfigurator.dll .... [Build 100830, API 100830]
Module TransX.dll ............ [Build 140205, API 100830]
Module TransX2.dll ........... [Build 140202, API 100830]
Module InterMFD55.dll ........ [Build 100826, API 100704]
---------------------------------------------------------------
>>> WARNING: Obsolete API function used: oapiRegisterMFDMode
At least one active module is accessing an obsolete interface function.
Addons which rely on obsolete functions may not be compatible with
future versions of Orbiter.
---------------------------------------------------------------
Module BurnTimeMFD.dll ....... [Build 140205, API 100830]
Module AeroBrakeMFD.dll ...... [Build ******, API 100830]
Module ExtMFD.dll ............ [Build 100830, API 100830]
Module ScnEditor.dll ......... [Build 100830, API 100830]
Module D3D9Client.dll ........ [Build 130712, API 100830]
Module OrbiterSound.dll ...... [Build 121120, API 100830]
Module baseland.dll .......... [Build 120512, API 100830]
**** Creating simulation session
D3D9Client: [DirectX 9 Initialized]
D3D9Client: Sytem has XNA math support
D3D9Client: [3DDevice Initialized]
D3D9Client: [Compiling Effects for Shader Model 3.0]
D3D9Client: [Loading Stars]
D3D9Client: [Loading Constellations]
D3D9Client: [D3D9Client Initialized]
Module Sun.dll ............... [Build 100830, API 100830]
VSOP87(E) Sun: Precision 1e-006, Terms 554/6634
Module Mercury.dll ........... [Build 100830, API 100830]
VSOP87(B) Mercury: Precision 1e-005, Terms 167/7123
Module Venus.dll ............. [Build 100830, API 100830]
Module VenusAtm2006.dll ...... [Build 100830, API 100830]
VSOP87(B) Venus: Precision 1e-005, Terms 79/1710
Module Earth.dll ............. [Build 100830, API 100830]
Module EarthAtmJ71G.dll ...... [Build 100830, API 100830]
VSOP87(B) Earth: Precision 1e-008, Terms 2564/2564
Module Moon.dll .............. [Build 100830, API 100830]
ELP82: Precision 1e-005, Terms 116/829
Module Mars.dll .............. [Build 100830, API 100830]
Module MarsAtm2006.dll ....... [Build 100830, API 100830]
VSOP87(B) Mars: Precision 1e-005, Terms 405/6400
Module Phobos.dll ............ [Build ******, API 060425]
Module Deimos.dll ............ [Build ******, API 060425]
Module Galsat.dll ............ [Build 100217, API 100215]
Module Jupiter.dll ........... [Build 100830, API 100830]
VSOP87(B) Jupiter: Precision 1e-006, Terms 1624/3625
Module Io.dll ................ [Build 100217, API 100215]
Module Europa.dll ............ [Build 100217, API 100215]
Module Ganymede.dll .......... [Build 100217, API 100215]
Module Callisto.dll .......... [Build 100217, API 100215]
Module Satsat.dll ............ [Build 100215, API 100212]
Module Saturn.dll ............ [Build 100830, API 100830]
VSOP87(B) Saturn: Precision 1e-006, Terms 2904/6365
Module Mimas.dll ............. [Build 100215, API 100212]
SATSAT Mimas: Terms 113
Module Enceladus.dll ......... [Build 100215, API 100212]
SATSAT Enceladus: Terms 33
Module Tethys.dll ............ [Build 100215, API 100212]
SATSAT Tethys: Terms 101
Module Dione.dll ............. [Build 100215, API 100212]
SATSAT Dione: Terms 59
Module Rhea.dll .............. [Build 100215, API 100212]
SATSAT Rhea: Terms 68
Module Titan.dll ............. [Build 100215, API 100212]
SATSAT Titan: Terms 100
Module Iapetus.dll ........... [Build 100215, API 100212]
SATSAT Iapetus: Terms 605
Module Uranus.dll ............ [Build 100830, API 100830]
VSOP87(B) Uranus: Precision 1e-006, Terms 1827/5269
Module Miranda.dll ........... [Build ******, API 060425]
Module Ariel.dll ............. [Build ******, API 060425]
Module Umbriel.dll ........... [Build ******, API 060425]
Module Titania.dll ........... [Build ******, API 060425]
Module Oberon.dll ............ [Build ******, API 060425]
Module Neptune.dll ........... [Build 100830, API 100830]
VSOP87(B) Neptune: Precision 1e-006, Terms 391/2024
Finished initialising world
Module DeltaGliderIV.dll ..... [Build 140107, API 100830]
Finished initialising status
Finished initialising camera
Finished initialising panels
---------------------------------------------------------------
>>> ERROR: Could not load vessel module: AscensionUltra
>>> [Vessel::LoadModule | .\Vessel.cpp | 5442]
---------------------------------------------------------------
Finished setting up render state
Module LuaInline.dll ......... [Build 100830, API 100830]
D3D9Client: [Scene Initialized]
Orbiter Version 100830
D3D9Client Build [Jul 12 2013]
Exception Code=0xC0000005, Address=0x77B56626
EAX=0x00000000 EBX=0x466D0001 ECX=0x00000137 EDX=0x00000000 ESI=0x09871570 EDI=0x466D0000 EBP=0x009FF7AC ESP=0x009FF778 EIP=0x77B56626
D:\Windows\system32\ntdll.dll EntryPoint=0x00000000, Base=0x77AF0000, Size=1212416
GraphicsClient::RenderWndProc(hWnd=0x16081C, uMsg=2, wParam=0, lParam=0)
!!! Abnormal Program Termination !!!
with the Inline client, I get this when I exit Orbiter:
with these "problem details"
Code:
Problem signature:
Problem Event Name: APPCRASH
Application Name: orbiter.exe
Application Version: 0.0.0.0
Application Timestamp: 4c7b0d0d
Fault Module Name: ntdll.dll
Fault Module Version: 6.0.6002.18541
Fault Module Timestamp: 4ec3e3d5
Exception Code: c0000005
Exception Offset: 00066626
OS Version: 6.0.6002.2.2.0.256.1
Locale ID: 1033
Additional Information 1: fd00
Additional Information 2: ea6f5fe8924aaa756324d57f87834160
Additional Information 3: fd00
Additional Information 4: ea6f5fe8924aaa756324d57f87834160
Read our privacy statement:
http://go.microsoft.com/fwlink/?linkid=50163&clcid=0x0409
And these contents on Orbiter.log
Code:
**** Orbiter.log
Build Aug 30 2010 [v.100830]
Timer precision: 6.98413e-008 sec
Found 0 joystick(s)
Devices enumerated: 6
Devices accepted: 5
==> RGB Emulation
==> Direct3D HAL
==> Direct3D T&L HAL
==> Direct3D HAL (NVIDIA GeForce GT 620)
==> Direct3D T&L HAL (NVIDIA GeForce GT 620)
Module AscensionUltraConfigurator.dll [Build 140705, API 100830]
Module AtlantisConfig.dll .... [Build 100830, API 100830]
Module AtmConfig.dll ......... [Build 100830, API 100830]
Module DGConfigurator.dll .... [Build 100830, API 100830]
Module TransX.dll ............ [Build 140205, API 100830]
Module TransX2.dll ........... [Build 140202, API 100830]
Module InterMFD55.dll ........ [Build 100826, API 100704]
---------------------------------------------------------------
>>> WARNING: Obsolete API function used: oapiRegisterMFDMode
At least one active module is accessing an obsolete interface function.
Addons which rely on obsolete functions may not be compatible with
future versions of Orbiter.
---------------------------------------------------------------
Module AeroBrakeMFD.dll ...... [Build ******, API 100830]
Module BurnTimeMFD.dll ....... [Build 140205, API 100830]
Module OrbiterSound.dll ...... [Build 121120, API 100830]
Module ExtMFD.dll ............ [Build 100830, API 100830]
Module ScnEditor.dll ......... [Build 100830, API 100830]
Module CameraMFD.dll [API v.060425]
Module videnie.dll ........... [Build 110912, API 100830]
Module SlaveMFD.dll .......... [Build 140309, API 100830]
**** Creating simulation session
DirectDraw interface OK
Direct3D interface OK
Graphics: Viewport: Window 1274 x 694 x 32
Graphics: Hardware T&L capability: Yes
Graphics: Z-buffer depth: 32 bit
Graphics: Active lights supported: 8
Loading 15382 records from star database
Module Sun.dll ............... [Build 100830, API 100830]
VSOP87(E) Sun: Precision 1e-006, Terms 554/6634
Module Mercury.dll ........... [Build 100830, API 100830]
VSOP87(B) Mercury: Precision 1e-005, Terms 167/7123
Module Venus.dll ............. [Build 100830, API 100830]
Module VenusAtm2006.dll ...... [Build 100830, API 100830]
VSOP87(B) Venus: Precision 1e-005, Terms 79/1710
Module Earth.dll ............. [Build 100830, API 100830]
Module EarthAtmJ71G.dll ...... [Build 100830, API 100830]
VSOP87(B) Earth: Precision 1e-008, Terms 2564/2564
Module Moon.dll .............. [Build 100830, API 100830]
ELP82: Precision 1e-005, Terms 116/829
Module Mars.dll .............. [Build 100830, API 100830]
Module MarsAtm2006.dll ....... [Build 100830, API 100830]
VSOP87(B) Mars: Precision 1e-005, Terms 405/6400
Module Phobos.dll ............ [Build ******, API 060425]
Module Deimos.dll ............ [Build ******, API 060425]
Module Galsat.dll ............ [Build 100217, API 100215]
Module Jupiter.dll ........... [Build 100830, API 100830]
VSOP87(B) Jupiter: Precision 1e-006, Terms 1624/3625
Module Io.dll ................ [Build 100217, API 100215]
Module Europa.dll ............ [Build 100217, API 100215]
Module Ganymede.dll .......... [Build 100217, API 100215]
Module Callisto.dll .......... [Build 100217, API 100215]
Module Satsat.dll ............ [Build 100215, API 100212]
Module Saturn.dll ............ [Build 100830, API 100830]
VSOP87(B) Saturn: Precision 1e-006, Terms 2904/6365
Module Mimas.dll ............. [Build 100215, API 100212]
SATSAT Mimas: Terms 113
Module Enceladus.dll ......... [Build 100215, API 100212]
SATSAT Enceladus: Terms 33
Module Tethys.dll ............ [Build 100215, API 100212]
SATSAT Tethys: Terms 101
Module Dione.dll ............. [Build 100215, API 100212]
SATSAT Dione: Terms 59
Module Rhea.dll .............. [Build 100215, API 100212]
SATSAT Rhea: Terms 68
Module Titan.dll ............. [Build 100215, API 100212]
SATSAT Titan: Terms 100
Module Iapetus.dll ........... [Build 100215, API 100212]
SATSAT Iapetus: Terms 605
Module Uranus.dll ............ [Build 100830, API 100830]
VSOP87(B) Uranus: Precision 1e-006, Terms 1827/5269
Module Miranda.dll ........... [Build ******, API 060425]
Module Ariel.dll ............. [Build ******, API 060425]
Module Umbriel.dll ........... [Build ******, API 060425]
Module Titania.dll ........... [Build ******, API 060425]
Module Oberon.dll ............ [Build ******, API 060425]
Module Neptune.dll ........... [Build 100830, API 100830]
VSOP87(B) Neptune: Precision 1e-006, Terms 391/2024
Finished initialising world
Module DeltaGliderIV.dll ..... [Build 140107, API 100830]
Finished initialising status
Finished initialising camera
Finished initialising panels
---------------------------------------------------------------
>>> ERROR: Could not load vessel module: AscensionUltra
>>> [Vessel::LoadModule | .\Vessel.cpp | 5442]
---------------------------------------------------------------
Finished setting up render state
Module LuaInline.dll ......... [Build 100830, API 100830]
At first I thought it was the AscensionUltra creating a problem, but I've also tested it on a clean installation with the same results.
Any ideas on how to fix this? I am mainly interested in the D3D9 client, since my aged PC gets a much better frame-rate.
Last edited: