Traffic automatically remove on weapon fire in P3D PP

Discuss on the SimConnect SDK can be used by programmers to write add-on components for Prepar3D
Locked
zamirk
Posts: 132
Joined: Mon Jul 21, 2014 8:39 am

Traffic automatically remove on weapon fire in P3D PP

Post by zamirk »

when I fire weapon in P3D Professional Plus, Client app automatically removes all the traffic generated by Simconnect. This is badly affecting my students' training scenario. Is there any limit for traffic, if so, then will it be resolved by increasing traffic in settings. Kindly, guide me anybody from LM ASAP.

Best regards,
Zamirk
Clifton Crane
Lockheed Martin
Posts: 1207
Joined: Tue Sep 25, 2012 2:34 pm

Re: Traffic automatically remove on weapon fire in P3D PP

Post by Clifton Crane »

Zamirk,

Are the students in a multiplayer session? I don't believe increasing traffic settings has an effect on AI created via a SimConnect application.
Clifton Crane
Prepar3D® Software Engineer Sr.
zamirk
Posts: 132
Joined: Mon Jul 21, 2014 8:39 am

Re: Traffic automatically remove on weapon fire in P3D PP

Post by zamirk »

Hi Clifton,

No, students are not in multiplayer session, we just created some AINonATCSimObjects through Simconnect. When we increase number of aircrafts upto 50, sometimes on weapon launch P3D deletes all aircrafts in client application and suddenly target selection goes to zero. By right clicking, we found that in aircrafts list,there is no object. Can you please guide us why this is happening and how can I check in P3D that if entity exists or not? So that I can re create it in p3d via simconnect.

Thanks for your precious time.

Best regards,
Zamirk
zamirk
Posts: 132
Joined: Mon Jul 21, 2014 8:39 am

Re: Traffic automatically remove on weapon fire in P3D PP

Post by zamirk »

We are calling dispatchProc in separate thread and when one fires missile from aircraft, SIMCONNECT HANDLE lost its value and becomes garbage. Can you help to eradicate this problem.
Clifton Crane
Lockheed Martin
Posts: 1207
Joined: Tue Sep 25, 2012 2:34 pm

Re: Traffic automatically remove on weapon fire in P3D PP

Post by Clifton Crane »

Hi Zamirk,

Do you have the SimConnect console open when running your application? The console may provide information/exceptions being thrown by SimConnect calls. You can enable the SimConnect console by adding the following SimConnect.ini file to your Documents\Prepar3D v3 directory:

Code: Select all

[SimConnect]
level=verbose
console=1
;RedirectStdOutToConsole=1
;OutputDebugString=1
;file=c:\simconnect%03u.log
;file_next_index=0
;file_max_index=9
Clifton Crane
Prepar3D® Software Engineer Sr.
zamirk
Posts: 132
Joined: Mon Jul 21, 2014 8:39 am

Re: Traffic automatically remove on weapon fire in P3D PP

Post by zamirk »

Thanks for your guidance. I have found three exception codes, 1, 3 & 9.
zamirk
Posts: 132
Joined: Mon Jul 21, 2014 8:39 am

Re: Traffic automatically remove on weapon fire in P3D PP

Post by zamirk »

Hi Clifton,

I had resolved some issues by the help of these exception codes, but still the main problem exists. And there is nothing in the console for this problem. Kindly, guide me to solve this. It is messing our training scenario.

Best Regards,
Zamirk
Clifton Crane
Lockheed Martin
Posts: 1207
Joined: Tue Sep 25, 2012 2:34 pm

Re: Traffic automatically remove on weapon fire in P3D PP

Post by Clifton Crane »

Zamirk,

Are you still having issues losing the SimConnect handle on the other thread? When SimConnect clients close, any object created by that client is removed. Could this be what you are seeing?

Testing with the SimConnect SDK AITraffic sample I did not see this behavior.
Clifton Crane
Prepar3D® Software Engineer Sr.
zamirk
Posts: 132
Joined: Mon Jul 21, 2014 8:39 am

Re: Traffic automatically remove on weapon fire in P3D PP

Post by zamirk »

No, Simconnect handle is not closing on weapon fire. Let me check it with AITraffic sample.

Thanks.
zamirk
Posts: 132
Joined: Mon Jul 21, 2014 8:39 am

Re: Traffic automatically remove on weapon fire in P3D PP

Post by zamirk »

Hi Clifton,

Thanks for your guidance. I was wrong and you were right as SimConnect handle was losing. That is why traffic is being removed. I couldn't find the exact reason at this time. Will let you know with further progress.

Best Regards,
Zamirk
Locked