SDK Question Loading script progs from .dll

JMW

Aspiring Addon Developer
Joined
Aug 5, 2008
Messages
670
Reaction score
89
Points
43
Location
Happy Wherever
Can someone please help me with how to code a .dll so as to automatically load a script program.
Like dg/aap for example.

I know DeltaGlider does it in AAP.cpp but there's too much other stuff, and I can't seem to extract the right bits to work. (excuse my non-technical language:lol:)

I have tried searching - but surprisingly can't find anything in the forum.

Cheers:cheers:
 
Code:
scriptInterpreter = oapiCreateInterpreter ();
//...
oapiAsyncScriptCmd (scriptInterpreter, "run('<script_name>')");
where scriptInterpreter is of INTERPRETERHANDLE type, and it can be declared for example in your vessel's class.
 
Hmmm.....

Do you need some sort of control code to load it? - cause orbiter "hangs" on starting the scenario and I have to restart the computer!
 
Did you try to run it in debug mode?
 
No....... not yet .......... always takes me an age to get THAT to run :facepalm:

+ I'm gonna have to go out very soon.

---------- Post added 04-11-11 at 12:27 PM ---------- Previous post was 03-11-11 at 06:01 PM ----------

Running debug doesn't tell ME much .... exits after precisely 40 seconds every time with this output.

Code:
'orbiter.exe': Loaded 'C:\Orbiter 2010\orbiter.exe', Binary was not built with debug information.
'orbiter.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll'
'orbiter.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll'
'orbiter.exe': Loaded 'C:\WINDOWS\system32\ddraw.dll'
'orbiter.exe': Loaded 'C:\WINDOWS\system32\advapi32.dll'
'orbiter.exe': Loaded 'C:\WINDOWS\system32\rpcrt4.dll'
'orbiter.exe': Loaded 'C:\WINDOWS\system32\secur32.dll'
'orbiter.exe': Loaded 'C:\WINDOWS\system32\dciman32.dll'
'orbiter.exe': Loaded 'C:\WINDOWS\system32\gdi32.dll'
'orbiter.exe': Loaded 'C:\WINDOWS\system32\user32.dll'
'orbiter.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll'
'orbiter.exe': Loaded 'C:\WINDOWS\system32\dinput.dll'
'orbiter.exe': Loaded 'C:\WINDOWS\system32\winmm.dll'
'orbiter.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.6028_x-ww_61e65202\comctl32.dll'
'orbiter.exe': Loaded 'C:\WINDOWS\system32\shlwapi.dll'
'orbiter.exe': Loaded 'C:\WINDOWS\system32\shell32.dll'
'orbiter.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.6195_x-ww_44262b86\msvcp80.dll'
'orbiter.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.6195_x-ww_44262b86\msvcr80.dll'
'orbiter.exe': Loaded 'C:\WINDOWS\system32\shimeng.dll'
'orbiter.exe': Loaded 'C:\WINDOWS\system32\imm32.dll'
'orbiter.exe': Unloaded 'C:\WINDOWS\system32\shimeng.dll'
'orbiter.exe': Loaded 'C:\WINDOWS\system32\uxtheme.dll'
'orbiter.exe': Loaded 'C:\WINDOWS\system32\hid.dll'
'orbiter.exe': Loaded 'C:\WINDOWS\system32\setupapi.dll'
'orbiter.exe': Loaded 'C:\WINDOWS\system32\wintrust.dll'
'orbiter.exe': Loaded 'C:\WINDOWS\system32\crypt32.dll'
'orbiter.exe': Loaded 'C:\WINDOWS\system32\msasn1.dll'
'orbiter.exe': Loaded 'C:\WINDOWS\system32\imagehlp.dll'
'orbiter.exe': Loaded 'C:\WINDOWS\system32\msctf.dll'
'orbiter.exe': Loaded 'C:\Program Files\McAfee\SiteAdvisor\sahook.dll'
'orbiter.exe': Loaded 'C:\WINDOWS\system32\version.dll'
'orbiter.exe': Unloaded 'C:\WINDOWS\system32\version.dll'
'orbiter.exe': Loaded 'C:\WINDOWS\system32\apphelp.dll'
'orbiter.exe': Loaded 'C:\WINDOWS\system32\msctfime.ime'
'orbiter.exe': Loaded 'C:\WINDOWS\system32\ole32.dll'
'orbiter.exe': Loaded 'C:\WINDOWS\system32\d3dim700.dll'
'orbiter.exe': Loaded 'C:\Orbiter 2010\Modules\Startup\AtlantisConfig.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'C:\Orbiter 2010\Modules\Startup\AtmConfig.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'C:\Orbiter 2010\Modules\Startup\DGConfigurator.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'C:\WINDOWS\system32\psapi.dll'
'orbiter.exe': Loaded 'C:\Orbiter 2010\Modules\Plugin\ScnEditor.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'C:\Orbiter 2010\Modules\Plugin\LuaConsole.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'C:\Orbiter 2010\lua5.1.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'C:\Orbiter 2010\LuaInterpreter.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'C:\Orbiter 2010\Modules\Plugin\OrbiterSound.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'C:\WINDOWS\system32\dsound.dll'
'orbiter.exe': Loaded 'C:\WINDOWS\system32\version.dll'
'orbiter.exe': Loaded 'C:\Orbiter 2010\Modules\Plugin\Meshdebug.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'C:\Orbiter 2010\Modules\Plugin\LuaMFD.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'C:\Orbiter 2010\Modules\Plugin\ScriptMFD.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'C:\Orbiter 2010\Modules\Plugin\NotesMFD.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'C:\WINDOWS\system32\oleaut32.dll'
'orbiter.exe': Loaded 'C:\Orbiter 2010\Modules\Celbody\Sun.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'C:\Orbiter 2010\Modules\Vsop87.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'C:\Orbiter 2010\Modules\Celbody\Earth.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'C:\Orbiter 2010\Modules\Celbody\Earth\atmosphere\EarthAtmJ71G.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'C:\Orbiter 2010\Modules\JMW\J-F-35B.dll', Symbols loaded.
'orbiter.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC90.DebugCRT_1fc8b3b9a1e18e3b_9.0.30729.1_x-ww_f863c71f\msvcr90d.dll'
'orbiter.exe': Loaded 'C:\Orbiter 2010\LuaInline.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'C:\WINDOWS\system32\wdmaud.drv'
'orbiter.exe': Loaded 'C:\WINDOWS\system32\msacm32.drv'
'orbiter.exe': Loaded 'C:\WINDOWS\system32\msacm32.dll'
'orbiter.exe': Loaded 'C:\WINDOWS\system32\midimap.dll'
'orbiter.exe': Loaded 'C:\WINDOWS\system32\ksuser.dll'
The thread 'Win32 Thread' (0x12fc) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x141c) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0xba0) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x984) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x1704) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x16e4) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x1748) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x1768) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x1770) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x1778) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x175c) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x14b0) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x1470) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x1798) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x17b8) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x17c0) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x17c8) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x15bc) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x17a0) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x16ec) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x17dc) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x15c4) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x17e4) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x108c) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x11d0) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x16e8) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x94c) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x17f0) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x9f4) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x17f8) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x2cc) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x1510) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x1744) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0xf28) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x11c0) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x924) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0xb8c) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x948) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x2e8) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x544) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0xc88) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0xb64) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x1020) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x1464) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x102c) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x10ac) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x10b8) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x10a4) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x152c) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x17b4) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x70c) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x112c) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x1750) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x1544) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x6b0) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x14ac) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0xbc0) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0xd64) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x1238) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x12c4) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x10c4) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x1634) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x12a8) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x694) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x12d0) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x1268) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x176c) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x13e4) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x1654) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x13e8) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x1444) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x1240) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x198) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x14d0) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x144c) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x49c) has exited with code 1 (0x1).
............. and goes on and on ...............

Log here... but again ?????????????
Code:
**** Orbiter.log
Build Aug 30 2010 [v.100830]
Timer precision: 2.79365e-007 sec
Found 0 joystick(s)
Devices enumerated: 3
Devices accepted: 3
==> RGB Emulation
==> Direct3D HAL
==> Direct3D T&L HAL
Module AtlantisConfig.dll .... [Build 100830, API 100830]
Module AtmConfig.dll ......... [Build 100830, API 100830]
Module DGConfigurator.dll .... [Build 100830, API 100830]
Module ScnEditor.dll ......... [Build 100830, API 100830]
Module LuaConsole.dll ........ [Build 100830, API 100830]
Module OrbiterSound.dll ...... [Build ******, API 060425]
---------------------------------------------------------------
>>> 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 Meshdebug.dll ......... [Build 100830, API 100830]
Error loading module Modules\Plugin\SurfaceSpeed.dll (code 126)
Module LuaMFD.dll ............ [Build 100830, API 100830]
Module ScriptMFD.dll ......... [Build 100830, API 100830]
Module NotesMFD.dll .......... [Build ******, API 060425]

**** Creating simulation session
DirectDraw interface OK
Direct3D interface OK
Graphics: Viewport: Window 1274 x 924 x 32
Graphics: Hardware T&L capability: Yes
Graphics: Z-buffer depth: 32 bit
Graphics: Stencil buffer depth: 8 bit
Graphics: Active lights supported: 8
Loading 8816 records from star database
Module Sun.dll ............... [Build 100830, API 100830]
VSOP87(E) Sun: Precision 1e-006, Terms 554/6634
Module Earth.dll ............. [Build 100830, API 100830]
Module EarthAtmJ71G.dll ...... [Build 100830, API 100830]
VSOP87(B) Earth: Precision 1e-008, Terms 2564/2564
**** WARNING: Mesh not found: .\Meshes\K-MDD.msh
BaseObject: Parse error 1
Finished initialising world
Module J-F-35B.dll ........... [Build 111104, API 100830]
---------------------------------------------------------------
>>> ERROR: Missing texture: JMW\No-XHUD.dds
>>> [TextureManager::AcquireTexture | .\Texture.cpp | 750]
---------------------------------------------------------------
---------------------------------------------------------------
>>> ERROR: Missing texture: JMW\No-XHUD.dds
>>> [TextureManager::AcquireTexture | .\Texture.cpp | 750]
---------------------------------------------------------------
---------------------------------------------------------------
>>> ERROR: Missing texture: JMW\No-MFD.dds
>>> [TextureManager::AcquireTexture | .\Texture.cpp | 750]
---------------------------------------------------------------
---------------------------------------------------------------
>>> WARNING: Obsolete API function used: VESSEL::SetBankMomentScale
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.
---------------------------------------------------------------
Finished initialising status
Finished initialising camera
Finished initialising panels
Module LuaInline.dll ......... [Build 100830, API 100830]
Finished setting up render state
---------------------------------------------------------------
>>> WARNING: Obsolete API function used: oapiGetStationCount
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.
---------------------------------------------------------------

Any ideas?????

Going into time warp x10 extends time to exit proportionately ?????????????? So time to exit is INDEPENDENT of sim time ?????
 
Last edited:
I don't see any exception listed in the output, but I see there are many threads, while in my debugging sessions there are only something around 3.

Are you calling oapiCreateInterpreter and load the script only once, or in every frame?
 
You were right!
This idiot was calling "load" every frame!
Does not crash anymore - but does not load aap either.
i have
Code:
INTERPRETERHANDLE hAAP;       // script interpreter
in
PHP:
class ShuttlePB: public VESSEL3{ 
public:
and
Code:
hAAP = oapiCreateInterpreter();
	
	oapiAsyncScriptCmd (hAAP, "run('35B/aap')"); // load the autopilot code
in
PHP:
ShuttlePB::ShuttlePB (OBJHANDLE hVessel, int flightmodel)
		: VESSEL3 (hVessel, flightmodel)
Is that right??

---------- Post added at 01:24 PM ---------- Previous post was at 01:17 PM ----------

Debug output below on exiting normally
Code:
'orbiter.exe': Loaded 'C:\Orbiter 2010\orbiter.exe', Binary was not built with debug information.
'orbiter.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll'
'orbiter.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll'
'orbiter.exe': Loaded 'C:\WINDOWS\system32\ddraw.dll'
'orbiter.exe': Loaded 'C:\WINDOWS\system32\advapi32.dll'
'orbiter.exe': Loaded 'C:\WINDOWS\system32\rpcrt4.dll'
'orbiter.exe': Loaded 'C:\WINDOWS\system32\secur32.dll'
'orbiter.exe': Loaded 'C:\WINDOWS\system32\dciman32.dll'
'orbiter.exe': Loaded 'C:\WINDOWS\system32\gdi32.dll'
'orbiter.exe': Loaded 'C:\WINDOWS\system32\user32.dll'
'orbiter.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll'
'orbiter.exe': Loaded 'C:\WINDOWS\system32\dinput.dll'
'orbiter.exe': Loaded 'C:\WINDOWS\system32\winmm.dll'
'orbiter.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.6028_x-ww_61e65202\comctl32.dll'
'orbiter.exe': Loaded 'C:\WINDOWS\system32\shlwapi.dll'
'orbiter.exe': Loaded 'C:\WINDOWS\system32\shell32.dll'
'orbiter.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.6195_x-ww_44262b86\msvcp80.dll'
'orbiter.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.6195_x-ww_44262b86\msvcr80.dll'
'orbiter.exe': Loaded 'C:\WINDOWS\system32\shimeng.dll'
'orbiter.exe': Loaded 'C:\WINDOWS\system32\imm32.dll'
'orbiter.exe': Unloaded 'C:\WINDOWS\system32\shimeng.dll'
'orbiter.exe': Loaded 'C:\WINDOWS\system32\uxtheme.dll'
'orbiter.exe': Loaded 'C:\WINDOWS\system32\hid.dll'
'orbiter.exe': Loaded 'C:\WINDOWS\system32\setupapi.dll'
'orbiter.exe': Loaded 'C:\WINDOWS\system32\wintrust.dll'
'orbiter.exe': Loaded 'C:\WINDOWS\system32\crypt32.dll'
'orbiter.exe': Loaded 'C:\WINDOWS\system32\msasn1.dll'
'orbiter.exe': Loaded 'C:\WINDOWS\system32\imagehlp.dll'
'orbiter.exe': Loaded 'C:\WINDOWS\system32\msctf.dll'
'orbiter.exe': Loaded 'C:\Program Files\McAfee\SiteAdvisor\sahook.dll'
'orbiter.exe': Loaded 'C:\WINDOWS\system32\version.dll'
'orbiter.exe': Unloaded 'C:\WINDOWS\system32\version.dll'
'orbiter.exe': Loaded 'C:\WINDOWS\system32\apphelp.dll'
'orbiter.exe': Loaded 'C:\WINDOWS\system32\msctfime.ime'
'orbiter.exe': Loaded 'C:\WINDOWS\system32\ole32.dll'
'orbiter.exe': Loaded 'C:\WINDOWS\system32\d3dim700.dll'
'orbiter.exe': Loaded 'C:\Orbiter 2010\Modules\Startup\AtlantisConfig.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'C:\Orbiter 2010\Modules\Startup\AtmConfig.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'C:\Orbiter 2010\Modules\Startup\DGConfigurator.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'C:\WINDOWS\system32\psapi.dll'
'orbiter.exe': Loaded 'C:\Orbiter 2010\Modules\Plugin\ScnEditor.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'C:\Orbiter 2010\Modules\Plugin\LuaConsole.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'C:\Orbiter 2010\lua5.1.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'C:\Orbiter 2010\LuaInterpreter.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'C:\Orbiter 2010\Modules\Plugin\OrbiterSound.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'C:\WINDOWS\system32\dsound.dll'
'orbiter.exe': Loaded 'C:\WINDOWS\system32\version.dll'
'orbiter.exe': Loaded 'C:\Orbiter 2010\Modules\Plugin\Meshdebug.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'C:\Orbiter 2010\Modules\Plugin\LuaMFD.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'C:\Orbiter 2010\Modules\Plugin\ScriptMFD.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'C:\Orbiter 2010\Modules\Plugin\NotesMFD.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'C:\WINDOWS\system32\oleaut32.dll'
'orbiter.exe': Loaded 'C:\Orbiter 2010\Modules\Celbody\Sun.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'C:\Orbiter 2010\Modules\Vsop87.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'C:\Orbiter 2010\Modules\Celbody\Earth.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'C:\Orbiter 2010\Modules\Celbody\Earth\atmosphere\EarthAtmJ71G.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'C:\Orbiter 2010\Modules\JMW\J-F-35B.dll', Symbols loaded.
'orbiter.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC90.DebugCRT_1fc8b3b9a1e18e3b_9.0.30729.1_x-ww_f863c71f\msvcr90d.dll'
'orbiter.exe': Loaded 'C:\Orbiter 2010\LuaInline.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'C:\WINDOWS\system32\wdmaud.drv'
'orbiter.exe': Loaded 'C:\WINDOWS\system32\msacm32.drv'
'orbiter.exe': Loaded 'C:\WINDOWS\system32\msacm32.dll'
'orbiter.exe': Loaded 'C:\WINDOWS\system32\midimap.dll'
'orbiter.exe': Loaded 'C:\WINDOWS\system32\ksuser.dll'
The thread 'Win32 Thread' (0xeec) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x1a0) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x10a0) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x1700) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x1624) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x1604) has exited with code 0 (0x0).
'orbiter.exe': Unloaded 'C:\Orbiter 2010\Modules\Startup\AtlantisConfig.dll'
'orbiter.exe': Unloaded 'C:\Orbiter 2010\Modules\Startup\AtmConfig.dll'
'orbiter.exe': Unloaded 'C:\Orbiter 2010\Modules\Startup\DGConfigurator.dll'
'orbiter.exe': Unloaded 'C:\Orbiter 2010\Modules\Plugin\ScnEditor.dll'
'orbiter.exe': Unloaded 'C:\Orbiter 2010\Modules\Plugin\LuaConsole.dll'
'orbiter.exe': Unloaded 'C:\Orbiter 2010\Modules\Plugin\OrbiterSound.dll'
'orbiter.exe': Unloaded 'C:\Orbiter 2010\Modules\Plugin\Meshdebug.dll'
'orbiter.exe': Unloaded 'C:\Orbiter 2010\Modules\Plugin\LuaMFD.dll'
'orbiter.exe': Unloaded 'C:\Orbiter 2010\Modules\Plugin\ScriptMFD.dll'
'orbiter.exe': Unloaded 'C:\Orbiter 2010\Modules\Plugin\NotesMFD.dll'
First-chance exception at 0x03893938 in orbiter.exe: 0xC0000005: Access violation reading location 0xffffff89.
'orbiter.exe': Unloaded 'C:\Orbiter 2010\LuaInline.dll'
'orbiter.exe': Unloaded 'C:\Orbiter 2010\LuaInterpreter.dll'
'orbiter.exe': Unloaded 'C:\Orbiter 2010\lua5.1.dll'
The thread 'Win32 Thread' (0x1040) has exited with code 0 (0x0).
The program '[5404] orbiter.exe: Native' has exited with code 0 (0x0).
 
Last edited:
I'm not sure, and I can't be sure until I'm at home, but try to initialize it from clbkSetClassCaps instead of the vessel constructor.
 
Gives me
Code:
1>c:\orbiter 2010\orbitersdk\samples\shuttlepb\j-f-35b_force_suspnew_braking.cpp(515) : error C2065: 'hAAP' : undeclared identifier
1>c:\orbiter 2010\orbitersdk\samples\shuttlepb\j-f-35b_force_suspnew_braking.cpp(517) : error C2065: 'hAAP' : undeclared identifier


---------- Post added at 06:33 PM ---------- Previous post was at 01:34 PM ----------

Running Debug with breakpoint
Code:
hAAP = oapiCreateInterpreter();
	
[COLOR="Red"][B]O[/B][/COLOR]	oapiAsyncScriptCmd (hAAP, "run('35b/aap')"); // load the autopilot code
message as follows
Code:
'orbiter.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC90.DebugCRT_1fc8b3b9a1e18e3b_9.0.30729.1_x-ww_f863c71f\msvcr90d.dll'
'orbiter.exe': Loaded 'C:\Orbiter 2010\LuaInline.dll', Binary was not built with debug information.
[B]Function: ShuttlePB::ShuttlePB(void *, int), Thread: 0x660 Main Thread[/B]
Is this what you would expect???
 
Running Debug with breakpoint
Code:
hAAP = oapiCreateInterpreter();
	
[COLOR="Red"][B]O[/B][/COLOR]	oapiAsyncScriptCmd (hAAP, "run('35b/aap')"); // load the autopilot code
message as follows
Code:
'orbiter.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC90.DebugCRT_1fc8b3b9a1e18e3b_9.0.30729.1_x-ww_f863c71f\msvcr90d.dll'
'orbiter.exe': Loaded 'C:\Orbiter 2010\LuaInline.dll', Binary was not built with debug information.
[B]Function: ShuttlePB::ShuttlePB(void *, int), Thread: 0x660 Main Thread[/B]
Is this what you would expect???
Yes, you stopped execution in the "Main Thread" of Orbiter, so that is shown in the output display.

But watching just the "output" isn't the best way to debug. There are places in the debugger where you can watch and trace variables, memory, registers, call stack. That's way more interesting and giving you much more information than the output display, which only gives you information what module was loaded or unloaded, and where you currently stopped execution in the code.
 
Back
Top