New Release D3D9Client Development

jarmonik

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,666
Reaction score
795
Points
128
How can I do this and pass it to you? (I'm using visual studio 2010). Shall I compile in Debug mode?
I suppose the "Release" build should work just fine. You can attach a test binary package in this thread.
 

jarmonik

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,666
Reaction score
795
Points
128
I have identified one of the problems that seems to be related to hook procedures in the D3D9Client. I don't know much about the hooks so I let Kuddel to take a close look. I get a CTD after opening and moving the dialog window.

A quick fix to the problem is to set "DisableVisualHelperReadout" parameter from D3D9Client.cfg to "1".



After that, there is still one problem remaining with "Stage" dialog. All other sub dialogs seems to be working.

Code:
STATUS_STACK_BUFFER_OVERRUN encountered
orbiter.exe has triggered a breakpoint

A debugger doesn't really point it's finger to any direction. The last call made by the Orbiter for the client is bool D3D9Client::clbkDisplayFrame() and it returns true. Somewhere after that the CTD occurs.

Can you disable the source code that's filling the "Stage" dialog and see if the dialog it self works. Then re-enable the code section by section. If that doesn't produce any results then it might be good idea to forward the case for Martin.
 

Attachments

  • Hook.png
    Hook.png
    57.2 KB · Views: 15

fred18

Addon Developer
Addon Developer
Donator
Joined
Feb 2, 2012
Messages
1,667
Reaction score
104
Points
78
Thank you very much for your time and availability!

One question: could this be related to some Get/SetWindowlong procedure in the BOOL CALLBACK DlgProc? Because I did that part of code basically copying and trying to understand it from samples but it's something that I didn't quite understand, so I'm not sure about it.

---------- Post added at 17:19 ---------- Previous post was at 17:18 ----------

Can you disable the source code that's filling the "Stage" dialog and see if the dialog it self works. Then re-enable the code section by section. If that doesn't produce any results then it might be good idea to forward the case for Martin.

Yep, this is one of the first thing I did: I have to disable the CreateDialogParam call to avoid the CTD. As soon as the dialog is created even if I do not fill it in, just when I try to display it I get the CTD.
 

kuddel

Donator
Donator
Joined
Apr 1, 2008
Messages
2,064
Reaction score
507
Points
113
D3D9Client (different HOOKing)

Hi Fred18,

I could not get very deep into the debugging, but could you try the attached version of D3D9Client (for BETA) please.

I changed some of the hooking logic that might have hooked to your window, but I still don't see why the CTD on window close happens...

Please write back on any (tiny) improvement ;)

/Kuddel
 
Last edited:

fred18

Addon Developer
Addon Developer
Donator
Joined
Feb 2, 2012
Messages
1,667
Reaction score
104
Points
78
Not tiny!!!
I just did a very very quick test but it seems to work perfectly!!

Guys this is amazing: everytime I had some doubt or question about D3D9 you answered in such a short time and always solved any issue!

I'll keep testing while continuing my development but for the time being it seems to work really smoothly!

In the meantime I found out that textboxes in dialogs with text not properly initialized were also causing some issues so I spent some time to properly reconfigure all the "empty" texts. Here is the updated module, in case you need to perform a bit more testing! (you're also having a free preview of the new developer mode of MS2015 :lol: )

http://www.intech-srl.eu/fred/Multistage2015 TBP.zip

again and again: :thankyou::thankyou::thankyou:
 

jarmonik

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,666
Reaction score
795
Points
128
I changed some of the hooking logic that might have hooked to your window

Thank you for taking a care of that. A lot appreciated.

I would have one question about the hooks: Would it be possible to prevent passing a keyboard and mouse events to the Orbiter. For an example if I want to use WASD keys for camera panning when using a debug camera mode in the client. Can we prevent Orbiter from receiving the keys. Orbiter is obviously receiving the events from the main application message loop before the messages are passed to WndProc.

This really isn't an important issue so maybe I shouldn't bother anyone with it.
 

kuddel

Donator
Donator
Joined
Apr 1, 2008
Messages
2,064
Reaction score
507
Points
113
D3D9Client for Orbiter BETA r43

Thank you for taking a care of that. A lot appreciated.

I would have one question about the hooks: Would it be possible to prevent passing a keyboard and mouse events to the Orbiter. For an example if I want to use WASD keys for camera panning when using a debug camera mode in the client. Can we prevent Orbiter from receiving the keys. Orbiter is obviously receiving the events from the main application message loop before the messages are passed to WndProc.

This really isn't an important issue so maybe I shouldn't bother anyone with it.
Interesting :) I'll maybe take a look at this after this weekend. But don't expect anything too soon, sorry real-life issues ;)

By the way: Attached is the current D3D9Client for Orbiter BETA;
linked against the current Orbiter BETA libraries r43.
 
Last edited:

Ripley

Tutorial translator
Donator
Joined
Sep 12, 2010
Messages
3,133
Reaction score
407
Points
123
Location
Rome
Website
www.tuttovola.org
...I haven't been able to reproduce the issue. The area where the problem might exists is pretty large. Does it still occur with the latest beta ?
Yes, it still does.
Orbiter Beta Rev. 43, and latest D3D9ClientBeta12-forBETA r43(r37285).

My original issue:
http://www.orbiter-forum.com/showthread.php?p=516878&postcount=3203

---------- Post added at 11:39 ---------- Previous post was at 00:18 ----------

If I'm the only one reporting this issue, and it looks so, please don't waste too much of your time with it, I can live with it.
I'm still running my (faithful) XP, with an oldish ATI gfx card: sooner or later I'll upgrade my jurassic rig, and I guess it will sort itself out.
 

jarmonik

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,666
Reaction score
795
Points
128
Can you test if this will fix the issue with powered-off MFDs. Place the *.dll in /Modules/Plugin/
 

Attachments

  • D3D9Client_MFD_test.zip
    355.9 KB · Views: 17

romanasul

Member
Joined
May 5, 2012
Messages
301
Reaction score
0
Points
16
Location
Toronto
I have a problem with DirectX9 client R15 and Moach's G42 Starliner, whenever I switch on the afterburners an error pops up saying there's an error in D3D9Surface.cpp. After that it crashes.
 
Last edited:

Ripley

Tutorial translator
Donator
Joined
Sep 12, 2010
Messages
3,133
Reaction score
407
Points
123
Location
Rome
Website
www.tuttovola.org
You know that there is a 15.1 buried somewhere in this thread?

Here:
http://orbiter-forum.com/showthread.php?p=508249&postcount=3165

---------- Post added at 19:10 ---------- Previous post was at 18:26 ----------

Can you test if this will fix the issue with powered-off MFDs. Place the *.dll in /Modules/Plugin/
Bug fixed!

MNgK6rA.png


mRTuLO7.png


gCeolDR.png
 
Last edited:

jarmonik

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,666
Reaction score
795
Points
128
D3D9ClientBeta13

I am still working on LTMFD and haven't had much time with the client but here are some updates.

- Fixed distant planet rendering
- Fixed white "turned off" MFD screen on some hardware
- Fixed Vesta rendering issue
- Improved lunar rendering
- Fixed some cloud layer flicker issues

Looks like the project SVN is down, I'll try to upload the code later.
 
Last edited:

fred18

Addon Developer
Addon Developer
Donator
Joined
Feb 2, 2012
Messages
1,667
Reaction score
104
Points
78
One question: is the new hook logic made by kuddel for dialogs included in this?
 

JMW

Aspiring Addon Developer
Joined
Aug 5, 2008
Messages
611
Reaction score
52
Points
43
Location
Happy Wherever
No Video tab in Launchpad D3D9Client

Sorry to post this cause I know it's come up a few times but I think my case is slightly different inasmuch as everything was working perfectly until I updated to D3D9ClientBeta12-forBETA r43(r37285)
Now I have no Video tab on the Server Launchpad and get just a Command Line (DOS) screen on launching a scenario....
Any help appreciated, have tried numerous copy/pastes to try n find the culprit to no avail....
Have searched n cannot locate a definitive answer......
 

orb

New member
News Reporter
Joined
Oct 30, 2009
Messages
14,020
Reaction score
4
Points
0
Any error code logged next to the module in Orbiter.log?
 

JMW

Aspiring Addon Developer
Joined
Aug 5, 2008
Messages
611
Reaction score
52
Points
43
Location
Happy Wherever
Orb, hit the nail on the head as usual!
Module wasn't activated in Launchpad. :facepalm:
Sorry guys...
 

Ripley

Tutorial translator
Donator
Joined
Sep 12, 2010
Messages
3,133
Reaction score
407
Points
123
Location
Rome
Website
www.tuttovola.org
Orbiter Beta with latest D3D9 13 for Rev 43:
everytime I zoom in on Enceladus (with RMB+wheel) I get a CTD.
Scenario "The Solar System -> Enceladus"

Log is showing:
Code:
**** Orbiter.log
000000.000: Build Nov 19 2015 [v.151119]
000000.000: Timer precision: 4.1666e-010 sec
000000.000: Found 0 joystick(s)
000000.000: Module AtlantisConfig.dll .... [Build 150906, API 150906]
000000.000: Module AtmConfig.dll ......... [Build 150906, API 150906]
000000.000: Module DGConfigurator.dll .... [Build 150906, API 150906]
000000.000: Module ExtMFD.dll ............ [Build 150906, API 150906]
000000.000: Module ScnEditor.dll ......... [Build 150906, API 150906]
000000.000: Module D3D9Client.dll ........ [Build 151121, API 151119]
000000.000: 
000000.000: **** Creating simulation session
000000.000: D3D9Client: [DirectX 9 Initialized]
000000.000: D3D9Client: Sytem has XNA math support
000000.000: D3D9Client: [3DDevice Initialized]
000000.000: D3D9Client: [Compiling Effects for Shader Model 3.0]
000000.000: D3D9Client: [Loading Stars]
000000.000: D3D9Client: [Loading Constellations]
000000.000: D3D9Client: [D3D9Client Initialized]
000000.000: Attempting to clear a texture 0x4A723E0 color=0x0
000000.000: Module Sun.dll ............... [Build 150906, API 150906]
VSOP87(E) Sun: Precision 1e-006, Terms 554/6634
000000.000: Module Mercury.dll ........... [Build 150906, API 150906]
VSOP87(B) Mercury: Precision 1e-005, Terms 167/7123
000000.000: Module Venus.dll ............. [Build 150906, API 150906]
000000.000: Module VenusAtm2006.dll ...... [Build 150906, API 150906]
VSOP87(B) Venus: Precision 1e-005, Terms 79/1710
000000.000: Module Earth.dll ............. [Build 150906, API 150906]
000000.000: Module EarthAtm2006.dll ...... [Build 150906, API 150906]
VSOP87(B) Earth: Precision 1e-008, Terms 2564/2564
000000.000: Module Moon.dll .............. [Build 150906, API 150906]
ELP82: Precision 1e-005, Terms 116/829
000000.000: Module Mars.dll .............. [Build 150906, API 150906]
000000.000: Module MarsAtm2006.dll ....... [Build 150906, API 150906]
VSOP87(B) Mars: Precision 1e-005, Terms 405/6400
000000.000: Module Phobos.dll ............ [Build ******, API 060425]
000000.000: Module Deimos.dll ............ [Build ******, API 060425]
000000.000: Module Galsat.dll ............ [Build 150906, API 150906]
000000.000: Module Jupiter.dll ........... [Build 150906, API 150906]
VSOP87(B) Jupiter: Precision 1e-006, Terms 1624/3625
000000.000: Module Io.dll ................ [Build 150906, API 150906]
000000.000: Module Europa.dll ............ [Build 150906, API 150906]
000000.000: Module Ganymede.dll .......... [Build 150906, API 150906]
000000.000: Module Callisto.dll .......... [Build 150906, API 150906]
000000.000: Module Satsat.dll ............ [Build 150906, API 150906]
000000.000: Module Saturn.dll ............ [Build 150906, API 150906]
VSOP87(B) Saturn: Precision 1e-006, Terms 2904/6365
000000.000: Module Mimas.dll ............. [Build 150906, API 150906]
SATSAT Mimas: Terms 113
000000.000: Module Enceladus.dll ......... [Build 150906, API 150906]
SATSAT Enceladus: Terms 33
000000.000: Module Tethys.dll ............ [Build 150906, API 150906]
SATSAT Tethys: Terms 101
000000.000: Module Dione.dll ............. [Build 150906, API 150906]
SATSAT Dione: Terms 59
000000.000: Module Rhea.dll .............. [Build 150906, API 150906]
SATSAT Rhea: Terms 68
000000.000: Module Titan.dll ............. [Build 150906, API 150906]
SATSAT Titan: Terms 100
000000.000: Module Iapetus.dll ........... [Build 150906, API 150906]
SATSAT Iapetus: Terms 605
000000.000: Module Uranus.dll ............ [Build 150906, API 150906]
VSOP87(B) Uranus: Precision 1e-006, Terms 1827/5269
000000.000: Module Miranda.dll ........... [Build ******, API 060425]
000000.000: Module Ariel.dll ............. [Build ******, API 060425]
000000.000: Module Umbriel.dll ........... [Build ******, API 060425]
000000.000: Module Titania.dll ........... [Build ******, API 060425]
000000.000: Module Oberon.dll ............ [Build ******, API 060425]
000000.000: Module Neptune.dll ........... [Build 150906, API 150906]
VSOP87(B) Neptune: Precision 1e-006, Terms 391/2024
000000.000: Finished initialising world
000000.000: Module DeltaGlider.dll ....... [Build 151119, API 151119]
000000.000: Module LuaInline.dll ......... [Build 150906, API 150906]
000000.000: Module ShuttleA.dll .......... [Build 151025, API 151025]
000000.000: Finished initialising status
000000.000: Finished initialising camera
000000.000: Finished setting up render state
000000.000: Difference greater than 0.001 [112974], angle=0, y=1
000000.000: Difference greater than 0.001 [111640], angle=1.92, y=1.00056
000000.000: Difference greater than 0.001 [107663], angle=3.84, y=1.00225
000000.000: Difference greater than 0.001 [101129], angle=5.76, y=1.00507
000000.000: Difference greater than 0.001 [92173.9], angle=7.68, y=1.00905
000000.000: Difference greater than 0.001 [80988.4], angle=9.6, y=1.0142
000000.000: Difference greater than 0.001 [67814.3], angle=11.52, y=1.02056
000000.000: Difference greater than 0.001 [52941.5], angle=13.44, y=1.02816
000000.000: Difference greater than 0.001 [36704.8], angle=15.36, y=1.03704
000000.000: Difference greater than 0.001 [19480.2], angle=17.28, y=1.04727
000000.000: Difference greater than 0.001 [1679.26], angle=19.2, y=1.0589
000000.000: Difference greater than 0.001 [16256], angle=21.12, y=1.07201
000000.000: Difference greater than 0.001 [33860.3], angle=23.04, y=1.08668
000000.000: Difference greater than 0.001 [50653.1], angle=24.96, y=1.10302
000000.000: Difference greater than 0.001 [66147.5], angle=26.88, y=1.12113
000000.000: Difference greater than 0.001 [79861.1], angle=28.8, y=1.14115
000000.000: Difference greater than 0.001 [91327.5], angle=30.72, y=1.16323
000000.000: Difference greater than 0.001 [100110], angle=32.64, y=1.18754
000000.000: Difference greater than 0.001 [105817], angle=34.56, y=1.21428
000000.000: Difference greater than 0.001 [108120], angle=36.48, y=1.24368
000000.000: Difference greater than 0.001 [106768], angle=38.4, y=1.27601
000000.000: Difference greater than 0.001 [101615], angle=40.32, y=1.31157
000000.000: Difference greater than 0.001 [92635.6], angle=42.24, y=1.35074
000000.000: Difference greater than 0.001 [79950.3], angle=44.16, y=1.39393
000000.000: Difference greater than 0.001 [63849.1], angle=46.08, y=1.44164
000000.000: Difference greater than 0.001 [44812.8], angle=48, y=1.49448
000000.000: Difference greater than 0.001 [23532.5], angle=49.92, y=1.55314
000000.000: Difference greater than 0.001 [923.476], angle=51.84, y=1.61849
000000.000: Difference greater than 0.001 [21870.7], angle=53.76, y=1.69156
000000.000: Difference greater than 0.001 [43488.4], angle=55.68, y=1.77363
000000.000: Difference greater than 0.001 [62383.3], angle=57.6, y=1.86627
000000.000: Difference greater than 0.001 [76890.1], angle=59.52, y=1.97146
000000.000: Difference greater than 0.001 [85334.9], angle=61.44, y=2.09171
000000.000: Difference greater than 0.001 [86207], angle=63.36, y=2.23024
000000.000: Difference greater than 0.001 [78406.3], angle=65.28, y=2.39129
000000.000: Difference greater than 0.001 [61580.6], angle=67.2, y=2.58054
000000.000: Difference greater than 0.001 [36717.6], angle=69.12, y=2.79296
000000.000: Difference greater than 0.001 [5815.51], angle=71.04, y=3.06222
000000.000: Difference greater than 0.001 [26317.9], angle=72.96, y=3.39313
000000.000: Difference greater than 0.001 [52920.5], angle=74.88, y=3.80895
000000.000: Difference greater than 0.001 [65684.3], angle=76.8, y=4.34627
000000.000: Difference greater than 0.001 [57025.6], angle=78.72, y=5.06588
000000.000: Difference greater than 0.001 [24939.4], angle=80.64, y=6.08034
000000.000: Difference greater than 0.001 [19331.9], angle=82.56, y=7.60703
000000.000: Difference greater than 0.001 [45866.3], angle=84.48, y=10.1611
000000.000: Difference greater than 0.001 [21384.2], angle=86.4, y=15.2393
000000.000: Difference greater than 0.001 [25102.9], angle=88.32, y=29.47
000000.000: Difference greater than 0.001 [2456.08], angle=90.24, y=128.371
000000.000: Difference greater than 0.001 [3.19497], angle=92.16, y=14317.4
000000.000: Difference greater than 0.001 [112974], angle=0, y=1
000000.000: Difference greater than 0.001 [111640], angle=1.92, y=1.00056
000000.000: Difference greater than 0.001 [107663], angle=3.84, y=1.00225
000000.000: Difference greater than 0.001 [101129], angle=5.76, y=1.00507
000000.000: Difference greater than 0.001 [92173.9], angle=7.68, y=1.00905
000000.000: Difference greater than 0.001 [80988.4], angle=9.6, y=1.0142
000000.000: Difference greater than 0.001 [67814.3], angle=11.52, y=1.02056
000000.000: Difference greater than 0.001 [52941.5], angle=13.44, y=1.02816
000000.000: Difference greater than 0.001 [36704.8], angle=15.36, y=1.03704
000000.000: Difference greater than 0.001 [19480.2], angle=17.28, y=1.04727
000000.000: Difference greater than 0.001 [1679.26], angle=19.2, y=1.0589
000000.000: Difference greater than 0.001 [16256], angle=21.12, y=1.07201
000000.000: Difference greater than 0.001 [33860.3], angle=23.04, y=1.08668
000000.000: Difference greater than 0.001 [50653.1], angle=24.96, y=1.10302
000000.000: Difference greater than 0.001 [66147.5], angle=26.88, y=1.12113
000000.000: Difference greater than 0.001 [79861.1], angle=28.8, y=1.14115
000000.000: Difference greater than 0.001 [91327.5], angle=30.72, y=1.16323
000000.000: Difference greater than 0.001 [100110], angle=32.64, y=1.18754
000000.000: Difference greater than 0.001 [105817], angle=34.56, y=1.21428
000000.000: Difference greater than 0.001 [108120], angle=36.48, y=1.24368
000000.000: Difference greater than 0.001 [106768], angle=38.4, y=1.27601
000000.000: Difference greater than 0.001 [101615], angle=40.32, y=1.31157
000000.000: Difference greater than 0.001 [92635.6], angle=42.24, y=1.35074
000000.000: Difference greater than 0.001 [79950.3], angle=44.16, y=1.39393
000000.000: Difference greater than 0.001 [63849.1], angle=46.08, y=1.44164
000000.000: Difference greater than 0.001 [44812.8], angle=48, y=1.49448
000000.000: Difference greater than 0.001 [23532.5], angle=49.92, y=1.55314
000000.000: Difference greater than 0.001 [923.476], angle=51.84, y=1.61849
000000.000: Difference greater than 0.001 [21870.7], angle=53.76, y=1.69156
000000.000: Difference greater than 0.001 [43488.4], angle=55.68, y=1.77363
000000.000: Difference greater than 0.001 [62383.3], angle=57.6, y=1.86627
000000.000: Difference greater than 0.001 [76890.1], angle=59.52, y=1.97146
000000.000: Difference greater than 0.001 [85334.9], angle=61.44, y=2.09171
000000.000: Difference greater than 0.001 [86207], angle=63.36, y=2.23024
000000.000: Difference greater than 0.001 [78406.3], angle=65.28, y=2.39129
000000.000: Difference greater than 0.001 [61580.6], angle=67.2, y=2.58054
000000.000: Difference greater than 0.001 [36717.6], angle=69.12, y=2.79296
000000.000: Difference greater than 0.001 [5815.51], angle=71.04, y=3.06222
000000.000: Difference greater than 0.001 [26317.9], angle=72.96, y=3.39313
000000.000: Difference greater than 0.001 [52920.5], angle=74.88, y=3.80895
000000.000: Difference greater than 0.001 [65684.3], angle=76.8, y=4.34627
000000.000: Difference greater than 0.001 [57025.6], angle=78.72, y=5.06588
000000.000: Difference greater than 0.001 [24939.4], angle=80.64, y=6.08034
000000.000: Difference greater than 0.001 [19331.9], angle=82.56, y=7.60703
000000.000: Difference greater than 0.001 [45866.3], angle=84.48, y=10.1611
000000.000: Difference greater than 0.001 [21384.2], angle=86.4, y=15.2393
000000.000: Difference greater than 0.001 [25102.9], angle=88.32, y=29.47
000000.000: Difference greater than 0.001 [2456.08], angle=90.24, y=128.371
000000.000: Difference greater than 0.001 [3.19497], angle=92.16, y=14317.4
000000.000: D3D9Client: [Scene Initialized]
000000.000: Finished initialising panels
000003.149: Failed to read a surface tile [Enceladus\Surf\05\000000\000002.dds] from a harddrive
000004.616: Failed to read a surface tile [Enceladus\Surf\06\000002\000001.dds] from a harddrive
000004.624: Failed to read a surface tile [Enceladus\Surf\06\000000\000007.dds] from a harddrive
000004.688: Failed to read a surface tile [Enceladus\Surf\06\000002\000003.dds] from a harddrive

MD5 check was good on MinorBodies.zip download.
 
Top