IWeatherSystemV430->GetInterpolatedMetarData weather.dll exceptions

BenBaron
Posts: 80
Joined: Fri Jan 16, 2015 7:51 am

IWeatherSystemV430->GetInterpolatedMetarData weather.dll exceptions

Postby BenBaron » Wed Dec 19, 2018 6:40 pm

Hi guys,

I am regularly polling for the metar string for a given location using the IWeatherSystemV430->GetInterpolatedMetarData() method. Currently this is every 10s, but I also experimented with other values.

While this works initially, it seems to cause some spurious exceptions of unknown kind being thrown inside the weather.dll down the line which are, of course, crashing P3D and which I am not able to catch. It "seems" to have something to do with the frequency of this call, but I am not entirely sure.

As I am only interested in some weather parameters at specific coordinates I don't care about which station (ICAO) it is coming from, so this seemed to be the most suitable method for my needs.

Any advice for me, or any information what might be causing this?

All the best,

Benny

User avatar
Rob McCarthy
Lockheed Martin
Posts: 2783
Joined: Wed Aug 24, 2011 1:37 pm

Re: IWeatherSystemV430->GetInterpolatedMetarData weather.dll exceptions

Postby Rob McCarthy » Thu Dec 20, 2018 1:40 pm

Hi Benny,

What are your current weather settings? Are there different settings per ICAO or did you set them globally? Also you can query for global weather using the "GLOB" identifier. Does this give any errors?

Regards,
Rob McCarthy
Rob McCarthy
Prepar3D® Core Lead

BenBaron
Posts: 80
Joined: Fri Jan 16, 2015 7:51 am

Re: IWeatherSystemV430->GetInterpolatedMetarData weather.dll exceptions

Postby BenBaron » Thu Dec 20, 2018 3:32 pm

Thanks Rob,

I am just using WeatherThemes "Clear Skies" and "Gray and Rainy" for testing. I guess they are setting global weather? Will test the "GLOB" identifier and see what happens.

Right now, it is running for over an hour polling every 10s without a crash occuring, so this is quite strange.

I was mainly interested to know if there was a known scenario that could somehow "overload" P3D by for example querying for weather information too often.

Greets, Benny

BenBaron
Posts: 80
Joined: Fri Jan 16, 2015 7:51 am

Re: IWeatherSystemV430->GetInterpolatedMetarData weather.dll exceptions

Postby BenBaron » Tue Jan 08, 2019 6:11 pm

Hi guys,

I did some further tests with my project regarding this issue. The interesting thing is that I can also trigger spurious exceptions within the weather.dll with the call to GetWeatherInformation() on an IBaseObjectV400 if am allowing the process to run long enough.

For testing purposes and to exclude the possibility of other flaws in my main project I now built a dedicated PDK test app, which is only polling for weather in an extra thread using the IWeatherSystemV430->GetInterpolatedMetarData() call. This is every second. And also there the spurious exceptions are thrown. Running Application Verifier I am seeing two possible scenarios, each pointing to a potential heap corruption issue within the weather.dll.

Scenario 1:

The stack trace shows

weather.dll!000007fed53790b8()
weather.dll!000007fed53908ff()

with weather.dll!000007fed53790b8() being the exception location. Application Verifier translates those two functions into

weather!METARFromObsv+858 ( @ 0)
weather!Weather_SetPrecipConditionsAtLla+109f ( @ 0).

Scenario 2:

The stack trace shows

weather.dll!000007fed65ade3a()
weather.dll!000007fed65ae8e3()
weather.dll!000007fed65aebf2()
weather.dll!000007fed65af753()

with weather.dll!000007fed65ade3a() being the exception location. Application Verifier translates only the exception function 000007fed65ade3a() into

weather!Weather_SetFullReload+1e0a ( @ 0).

I'm gonna try continue testing on a vanilla P3D4.4, but to me this kind of error is completely new territory, so I don't know exactly what would be the best way to proceed with this. So any help and input are highly appreciated.

I am also not sure if this is a problem on my side or if there might be a genuine issue within the weather.dll, although based on my observations up to now, I am leaning towards this option.

Thanks in advance,

Greets, Benny


Return to “Software Development Kit (SDK) Questions”

Who is online

Users browsing this forum: Majestic-12 [Bot] and 11 guests