Exit issue using a SimConnectSDK Addon

D-BOX
Posts: 7
Joined: Mon Apr 11, 2011 5:15 pm

Postby D-BOX » Tue May 03, 2011 3:09 pm

Hi,



I'm migrating a SimConnect Addon (exe application that uses the SimConnectSDK to get physics information from the Simulator) from ESP to P3D. Everything is working properly on P3D except when quitting the Simulator following these steps : Hit Esc (keyboard key) and then select Exit from the menu. Then P3D exits properly but not the Addon application, in fact it doesn't quit at all and it continues running forever like if P3D is still running! To make sure that this isn't a bug related to my program, I did a test with the "ClientEvent" sample provided with the SDK, and I got the same behavior, the ClientEvent.exe Addon never shuts down when quitting P3D by hitting ESC and then selecting Exit.

When I quit P3D using the Exit option from the menu Flights the Addon shuts down properly.

Is this a known issue? Is there any work around for it?



Thanks

FSMP
Posts: 678
Joined: Sat Sep 25, 2010 9:38 am

Postby FSMP » Tue May 03, 2011 4:58 pm

I think what you are seeing can always has the potential to happen. For example If P3D was to crash or hang, then your application could potentially continue to run, unless you took additional steps within your application.



The "work around" I have used in the past, with "exe addons", is to have the addon check to see if the P3D process is running.



(1) If the addon exe is started manually, (ie not started by P3d's exe.xml), then you can have your application check to see if the P3D process is running, and take the appropraite action based on what it determines.



(2) Have your addon periodically check that the P3D process is running, and if it finds that it was running, and has now stopped, do whatever is appropriate, which might include shutting down your addon exe in an organized manner.





Just reviewed one of my "addon exe" projects.. Another thing i do when my "addon exe" starts, is to check to see if another instance of my "addon exe" is already running, and take the necessary action. You proably do not multiple instances running. ?



Geoff


D-BOX
Posts: 7
Joined: Mon Apr 11, 2011 5:15 pm

Postby D-BOX » Tue May 03, 2011 5:18 pm

Thanks for the response FSMP. I've already thought about creating some kind of a "WatchDog" to constantly check for P3D status.But since P3D is behaving differently depending on the manner you exit it, I then thought that this is potentially a bug, so I'm reporting it here. Eventually as a last resort I thing the WatchDog idea is a potential work around that I will be considering.

FSMP
Posts: 678
Joined: Sat Sep 25, 2010 9:38 am

Postby FSMP » Tue May 03, 2011 8:47 pm

Just a thought .. does it act the same in P3D Ver 1.0 as it does in Ver 1.1.

I assume you are now using version 1.1



Not to speak out of turn, but I am hoping that the menu system in Ver 1.1 is "a work in progress".

A lot would seem you have changed in the implimentation of the menu system , starting in version 1.1



In any case, I believe I have seen many instances in past version.. ESP, FSX, where simconnect exe's can continue to run after the Flight Sim program has terminated. From memory, that is why I put the watchdog in my applications.



There appears to be some inconsitencies in the menu system, so I would not be surprised there is also an inconsistency in the way P3D in the shutting down of Simconnect EXE's, depending on the method of closing P3d, via differing Menu selections.



Geoff


D-BOX
Posts: 7
Joined: Mon Apr 11, 2011 5:15 pm

Postby D-BOX » Wed May 04, 2011 10:16 am

Yes I'm using v1.1 and I'm having the same issue with both 1.1 and 1.0.

I`m using this same application with ESP and it's working properly and I don't have this kind of problem.

I think I'm going to implement a watchdog in my application to make it shut down whatever method is used to close P3D (even by killing the process).

beatle
Posts: 88
Joined: Thu Sep 16, 2010 8:34 pm

Postby beatle » Fri May 06, 2011 9:28 am

Hi D-Box,



Just want to check a couple of things before I look into this:



Are you loading your external EXE via the EXE.XML file?

Are you expecting the Sim to shutdown your program for you when the Sim exits?

Are you handling the SimConnect RECV_ID_QUIT message to exit the app?



Just trying to figure out the exact expected behavior so I can look into this issue.



Tim

D-BOX
Posts: 7
Joined: Mon Apr 11, 2011 5:15 pm

Postby D-BOX » Tue May 10, 2011 11:04 am

Hi beatle,



1) Yes my application (EXE) is loaded via the exe.xml file: I edited the exe.xml file so my EXE application will load automatically when Prepar3D is started.

2) Yes, in fact this is the normal behavior of a SimConnect application when used with ESP. So I don't see why it would be different with P3D

3) Actually I don't receive this event when exiting P3D as described above (Hit Esc (keyboard key) and then select Exit from the menu).



Thanks

beatle
Posts: 88
Joined: Thu Sep 16, 2010 8:34 pm

Postby beatle » Tue May 10, 2011 2:42 pm

Hey D-Box,



Thanks for the reply. Never used the EXE.XML file myself before, so wasn't sure what the expected behavior was supposed to be. I'll look into it.



Tim

D-BOX
Posts: 7
Joined: Mon Apr 11, 2011 5:15 pm

Postby D-BOX » Mon May 16, 2011 1:56 pm

Is there any Prepar3D developer who can give us some information about this issue please?



Thanks,

Ala Eddine Limame

Software Designer

D-BOX Technologies Inc.

User avatar
Beau Hollis
Lockheed Martin
Posts: 2167
Joined: Wed Oct 06, 2010 3:25 pm

Postby Beau Hollis » Mon May 16, 2011 3:05 pm

D-Box



Tim (beatle) is a Prepar3D developer, and it looks like he's already looking into this.



Beau
Beau Hollis
Prepar3D Software Architect

D-BOX
Posts: 7
Joined: Mon Apr 11, 2011 5:15 pm

Postby D-BOX » Mon May 16, 2011 5:01 pm

Oops, I thought he is just a member on the forum and was curious about this issue.

Let me know if you guys need any further information.



Thanks,

Ala Eddine

D-BOX
Posts: 7
Joined: Mon Apr 11, 2011 5:15 pm

Postby D-BOX » Mon May 30, 2011 3:52 pm

Hi guys,



Do you have any news about this issue?



Thanks,

Ala Eddine

Software Designer

D-BOX Technologies Inc.

Legacy Support
Posts: 474
Joined: Mon Aug 16, 2010 7:22 pm

Postby Legacy Support » Wed Jun 01, 2011 8:49 am

Hi Ala,



Sorry about the comms blackout, some of us have had a few small issues here with email, so hopefully getting back on track this week. I know that the team is swamped at the moment, but they do have this in the queue.



Regards,

John


Return to “SimConnect Interface Questions”

Who is online

Users browsing this forum: No registered users and 11 guests