Jose Almeida

SMP still crashes with metar parsing

22 posts in this topic

Mine just crashed a few minutes ago - X-Plane 10, SMP 4.0.1, RWC 1.1, X-Plane built-in weather. I wasn't looking in the sim, but when I was few minutes back everything was OK.

Peter

 

Log.txt

METAR.rwx

0

Share this post


Link to post
Share on other sites

It seems there was one hour of METAR data from NOAA that contained some sort of invalid data. It seems to have cleared up on its own, so if you fly again things should be OK now.

I'm looking into why that hour's data caused a crash.

 

0

Share this post


Link to post
Share on other sites

To follow up, the culprit was whoever's reporting the weather at MMMT (in Veracruz, Mexico):

MMMT 011510Z 00000KT 5SM VCFG FEW020 22/19 A2986 RMK 8/100 FG LYR SFC

The code we use from NOAA to parse METAR data can't handle the case of SFC being the last thing in the METAR report. It doesn't make sense; SFC should be followed by VIS and a visibility distance (SFC VIS indicates surface visibility)

I've coded up a fix so RWC will just ignore this case instead of crashing for our next release, in case it happens again.

 

0

Share this post


Link to post
Share on other sites

Confirmed! Its working again now. Before it crashed (XP10), when I arrived around 6NM at VHHH.

 

0

Share this post


Link to post
Share on other sites

Frank,

Instead of coding for every possible metar inconsistency couldn't just code something like "I can't figure this out, let's ignore these guys" :rolleyes:

0

Share this post


Link to post
Share on other sites

Thank you Frank for quickly looking into it. I was enjoying my first flight with new version (SMP V4) and someone in Mexico has forced me to enjoy it again :-).

1

Share this post


Link to post
Share on other sites
2 hours ago, Jose Almeida said:

Frank,

Instead of coding for every possible metar inconsistency couldn't just code something like "I can't figure this out, let's ignore these guys" :rolleyes:

Afraid it doesn't work that way! Fundamentally they are bugs in NOAA's METAR parsing library that I'm fixing.

0

Share this post


Link to post
Share on other sites

I understand that, Frank, but anything is better than a crash; wouldn't it be possible to have a global "On Error DO" that somehow avoided the crash, even if it meant switching to default clouds?

Edited by Jose Almeida
0

Share this post


Link to post
Share on other sites
I understand that, Frank, but anything is better than a crash; wouldn't it be possible to have a global "On Error DO" that somehow avoided the crash, even if it meant switching to default clouds?

No. Frank was quite clear as to why but I think your limited knowledge of programming is not allowing you to understand why his explanation actually makes sense as to why your request cannot be done.

0

Share this post


Link to post
Share on other sites

Some languages do have the concept of exceptions that the application can "catch," but this METAR code is written in C where that's not an option.

 

0

Share this post


Link to post
Share on other sites

...and we're inside X-Plane sharing what little options there are with everything else.

0

Share this post


Link to post
Share on other sites
1 hour ago, sundog said:

Some languages do have the concept of exceptions that the application can "catch," but this METAR code is written in C where that's not an option.

 

In my mother tongue there's a saying that can be losely translated by "Trying to teach Our Father to the priest"; I guess that's what I was trying to do. I've done a little programming, never in C and mostly in interpreted languages.

0

Share this post


Link to post
Share on other sites

Hi Frank,

It's very frustrating but from time to time I keep having those crashes with metar parsing; I get so mad at times that I just want to ditch SMP. I never do, thoguh.

José

Log.txt

METAR.rwx

Edited by Jose Almeida
Included attachments
0

Share this post


Link to post
Share on other sites

The METAR.rwx file you provided doesn't look like a standard one. Are you using some third-party weather addon? I couldn't find an indication of one in your log, but that METAR came from someplace. If you're using NOAA, perhaps it's not the latest version or it's not installed properly.

However, I was able to load that METAR.rwx in SMP/RWC just fine, so the problem's not the METAR file itself (assuming you're using SMP 4.0.1).

As far as I know, you're the only person experiencing this sort of thing. Re-installing X-Plane from a clean installation might be a good idea, to rule out some unique quirk of how your many add-ons are installed.

 

 

0

Share this post


Link to post
Share on other sites

Frank,

Are you proposing that I make a clean install, without add-ons and fly for 1 or 2 months to check if it happens again? After that what? 2 more m,onths for each individual add-on?

José

0

Share this post


Link to post
Share on other sites

Even a clean install with clean installations of the add-ons you care about the most would be worth trying. It may just be some out of date software or something improperly installed.

0

Share this post


Link to post
Share on other sites

Frank,

I don't think I should post anymore on this subject; we are getting nowhere and I'm not sure I will always be able to control my words. I respect you very much and I would hate it to get to that point.

Best regards,

José

0

Share this post


Link to post
Share on other sites

Frank,

It was going to be the last post but then I decided to perform anothe experiment and I want to tell you about it.

I analyzed the NOAA plugin scripts and found the lines that update the METAR.rwx file, so I disabled those lines. Apparently the plugin does not use them and seems to run fine, as a result I hav no METAR.rwx, only MAXMETAR.rwx.

So far so good,

José

 

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.