Problem First Time Editor - CTD

Ambaryerno

New member
Joined
May 22, 2009
Messages
12
Reaction score
0
Points
0
After a good bit of effort I finally got a model I'm working on to compile to a DLL file. Got my CFG file created, added my mesh and textures, and created a scenario.

CTD. Orbiter log file gives no errors. It gets to the model and just stops.

I KNOW my mesh has a problem (substituted my new mesh for one of the existing ships and caused the same CTD). I'm not too concerned there, I have plenty of modeling experience so shouldn't have too much of a problem fixing whatever the game doesn't like.

The problem is the dll file. Which I've also confirmed is bad. This is my first attempt at coding of any sort, so I have no idea what to look for. I used Visual C++ 8 (Free edition) and it compiled without errors or warnings. I've tried comparing it with one of the samples, but nothing jumps out at me. And as I said, the Orbiter log gives no sort of error when it reaches the point of loading my new ship.

Event Viewer Log:

Faulting application orbiter.exe, version 0.0.0.0, time stamp 0x451d1ff5, faulting module orbiter.exe, version 0.0.0.0, time stamp 0x451d1ff5, exception code 0xc0000005, fault offset 0x00010112, process id 0x1130, application start time 0x01c9db273959e550.

Any help would be appreciated, I'm trying to do a "Proof of Concept" that I've had kicking around for a while, and I'd LOVE to get this sorted.
 
I suggest setting up the Visual C++ debugger (see the OrbiterWiki article) and stepping through your code with that. Easiest way to find CTD bugs, IMHO (especially if they are repeatable).
 
This is what I came back with after running debugging.

First, a bunch of error messages:

application failed to run becase MSVCP71.dll was not found.

Unhandled exception at 0x00410112 in orbiter.exe 0xC00000005: Access
violation reading location 0x402e0030.

No symbols are loaded for any call stack frame. The source code cannot be
displayed debugging information for orbiter.exe cannot be found or does not match. Binary was not built with debugging information.

'orbiter.exe': Loaded 'D:\Program Files\Orbiter\orbiter.exe', Binary was not built with debug information.

These were the results of the Debug once it stopped:

Code:
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\ddraw.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\msvcrt.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\user32.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\gdi32.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\advapi32.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\rpcrt4.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\secur32.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\dciman32.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\setupapi.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\oleaut32.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\ole32.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\dwmapi.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\dinput.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\winmm.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\oleacc.dll'
'orbiter.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.6001.18000_none_886786f450a74a05\comctl32.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\imm32.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\msctf.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\lpk.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\usp10.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\uxtheme.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\hid.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\wintrust.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\crypt32.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\msasn1.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\userenv.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\imagehlp.dll'
'orbiter.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.6001.18000_none_5cdbaa5a083979cc\comctl32.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\shlwapi.dll'
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Startup\AtlantisConfig.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Startup\DGConfig.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Plugin\FlyByWire.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.3053_none_d08d7bba442a9b36\msvcr80.dll'
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\FlyByWire\FlyByWireCore.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\version.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\comdlg32.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\shell32.dll'
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\SDL.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'D:\Program Files\Yahoo!\Messenger\idle.dll'
'orbiter.exe': Loaded 'D:\Program Files\Yahoo!\Messenger\msvcr71.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\nvd3dum.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\IPHLPAPI.DLL'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\dhcpcsvc.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\dnsapi.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\ws2_32.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\nsi.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\winnsi.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\dhcpcsvc6.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\powrprof.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\d3dim700.dll'
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Sun.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Vsop87.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\msvcirt.dll'
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Mercury.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Venus.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Earth.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Moon.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Mars.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Phobos.dll', Binary was not built with debug information.
'orbiter.exe': Unloaded 'D:\Program Files\Orbiter\Modules\Phobos.dll'
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Deimos.dll', Binary was not built with debug information.
'orbiter.exe': Unloaded 'D:\Program Files\Orbiter\Modules\Deimos.dll'
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Jupiter.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Galsat.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Io.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Europa.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Ganymede.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Callisto.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Saturn.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Satsat.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Mimas.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Enceladus.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Tethys.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Dione.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Rhea.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Titan.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Hyperion.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Iapetus.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Uranus.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Miranda.dll', Binary was not built with debug information.
'orbiter.exe': Unloaded 'D:\Program Files\Orbiter\Modules\Miranda.dll'
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Ariel.dll', Binary was not built with debug information.
'orbiter.exe': Unloaded 'D:\Program Files\Orbiter\Modules\Ariel.dll'
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Umbriel.dll', Binary was not built with debug information.
'orbiter.exe': Unloaded 'D:\Program Files\Orbiter\Modules\Umbriel.dll'
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Titania.dll', Binary was not built with debug information.
'orbiter.exe': Unloaded 'D:\Program Files\Orbiter\Modules\Titania.dll'
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Oberon.dll', Binary was not built with debug information.
'orbiter.exe': Unloaded 'D:\Program Files\Orbiter\Modules\Oberon.dll'
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Neptune.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Triton.dll', Binary was not built with debug information.
'orbiter.exe': Unloaded 'D:\Program Files\Orbiter\Modules\Triton.dll'
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\XWing.dll'
'orbiter.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.1_none_e163563597edeada\msvcr90.dll'
First-chance exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
Unhandled exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
First-chance exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
Unhandled exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
First-chance exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
Unhandled exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
First-chance exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
Unhandled exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
First-chance exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
Unhandled exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
First-chance exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
Unhandled exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
First-chance exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
Unhandled exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
First-chance exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
Unhandled exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
First-chance exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
Unhandled exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
First-chance exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
Unhandled exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
First-chance exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
Unhandled exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
First-chance exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
Unhandled exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
First-chance exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
Unhandled exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
First-chance exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
Unhandled exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
First-chance exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
Unhandled exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
First-chance exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
Unhandled exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
First-chance exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
Unhandled exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
First-chance exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
Unhandled exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
First-chance exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
Unhandled exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
First-chance exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
Unhandled exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
First-chance exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
Unhandled exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
First-chance exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
Unhandled exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
First-chance exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
Unhandled exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
First-chance exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
Unhandled exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
First-chance exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
Unhandled exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
First-chance exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
Unhandled exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
First-chance exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
Unhandled exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
First-chance exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
Unhandled exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
First-chance exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
Unhandled exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
First-chance exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
Unhandled exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
First-chance exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
Unhandled exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
First-chance exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
Unhandled exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
First-chance exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
Unhandled exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
First-chance exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
Unhandled exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
First-chance exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
Unhandled exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
First-chance exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
Unhandled exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
First-chance exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
Unhandled exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
The thread 'Win32 Thread' (0x111c) has exited with code -805306369 (0xcfffffff).
 
First, a bunch of error messages:

application failed to run becase MSVCP71.dll was not found.
You need this dll. Google it to find download links.

Unhandled exception at 0x00410112 in orbiter.exe 0xC00000005: Access
violation reading location 0x402e0030.
This is most likely the cause of your CTD, more on that later.

No symbols are loaded for any call stack frame. The source code cannot be
displayed debugging information for orbiter.exe cannot be found or does not match. Binary was not built with debugging information.

'orbiter.exe': Loaded 'D:\Program Files\Orbiter\orbiter.exe', Binary was not built with debug information.
These are expected. orbiter.exe does not have debug symbols in it but that is OK since we don't really need them anyway.

'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\XWing.dll'
I assume XWing.dll is the name of your dll. It is the one that seems to be causing the CTD anyway.

'orbiter.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.1_none_e163563597edeada\msvcr90.dll'
Your dll has been compiled with the /MD option. Try compiling with debug version of the runtime files, /MDd, since you can often get more information to track down memory errors, which I suspect we have here. For example, it will deliberately poison unallocated/uninitialised memory with non-Null values to help make it obvious you have a problem.

First-chance exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0x402e0030.
It looks you are trying to access some unallocated memory (or orbiter.exe is, perhaps you passed it a bad pointer - this is more likely otherwise the debugger should give you a line number for you guilty code :P). What I suggest is putting a break point in your code at your vessel's constructor. If you don't get that far, the problem is most likely in your ovcInit function. If you get to the constructor, put a break point at clbkSetClassCaps and see if you get that far. Continue this procedure for other functions that would be called at start up. You can also step through the code one line at a time once you narrow down what area is causing the CTD.
 
You need this dll. Google it to find download links.

Done, but still receiving the error about the DLL being missing, even after a reboot. Windows Vista Ultimate 64-bit.

Your dll has been compiled with the /MD option. Try compiling with debug version of the runtime files, /MDd, since you can often get more information to track down memory errors, which I suspect we have here. For example, it will deliberately poison unallocated/uninitialised memory with non-Null values to help make it obvious you have a problem.
Compiled as Debug. Here's the results when I ran the debugging again:

Code:
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\orbiter.exe', Binary was not built with debug information.
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\ddraw.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\msvcrt.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\user32.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\gdi32.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\advapi32.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\rpcrt4.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\secur32.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\dciman32.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\setupapi.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\oleaut32.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\ole32.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\dwmapi.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\dinput.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\winmm.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\oleacc.dll'
'orbiter.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.6001.18000_none_886786f450a74a05\comctl32.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\imm32.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\msctf.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\lpk.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\usp10.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\uxtheme.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\hid.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\wintrust.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\crypt32.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\msasn1.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\userenv.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\imagehlp.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\ntmarta.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\Wldap32.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\ws2_32.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\nsi.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\psapi.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\samlib.dll'
'orbiter.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.6001.18000_none_5cdbaa5a083979cc\comctl32.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\shlwapi.dll'
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Startup\AtlantisConfig.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Startup\DGConfig.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Plugin\FlyByWire.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.3053_none_d08d7bba442a9b36\msvcr80.dll'
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\FlyByWire\FlyByWireCore.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\version.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\comdlg32.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\shell32.dll'
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\SDL.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\nvd3dum.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\IPHLPAPI.DLL'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\dhcpcsvc.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\dnsapi.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\winnsi.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\dhcpcsvc6.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\powrprof.dll'
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\d3dim700.dll'
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Sun.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Vsop87.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'C:\Windows\SysWOW64\msvcirt.dll'
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Mercury.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Venus.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Earth.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Moon.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Mars.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Phobos.dll', Binary was not built with debug information.
'orbiter.exe': Unloaded 'D:\Program Files\Orbiter\Modules\Phobos.dll'
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Deimos.dll', Binary was not built with debug information.
'orbiter.exe': Unloaded 'D:\Program Files\Orbiter\Modules\Deimos.dll'
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Jupiter.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Galsat.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Io.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Europa.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Ganymede.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Callisto.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Saturn.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Satsat.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Mimas.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Enceladus.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Tethys.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Dione.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Rhea.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Titan.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Hyperion.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Iapetus.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Uranus.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Miranda.dll', Binary was not built with debug information.
'orbiter.exe': Unloaded 'D:\Program Files\Orbiter\Modules\Miranda.dll'
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Ariel.dll', Binary was not built with debug information.
'orbiter.exe': Unloaded 'D:\Program Files\Orbiter\Modules\Ariel.dll'
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Umbriel.dll', Binary was not built with debug information.
'orbiter.exe': Unloaded 'D:\Program Files\Orbiter\Modules\Umbriel.dll'
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Titania.dll', Binary was not built with debug information.
'orbiter.exe': Unloaded 'D:\Program Files\Orbiter\Modules\Titania.dll'
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Oberon.dll', Binary was not built with debug information.
'orbiter.exe': Unloaded 'D:\Program Files\Orbiter\Modules\Oberon.dll'
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Neptune.dll', Binary was not built with debug information.
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\Triton.dll', Binary was not built with debug information.
'orbiter.exe': Unloaded 'D:\Program Files\Orbiter\Modules\Triton.dll'
'orbiter.exe': Loaded 'D:\Program Files\Orbiter\Modules\XWing.dll', Symbols loaded.
First-chance exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0xccccccfc.
Unhandled exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0xccccccfc.
First-chance exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0xccccccfc.
Unhandled exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0xccccccfc.
The program '[2828] orbiter.exe: Native' has exited with code -1073741819 (0xc0000005).

It looks you are trying to access some unallocated memory (or orbiter.exe is, perhaps you passed it a bad pointer - this is more likely otherwise the debugger should give you a line number for you guilty code :P). What I suggest is putting a break point in your code at your vessel's constructor. If you don't get that far, the problem is most likely in your ovcInit function. If you get to the constructor, put a break point at clbkSetClassCaps and see if you get that far. Continue this procedure for other functions that would be called at start up. You can also step through the code one line at a time once you narrow down what area is causing the CTD.
You're going to have to step me through this part. When I say I'm new to coding, I mean that this is the first coding I have ever in my LIFE attempted.
 
Done, but still receiving the error about the DLL being missing, even after a reboot. Windows Vista Ultimate 64-bit.
Try putting in the same directory as orbiter.exe.

Compiled as Debug. Here's the results when I ran the debugging again:

Code:
First-chance exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0xccccccfc.
Unhandled exception at 0x00410112 in orbiter.exe: 0xC0000005: Access violation reading location 0xccccccfc.
That definitely looks like you have passed a pointer to Orbiter that is un-initialised. Now we just need to find out where ;)

You're going to have to step me through this part. When I say I'm new to coding, I mean that this is the first coding I have ever in my LIFE attempted.
Hmm, it is surprisingly difficult for Google to find a decent debugging tutorial. Try here for how to set a breakpoint:
http://msdn.microsoft.com/en-gb/library/15d1wtaf.aspx
And here for how to step through your code:
http://msdn.microsoft.com/en-gb/library/ek13f001.aspx

When stepping through your code, look for pointers that you are passing to Orbiter and make sure that they are initialised (if they are not, and you are using the debug runtime files, they will have values like 0xccccccfc, 0xcccccccc or 0xcdcdcdcd). Once you have hit a breakpoint, hovering the mouse over a variable name should show its current value.
 
Try putting in the same directory as orbiter.exe.

There's that problem fixed. ;)

I think I have the problem narrowed down to this bit of code right here:

Code:
    th_group[0] = th_main[0];
    th_group[0] = th_main[1];
    th_group[0] = th_main[2];
    th_group[0] = th_main[3];
    CreateThrusterGroup (th_group, 4, THGROUP_MAIN);

Specifically, it looks like it's the CreateThrusterGroup command that's crashing. This is my first CreateThrusterGroup command in the DLL, so I'm guessing that if there's something wrong here it may need to be fixed on the other two (retro and attitude).

Incidentally, when setting things like the thruster positions are those vertex coordinates on the model, or is that in a specific measurement in (meters, centimeters, etc) from the origin?
 
I think I have the problem narrowed down to this bit of code right here:

Code:
    th_group[0] = th_main[0];
    th_group[0] = th_main[1];
    th_group[0] = th_main[2];
    th_group[0] = th_main[3];
    CreateThrusterGroup (th_group, 4, THGROUP_MAIN);
Specifically, it looks like it's the CreateThrusterGroup command that's crashing. This is my first CreateThrusterGroup command in the DLL, so I'm guessing that if there's something wrong here it may need to be fixed on the other two (retro and attitude).
You have at least one problem - you have 4 elements in the array th_group and only one of them is initialised to a value (the 0th one). So when Orbiter tries to access th_group[1] you get a CTD. You want to do this:
Code:
    th_group[0] = th_main[0];
    th_group[1] = th_main[1];
    th_group[2] = th_main[2];
    th_group[3] = th_main[3];
    CreateThrusterGroup (th_group, 4, THGROUP_MAIN);

Aside from that, I am curious why you are bothering with the assignments at all. Why not just do this?
Code:
CreateThrusterGroup(th_main,4,THGROUP_MAIN);
Are all four members of th_main are being initialised properly (by the CreateThruster function) and have you declared th_main to be at least 4 elements long?

Incidentally, when setting things like the thruster positions are those vertex coordinates on the model, or is that in a specific measurement in (meters, centimeters, etc) from the origin?
The thruster positions are relative to the vessel origin. These may or may not align with vertexes on your model. In Orbiter, a vessel's performance and its visual representation are independant but generally it is a good idea to locate thrusters in positions that correspond to the visual model because the exhaust textures (assuming you have them defined) will originate at the thruster position.

Orbiter uses SI units throughout (maybe there are some exceptions but none come to mind). So for your model, one unit equals one meter in the Orbiter universe.

Other points of note:

1. The vessel origin is taken to be its centre of mass. This is important when you are placing and aligning thrusters.
2. The mesh origin need not be at the vessel origin, although it usually is to keep things simple. See the documentation on the AddMesh function.
 
You have at least one problem - you have 4 elements in the array th_group and only one of them is initialised to a value (the 0th one). So when Orbiter tries to access th_group[1] you get a CTD. You want to do this:
Code:
    th_group[0] = th_main[0];
    th_group[1] = th_main[1];
    th_group[2] = th_main[2];
    th_group[3] = th_main[3];
    CreateThrusterGroup (th_group, 4, THGROUP_MAIN);
Aside from that, I am curious why you are bothering with the assignments at all. Why not just do this?
Code:
CreateThrusterGroup(th_main,4,THGROUP_MAIN);

Ok, so if the group is comprised of all the thrusters of that type I don't need to actually SPECIFY them individually in the group?

Are all four members of th_main are being initialised properly (by the CreateThruster function) and have you declared th_main to be at least 4 elements long?

All the individual thrusters I did have numbered 0-3, and I did specify the number of thrusters of each type.

The thruster positions are relative to the vessel origin. These may or may not align with vertexes on your model. In Orbiter, a vessel's performance and its visual representation are independant but generally it is a good idea to locate thrusters in positions that correspond to the visual model because the exhaust textures (assuming you have them defined) will originate at the thruster position.

Ok, so the visual model has no bearing on performance, etc.

Orbiter uses SI units throughout (maybe there are some exceptions but none come to mind). So for your model, one unit equals one meter in the Orbiter universe.

So if I set a thruster position as (1,2,1) that engine will be 1 meter to the vessel's right, 2 meters above, and 1 meter forward towards the nose.

1. The vessel origin is taken to be its centre of mass. This is important when you are placing and aligning thrusters.
2. The mesh origin need not be at the vessel origin, although it usually is to keep things simple. See the documentation on the AddMesh function.

Does Orbiter do anything to account for actual DISTRIBUTION of mass? I have my mesh origin set to coincide with the center of mass, but I'd like to be able to specify how that's actually distributed (especially like the location of the fuel tank to see how burning off fuel would impact handling) because what I'm modelling is tail-heavy and part of what I'm trying to do is see how that is going to affect maneuvering. Or if I specify the ship as being, say, 30m long it automatically assume the center of mass is right in the center (IE 15m from each end)?
 
Ok, so if the group is comprised of all the thrusters of that type I don't need to actually SPECIFY them individually in the group?
Somewhere above that code in your clbkSetClassCaps function, you will have (or should have):
Code:
th_main[0] = CreateThruster(/*some stuff here*/)
and something like it for th_main elements 1, 2 & 3. You have thereby individually specified the thrusters. When you call:
Code:
CreateThrusterGroup(th_main,4,THGROUP_MAIN);
this tells Orbiter that you have a list of thruster handles located in memory at address th_main, the list is 4 elements long (ie, there are four thrusters in the group) and those four thrusters should fire when the main thrusters are activated by the user.

I should check: are you familiar with how c-style arrays work and their relationship to pointers? If not, read the link, it will help.

All the individual thrusters I did have numbered 0-3, and I did specify the number of thrusters of each type.
I see that, but I am asking did you assign values to each of them like in the example of CreateThruster I gave above? And did you also declare your arrary properly like:
Code:
THRUSTER_HANDLE th_main[4];
BTW, th_main should be a private member variable of your VESSEL2-derived class.

So if I set a thruster position as (1,2,1) that engine will be 1 meter to the vessel's right, 2 meters above, and 1 meter forward towards the nose.
Correct.

Does Orbiter do anything to account for actual DISTRIBUTION of mass? I have my mesh origin set to coincide with the center of mass, but I'd like to be able to specify how that's actually distributed (especially like the location of the fuel tank to see how burning off fuel would impact handling) because what I'm modelling is tail-heavy and part of what I'm trying to do is see how that is going to affect maneuvering. Or if I specify the ship as being, say, 30m long it automatically assume the center of mass is right in the center (IE 15m from each end)?
Orbiter does not simulate centre of mass shifting, although you can do it yourself enough using the ShiftCG function.

Orbiter does account for the distribution of mass by allowing you to define the principle moments of inertia for the vessel. It should be noted that these are defined mass-normalised and the consequence is that the moments of inertia reduce as fuel is burn off. Depending on your fuel tank position, you may wish to modify this behaviour by modifying the moments of inertia to suit (for example, IRL, the moments of inertia will change in different proportions about the different principle axes). If you are modifying the CoG, you may or may not wish to also adjust the moments of inertia accordingly. Like most things in Orbiter, it is really up to you as to simple or complex you want the model to be.

As a matter of interest, I modelled some CoG/moment of inertia shifting for the [ame="http://www.orbithangar.com/searchid.php?ID=3399"]Ananke Tether-Sling project[/ame]. That vessel had multiple meshes and each mesh had multiple masses and mass distributions associated with it. The moments of inertia and CoG where automatically calculated to suit the vessel configuration. As it turned out, I only ever made a lunar model (120km) so the code was largely under-utilised. The class diagram that I used is attached - it might given you some ideas for your own mass model.
 

Attachments

Ok, still failing on the CreateThrusterGroup section. Might be easier at this point to show you how I have it coded. I set break points at each Thruster Group, and it fails on the first one.

Code:
THRUSTER_HANDLE th_main[4], th_rcs[8], th_retro[4], th_group[6];

th_main[0] = CreateThruster (_V(15, 8.7, -35), _V(0, 0, 1), MAX_MAIN_THRUST, FUEL, ISP);
    th_main[1] = CreateThruster (_V(-15, 8.7, -35), _V(0, 0, 1), MAX_MAIN_THRUST, FUEL, ISP);
    th_main[2] = CreateThruster (_V(-15, -8.7, -35), _V(0, 0, 1), MAX_MAIN_THRUST, FUEL, ISP);
    th_main[3] = CreateThruster (_V(15, -8.7, -35), _V(0, 0, 1), MAX_MAIN_THRUST, FUEL, ISP);

    th_retro[0] = CreateThruster (_V(15, 5, 10), _V(0, 0, -1), MAX_RETRO_THRUST, FUEL, ISP);
    th_retro[1] = CreateThruster (_V(-15, 5, 10), _V(0, 0, -1), MAX_RETRO_THRUST, FUEL, ISP);
    th_retro[2] = CreateThruster (_V(-15, -5, 10), _V(0, 0, -1), MAX_RETRO_THRUST, FUEL, ISP);
    th_retro[3] = CreateThruster (_V(15, -5, 10), _V(0, 0, -1), MAX_RETRO_THRUST, FUEL, ISP);

    th_rcs[0] = CreateThruster (_V(15, 8.7, -35), _V(0, 0, 1), MAX_RCS_THRUST, FUEL, ISP);
    th_rcs[1] = CreateThruster (_V(-15, 8.7, -35), _V(0, 0, 1), MAX_RCS_THRUST, FUEL, ISP);
    th_rcs[2] = CreateThruster (_V(-15, -8.7, -35), _V(0, 0, 1), MAX_RCS_THRUST, FUEL, ISP);
    th_rcs[3] = CreateThruster (_V(15, -8.7, -35), _V(0, 0, 1), MAX_RCS_THRUST, FUEL, ISP);
    th_rcs[4] = CreateThruster (_V(15, 5, 10), _V(0, 0, -1), MAX_RCS_THRUST, FUEL, ISP);
    th_rcs[5] = CreateThruster (_V(-15, 5, 10), _V(0, 0, -1), MAX_RCS_THRUST, FUEL, ISP);
    th_rcs[6] = CreateThruster (_V(-15, -5, 10), _V(0, 0, -1), MAX_RCS_THRUST, FUEL, ISP);
    th_rcs[7] = CreateThruster (_V(15, -5, 10), _V(0, 0, -1), MAX_RCS_THRUST, FUEL, ISP);

    CreateThrusterGroup (th_group, 4, THGROUP_MAIN);

    CreateThrusterGroup (th_group, 4, THGROUP_RETRO);

    th_group[0] = th_rcs[0];
    th_group[1] = th_rcs[1];
    th_group[2] = th_rcs[6];
    th_group[3] = th_rcs[7];
    CreateThrusterGroup (th_group, 4, THGROUP_ATT_PITCHDOWN);

    th_group[0] = th_rcs[2];
    th_group[1] = th_rcs[3];
    th_group[2] = th_rcs[4];
    th_group[3] = th_rcs[5];
    CreateThrusterGroup (th_group, 4, THGROUP_ATT_PITCHUP);

    th_group[0] = th_rcs[1];
    th_group[1] = th_rcs[2];
    th_group[2] = th_rcs[5];
    th_group[3] = th_rcs[6];
    CreateThrusterGroup (th_group, 4, THGROUP_ATT_YAWLEFT);

    th_group[0] = th_rcs[0];
    th_group[1] = th_rcs[3];
    th_group[2] = th_rcs[4];
    th_group[3] = th_rcs[7];
    CreateThrusterGroup (th_group, 4, THGROUP_ATT_YAWRIGHT);

This is my code before. You can disregard the thruster placement as I'll need to correct them (based it on vertex location. Although if you're curious you can see part of what I'm testing here). I also narrowed it down further to the THGROUP_MAIN it doesn't like. I removed it and the retro group, and it loads with only the attitude thruster groups.

Incidentally, I'm curious what would happen if I were to set a main or retro thruster to an ATT control group....
 
I also narrowed it down further to the THGROUP_MAIN it doesn't like. I removed it and the retro group, and it loads with only the attitude thruster groups.
That is because the elements of th_group have not been initialised when you are calling that function:
Code:
    // The elements of th_group have not been initialised yet
    // CreateThrusterGroup (th_group, 4, THGROUP_MAIN);
    CreateThrusterGroup (th_main, 4, THGROUP_MAIN);

    // The elements of th_group have not been initialised yet
    // CreateThrusterGroup (th_group, 4, THGROUP_RETRO);
    CreateThrusterGroup (th_retro, 4, THGROUP_RETRO);

Incidentally, I'm curious what would happen if I were to set a main or retro thruster to an ATT control group....
You would spin very fast :P There is nothing special about these groups, insofar as their action on the vessel is concerned. Each timestep Orbiter will integrate each of the forces on the vessel (thrusters, aerodynamic, etc) and all it really cares about is the size of the force, its direction and its attack point. The only reason you are defining these groups is so that Orbiter's user interface (and plugins) can conviently control your vessel. You could define a bunch of thrusters but not assign them to any group. The only way those thrusters could then be controlled would be via some custom user interface that you provide (custom key assignments, MFD interface, virtual cockpit, 2d panel, dialog box). Such a setup may be desirable, depending on your project.
 
That is because the elements of th_group have not been initialised when you are calling that function:

Code:
    // The elements of th_group have not been initialised yet
    // CreateThrusterGroup (th_group, 4, THGROUP_MAIN);
    CreateThrusterGroup (th_main, 4, THGROUP_MAIN);

    // The elements of th_group have not been initialised yet
    // CreateThrusterGroup (th_group, 4, THGROUP_RETRO);
    CreateThrusterGroup (th_retro, 4, THGROUP_RETRO);

What is the fix for it, then, or is the code you provided what does it? And why is it that the attitude thruster groups ARE working?

Incidentally, another odd issue came up when I loaded it into the sim with just the ATT thruster groups set. As soon as I turn off pause the ship immediately begins to rapidly backflip, stops, then starts flipping the opposite direction. There is no control input going in (to make sure I loaded one of the built-in modules and the default ship doesn't move when I take off pause). I AM having some control problems--I installed FlyByWire and I'm getting NO reaction from the controls whatsoever so it's not a calibration issue.

You would spin very fast :P

Hm.... That would certainly do what I need it to do.... ;)
 
What is the fix for it, then, or is the code you provided what does it?
Sorry, I should have been clearer. Yes, use the code I provided.

And why is it that the attitude thruster groups ARE working?
Because at the time you call CreateThrusterGroup for those groups you have initialised all the arguments that you are passing to the function. When you were calling this function:
Code:
 CreateThrusterGroup (th_group, 4, THGROUP_MAIN);
th_group had not been assigned a value and is pointing to some unallocated piece of memory. When you pass it to Orbiter, Orbiter tries to access that memory and Windows thows an exception because you should not be accessing unallocated memory. In contrast, you had already assigned values to th_group before calling:
Code:
CreateThrusterGroup (th_group, 4, THGROUP_ATT_PITCHDOWN);

Incidentally, another odd issue came up when I loaded it into the sim with just the ATT thruster groups set. As soon as I turn off pause the ship immediately begins to rapidly backflip, stops, then starts flipping the opposite direction. There is no control input going in (to make sure I loaded one of the built-in modules and the default ship doesn't move when I take off pause). I AM having some control problems--I installed FlyByWire and I'm getting NO reaction from the controls whatsoever so it's not a calibration issue.
Strange. Were you in the atmosphere or space?
 
Sorry, I should have been clearer. Yes, use the code I provided.

Woo! That got it, thanks! Now to find out what else I can mess up. ;-)

Were you in the atmosphere or space?

Starting in space. It just constantly starts flipping end over end as soon as I launch the sim. None of the other modules do this.
 
Starting in space. It just constantly starts flipping end over end as soon as I launch the sim. None of the other modules do this.
In the scenario file, does your vessel have an angular velocity >0? If yes, then try setting it to zero, like this:
Code:
  VROT 0.0 0.0 0.0
Also, have you defined principle moments of inertia? Are they similar in magnitude to each other and how to they compare to a vessel like the DeltaGlider (check its sample code)? It sounds to me like you have very low PMIs and the vehicle is showing some wicked polhode motion. It is hard to say without seeing it though.
 
Last edited:
Here's the entry from the scenario:

Code:
  STATUS Orbiting Earth
  RPOS 2285262.70 6789817.18 -1065504.96
  RVEL 7132.181 -2350.025 345.086
  AROT 0.0 0.0 0.0
  VROT 0.0 0.0 0.0
  PRPLEVEL 0:1.000 1:1.000
  THLEVEL 0:1.000 1:1.000
  NAVFREQ 0 0
  XPDR 0
  PODANGLE 0.0000 0.0000
  DOCKSTATE 0 0.0000
  AIRLOCK 0 0.0000
  GEAR 0 0.0000
  PAYLOAD MASS 0.0 0

I copied the PMI from ShuttleA because it was simpler than the Delta Glider:

Code:
SetPMI (_V(2.28,2.31,0.79));
 
Code:
  THLEVEL 0:1.000 1:1.000
That means your thrusters are turned on. Delete that line and your thrusters will default to off. Your description of the motion indicates that the thruster attack points and/or directions need some work.

I copied the PMI from ShuttleA because it was simpler than the Delta Glider:
Should be OK for preliminary testing. When placing/rating your thrusters just note that the vessel will roll (0.79) easier than it will pitch and yaw (~2.3). I've no idea if it is realistic or not since we don't know what your vessel looks like...
 
Ok, cool, that got her stabilized. Now I just need to find out why my controls aren't working with FBW...

I do need to revise my thruster positions anyway, as I said, I set them before based on vertex position, not meters from origin.

As for the pitch vs. roll performance...

That's the tricky part, because I have no idea HOW the ship would actually perform... The purpose of this is, I'd like to be able to set stuff like mass and distribution of it, engine positions, and engine power, and just see what she'll naturally do.
 
I do need to revise my thruster positions anyway, as I said, I set them before based on vertex position, not meters from origin.
Well, the vertex position will be relative to the mesh origin so that should be OK.

As for the pitch vs. roll performance...

That's the tricky part, because I have no idea HOW the ship would actually perform... The purpose of this is, I'd like to be able to set stuff like mass and distribution of it, engine positions, and engine power, and just see what she'll naturally do.
That is OK but you need to start somewhere. Eg, you need to specify some RCS thrusters - how are you going to do that if you don't have some idea how you want the thing to perform?

On mass distribution etc, have you checked out the shipedit utility in the SDK? It can estimate the PMIs from your mesh based on homogeneous mass distribution (assuming your mesh is "closed"). For more detail, you will have to estimate them by hand (or some other software, I have done simple models in Excel before). A useful resource: http://en.wikipedia.org/wiki/List_of_moments_of_inertia
 
Back
Top