[RESOLVED] Crash in PANELS.DLL when using an XML <Texture> element with "Mipmap VC Panels" disabled
Posted: Fri Mar 18, 2016 9:41 pm
XML <Texture> elements seem to cause P3D to crash (0xc0000005) if "Mipmap VC Panels" is UNchecked.
We've had this issue since P3D 2.0 all the way through the latest 3.2 release. Only today have we finally sat down and succeeded reproducing it on a stock P3D 3.2 install with a stock P3D 3.2 aircraft that's only lightly modified. (All this time, we assumed it was due to something exotic we were doing in our products, so we'd not reported it)
To reproduce, simply expand the contents of the cab file:
into the directory:
so you can easily edit the XML.
Edit the file:
such that you remove (or comment out) the <CustomDraw> element starting at line 5160, replacing it with the line:
In context, that looks like:
If you load the modified Mooney Acclaim with "Mipmap VC Panels" enabled, it'll load normally, and the inset map on the PFD will be solid gray, since it's referencing a texture that doesn't exist. This is as expected.
However, if you UNcheck "Mipmap VC Panels", then quit and reload P3D, and again select the Mooney Acclaim, you'll now get a crash during initial load, in panels.dll around offset 0x00082198. (NOTE: The bug occurs whether or not the referenced texture exists)
We've had this issue since P3D 2.0 all the way through the latest 3.2 release. Only today have we finally sat down and succeeded reproducing it on a stock P3D 3.2 install with a stock P3D 3.2 aircraft that's only lightly modified. (All this time, we assumed it was due to something exotic we were doing in our products, so we'd not reported it)
To reproduce, simply expand the contents of the cab file:
Code: Select all
<P3D>\gauges\Mooney_Acclaim.cab
into the directory:
Code: Select all
<P3D>\gauges\Mooney_Acclaim\
so you can easily edit the XML.
Edit the file:
Code: Select all
<P3D>\gauges\Mooney_Acclaim\g1000_pfd.xml
such that you remove (or comment out) the <CustomDraw> element starting at line 5160, replacing it with the line:
Code: Select all
<Texture id="TestTex" Name="VRSTP_FLIR_VIDEO_TEXTURE" Width="196" Height="166"/>
In context, that looks like:
Code: Select all
...
<Element id="fs9gps:map>
<FloatPosition>1.000,1.000</FloatPosition>
<Texture id="TestTex" Name="VRSTP_FLIR_VIDEO_TEXTURE" Width="196" Height="166"/>
</Element>
<Element id="Airplane icon">
...
If you load the modified Mooney Acclaim with "Mipmap VC Panels" enabled, it'll load normally, and the inset map on the PFD will be solid gray, since it's referencing a texture that doesn't exist. This is as expected.
However, if you UNcheck "Mipmap VC Panels", then quit and reload P3D, and again select the Mooney Acclaim, you'll now get a crash during initial load, in panels.dll around offset 0x00082198. (NOTE: The bug occurs whether or not the referenced texture exists)