0xC0000005: Access violation reading location 0x00000000.
Usually when an exception is thrown in Orbiter core, the call-stack might not be correct anymore, but in general this kind of exception means:
You have given a function a NULL-pointer ( reading location 0x00000000), wich is not handled there.
So the root-cause is any function-call with no good pointers provided.
If you are lucky, the call-stack is still valid and you can "step back" through the stack and identify where the null-pointer was given.
Like:
> FunctionX [@Orbiter.exe] (where the exception is thrown) was called by
>> FunctionY [@YourModule] ...that called FunctionX ...
>>> FunctionZ [@YourModule] ...that called FunctionY ...
..etc. pp.
The art of debugging this is: Find out what function call was bad!
If the call-stack is not valid, you can only break at "strategic" points in your modules code and step through until you get a feeling for when the exception usually happens.
If the CTD happens after a specific key-press for example, start at the keyboard handling methods.
If it happens right after startup, start at the c'tor.
...it's a process of small steps until you get the root-cause.