CIGI Crash when using P3D as IG

Any issues, problems or troubleshooting topics related to the additional features present in the Prepar3D Professional Plus client application.
User avatar
OPS_Support
Posts: 4
Joined: Tue Jun 26, 2018 12:15 am

CIGI Crash when using P3D as IG

Postby OPS_Support » Fri Oct 12, 2018 5:48 am

Hello,

I am attempting to use P3D as an IG with external flight model environment. My initial test was to connect P3D to a CIGI Host. I am using the CIGI Host Emulator 3 software that is provided by CIGI as a test module. After I press "Start IG" in the P3D Menu I can see CIGI packets being sent to/from the host machine for a few seconds then P3D hangs and crashes to desktop.

Am I missing something in the setup that is causing P3D to crash when used as an IG? Do I need to add a specify TypeID into the DISEntityTypes.xml for the aircraft that I intend on flying in P3D?

The end goal is to have the HOST machine fly around the P3D aircraft and for me to be able to use the navigation equipment inside of the P3D aircraft (since my flight model software doesn't have a navaid database). Is this possible?

Thanks,

Lukas

User avatar
Brady Butler
Lockheed Martin
Posts: 710
Joined: Tue May 09, 2017 5:31 pm

Re: CIGI Crash when using P3D as IG

Postby Brady Butler » Fri Oct 12, 2018 11:39 am

Hello Lukas,

Did you review the CIGI page in the Learning Center? https://www.prepar3d.com/SDKv4/prepar3d ... rview.html

Do you know which packets are being sent before the crash happens (and possibly the data inside them)?

Are there any Prepar3D add-ons installed such as aircraft models, etc?

Regards,
Brady
Brady Butler
Prepar3D® Software Engineer

mchriest
Posts: 24
Joined: Tue Feb 21, 2012 4:17 pm

Re: CIGI Crash when using P3D as IG

Postby mchriest » Wed Oct 17, 2018 9:49 pm

I've been working with Lukas, and have independently attempted to configure p3d as a cigi IG. I've started with the CIGIMinitHost, provided as an example with the cigi class library, and am getting a similar result.
After clicking StartIG, my host receives exactly one SOF message from P3D before P3D becomes unresponsive. At that point, any click on the P3D window crashes the program. The SOF message includes a non-zero timestamp, and timestamp is valid = 1, but indicates 0 values for Frame counter and LastRecvdFrameCount.

I'm on a clean (brand new) machine, brand new install of p3d pro plus 4.3. No plug-ins.

Any chance someone can provide a sample for a minimal host (just need entity position/type), that won't crash p3d?

Clifton Crane
Lockheed Martin
Posts: 895
Joined: Tue Sep 25, 2012 2:34 pm

Re: CIGI Crash when using P3D as IG

Postby Clifton Crane » Thu Oct 18, 2018 4:40 pm

Hello,

Which CIGI version are you targeting? Is this correctly set in the CigiConfig.cfg file? Does the IG SOF message ever report in the Ready state or is it always in Standby? Also, can you try testing in both Synchronous and Asynchronous mode.

Thanks.
Clifton Crane
Prepar3D® Software Engineer

mchriest
Posts: 24
Joined: Tue Feb 21, 2012 4:17 pm

Re: CIGI Crash when using P3D as IG

Postby mchriest » Thu Oct 18, 2018 5:49 pm

Hi Clifton. Thanks for the reply. FYI, P3D is no longer crashing, although I don't know why, and don't like that.
I can tell you that this morning I put a breakpoint at the top of my host code, running in debugger, and stepped through the main loop. Got an SOF packet, as expected. sent data and back to beginning of loop. Expected crash, but got a new SOF with updated frame count. After that, P3D no longer crashes when starting IG in P3D.
So mystery progress, but I'll take it. Now I'm getting reliable SOF packets with updated time, frame count, etc. but the P3D scene never changes, other than the ownship "disappearing" when IG mode is started.

I am targeting cigi 4.0, and it this is set correctly in the CigiConfig file.
I have tried both synchronous and asynch. Same result.
SOF IGMode is coming across as 1 (operate). No reset or standby.

I am currently sending entity control, entity control position, IGControl and ViewDef packets. Please advise if P3D requires any other packets.

I have an idea what the problem is, but haven't yet finished breaking out for testing.
As I mentioned, I'm using the host example that comes with the Cigi class library, and I see that this code is packing the IGControl and EntityControlPosition packets into the same message, although the cigi 4.0 icd states only 1 packet per message. I'm assuming the class library, if implemented on the IG side, would separate these packets out.
I'll break them up manually and see what I get.

If you have any other insights, please let me know.

thanks,

Mike.

Clifton Crane
Lockheed Martin
Posts: 895
Joined: Tue Sep 25, 2012 2:34 pm

Re: CIGI Crash when using P3D as IG

Postby Clifton Crane » Thu Oct 18, 2018 6:02 pm

Mike,

In the CigiConfig.cfg file there is a ViewID setting, you will want this to match the ViewID of your ViewDef packet. You should then see the Prepar3D main window view respect the entity location and the view definition offsets.
Clifton Crane
Prepar3D® Software Engineer

mchriest
Posts: 24
Joined: Tue Feb 21, 2012 4:17 pm

Re: CIGI Crash when using P3D as IG

Postby mchriest » Thu Oct 18, 2018 6:07 pm

Yes, thanks. ViewID = 0 on both sides. I'll see what happens when I've broken the packets into separate packets.

mchriest
Posts: 24
Joined: Tue Feb 21, 2012 4:17 pm

Re: CIGI Crash when using P3D as IG

Postby mchriest » Tue Oct 30, 2018 1:30 pm

Last week I resolved the issue of the scene not changing. The View Control packet was required, in addition to the View Def packet.
My above comment regarding 1 packet per message is incorrect. The packets should be packed together in a single message. the cigi icd contradicts itself later, making this clear. Hope this helps someone.

My view is now updating, but I am still having no success in rendering my ownship object. I've opened that topic in another thread.


Return to “Prepar3D Professional Plus Client Application Questions”

Who is online

Users browsing this forum: No registered users and 14 guests