Advanced Question Using Orbiter d3d9 client in debug mode

Topper

Addon Developer
Addon Developer
Donator
Joined
Mar 28, 2008
Messages
666
Reaction score
20
Points
33
Hi, is it possible to use debug mode from visual studio with the d3d9 graphic client and if yes how?
I have trouble using the inline graphic client with windows 10 so I can't use this.

Thanks for help!
 

Face

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 18, 2008
Messages
4,406
Reaction score
589
Points
153
Location
Vienna
Hi, is it possible to use debug mode from visual studio with the d3d9 graphic client and if yes how?
I have trouble using the inline graphic client with windows 10 so I can't use this.

Why do you want to debug it? Is it also not working for you, just like the inline client?
 

Topper

Addon Developer
Addon Developer
Donator
Joined
Mar 28, 2008
Messages
666
Reaction score
20
Points
33
No sorry maybe my description was not so good...
Normaly I used the orbiter.exe in debug mode for developting plugins.
Now, I just want to use the orbiter_ng.exe in debug mode for developing another plugin. I don't want to debug the d3d9 client.

But when I use "orbiter_ng.exe" as command in the debug solution and I press Run in VS, I got the message "orbiter_ng.exe has exit with code 0" in the VS log window, however, the Orbiter launchpad is open.

I think the orbiter_ng.exe just starts the orbiter.exe without inline graphic client and the process of the orbiter_ng.exe will be terminated after.
Maybe there is a parameter to start orbiter.exe without inline graphic client or so...?
 
Joined
Mar 23, 2008
Messages
165
Reaction score
0
Points
16
What about /Modules/Server/Orbiter.exe? Isn't it that that gets launched by Orbiter_ng.exe?
 

martins

Orbiter Founder
Orbiter Founder
Joined
Mar 31, 2008
Messages
2,448
Reaction score
464
Points
83
Website
orbit.medphys.ucl.ac.uk
What about /Modules/Server/Orbiter.exe? Isn't it that that gets launched by Orbiter_ng.exe?

That is correct. When debugging a plugin under orbiter_ng, set Modules/Server/Orbiter.exe as the launch application, but also make sure to set the Orbiter root directory as the working directory, otherwise Orbiter won't find its subdirectories.
 

Topper

Addon Developer
Addon Developer
Donator
Joined
Mar 28, 2008
Messages
666
Reaction score
20
Points
33
Hi again,
thanks generaly, it's working now...

But sometimes, I have a "CTD" and an error in VS "binary data are not filled with debug informations".

source position: C:\Orbiter\Orbiter2016\Modules\Server\orbiter.exe

I have no idea why and can't debug :-(

---------- Post added at 21:46 ---------- Previous post was at 21:45 ----------

Hi again,
thanks generaly, it's working now...

But sometimes, I have a "CTD" and an error in VS "binary data are not filled with debug informations".

source position: C:\Orbiter\Orbiter2016\Modules\Server\orbiter.exe

I have no idea why and can't debug :-(
Any idea please?
 

martins

Orbiter Founder
Orbiter Founder
Joined
Mar 31, 2008
Messages
2,448
Reaction score
464
Points
83
Website
orbit.medphys.ucl.ac.uk
You can't debug inside orbiter.exe, only in your own addon code.
If the call stack is usable, it may be a good idea to check if it contains a reference to one of the functions in your code. If so, this is a good point to start debugging. For example, check if the parameters passed to API calls are valid, etc.
 

Topper

Addon Developer
Addon Developer
Donator
Joined
Mar 28, 2008
Messages
666
Reaction score
20
Points
33
Thanks Martin,
it's a "0xC0000005" error.
The last call is from oapiWriteLog, but i'm not using this method in my plugin.
I can't reproduce this it's only "sometimes"

I have no Idea. :(:(
So do you think I should check all my "oapi" - calls if their parameters are corect right?
Only the "oapi" - calls or also other api calls (like Vesesl-> blablabla)?

bug.png


---------- Post added 12-01-17 at 00:27 ---------- Previous post was 11-01-17 at 21:45 ----------

Maybe I've got the mistake...
I had send a "NAN" value to the "SetThrusterGroupLevel" method.

Code:
vessel->SetThrusterGroupLevel(THGROUP_ATT_YAWLEFT, thrust);

I can avoid the CTD like this:

Code:
if (thrust == thrust)
   vessel->SetThrusterGroupLevel(THGROUP_ATT_YAWLEFT, thrust);
However, I have to check WHY it's nan...
 
Last edited:
Top