Jump to content

Custom Metar File Crashes


snagar
 Share

Recommended Posts

Hi,

This is more a request for debug the root cause, since I do not have the source for SkyMaxx.

Background: I wrote a simple perl script that builds XP Metar like file from external site (it does not download anything, it contracts the information from the browser output).

When I inject the file during X-Plane flight, it did not crashed.

How to reproduce

  1. Place the attached file into X-Plane install folder.
  2. Start X-Plane.
  3. On Quick Flight Setup window, check the "Use Real Weather...."
  4. Continue with load.

If I'm correct, at the end of the load, just before you switch to cockpit view, x-plane should crash.

The Log.txt will show:
 

Quote

 

SkyMaxx Pro: METAR parser enabled
SMPMetarBridge: METAR activation fired.
G64: 177.033: Livery Details:
G64: 177.033:   Folder: (Aircraft/General Aviation/Cessna 172SP/liveries/skyhawk waves/)
G64: 177.033:     Name: (skyhawk waves)
SkyMaxx Pro: Activating METAR parsing.
SkyMaxx Pro: Found new METAR.rwx file
SkyMaxx Pro: Parsing METAR data
--=={This application has crashed because of the plugin: SkyMaxx Pro}==--


 

 

To fix this I need to remove the last metar definition or the one before it.

Now, I know my custom metar is not the best since there are duplication, but what puzzled me, duplication doesn't matter in other rows of the metar file, so why this definition is problematic.

I attached the METAR file with the issue, the Full Metar file I constracted and the Log.txt, just in case.

Hope someone will have better insight.

 

Thanks

 

 

METAR.rwx

Log.zip

FULL_METAR_FILE.zip

Link to comment
Share on other sites

The first thing that catches my eye is that your time format in the file isn't what we expect. Compare one of your lines:

201607070836 METAR

To a line in a standard X-Plane METAR.rwx:

2016/07/31 20:35

SMP does assume a y/m/d h:m format, so that alone could be causing the problem.

 

Link to comment
Share on other sites

I agree that the time format is not the same as in XP, but it does not crash X-Plane only when I remove the specific row.

The Metar that I load display correct "weather radar" so I guess it is OK by x-plane.

I'll try to format the date better.

 

By the way, I modified my script yesterday and eliminate duplication of Metar station readouts. X-Plane did not crash either. So I guess it has to do with duplication and timing, but in the original there are many duplication and still XP display weather correctly.

I'm not trying to be petty, this crash really interest me, since by understanding it I can fix my code to be future proof, and maybe it will allow you to better handle such custom metar. Again, I received my metar information from the web.

 

Link to comment
Share on other sites

Done a short update to the crashing file. I "fixed" the dates, they should look something like:

Quote

2016/07/07 08:54
KGHW 070854Z AUTO 08008KT 10SM CLR 18/17 A2970 RMK AO2 P0002=

Unfortunately, same error, which might lead to the way the data is being constructed in the plugin.

 

 

Link to comment
Share on other sites

I'll modify my script to remove the "=" I already formatted the date to be XP compliant.

.[update] Ok, I have done a quick modification to the script and it is formatting the dates and removing the "+" at the end of each line.

 

So far so good.

The only thing I can't explain is: If I inject the file after I open X-Plane, the crash does not occur even for the original file.

But maybe I ask for too much. I'll continue monitor the behavior of the plugin with custom METAR files and notify you if anything resembles occurs.

 

Cheers

Saar

Edited by snagar
Link to comment
Share on other sites

4 hours ago, snagar said:

I'll modify my script to remove the "=" I already formatted the date to be XP compliant.

.[update] Ok, I have done a quick modification to the script and it is formatting the dates and removing the "+" at the end of each line.

 

So far so good.

The only thing I can't explain is: If I inject the file after I open X-Plane, the crash does not occur even for the original file.

But maybe I ask for too much. I'll continue monitor the behavior of the plugin with custom METAR files and notify you if anything resembles occurs.

 

Cheers

Saar

RWC only reads the metar information at startup for the entire world, and saves it. It checks for updated files periodically but not right away.

Link to comment
Share on other sites

That command only affects X-Plane's built-in weather system. RWC checks for new METAR files once a minute and reloads them if their modification time and file size have changed, or you can force it to reload by toggling its settings between always and automatic for example.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...