jwijffels / RMETAR

A METAR decoder for R users, connecting to mdsplib (METAR Decoder Software Package Library - http://mdsplib.sourceforge.net/)
4 stars 4 forks source link

RMETAR crashes while processing METAR in loops #1

Closed GreenhouseCH closed 4 years ago

GreenhouseCH commented 6 years ago

RMETAR is a great tool for decoding METARs in R. Unfortunately, it seems that the DLL is generating some problems if you want to massively decode a list of METARs in a loop. I couldn't find a workaround for it. Here is a reproducible example. There is a tendency that RStudio crashes earlier than the R binary itself - with earlier I mean: with shorter loops.

Is there any fix for that?

I already tried to introduce Sys.sleep() prompts without success.

The problem happens both in i386 and x64 R interfaces, on all Windows 10 systems I used up to now.

Kind regards

Bertrán minimal.example.R.zip

jwijffels commented 6 years ago

Hi Bertran, I can't reproduce this on my Linux machine.

GreenhouseCH commented 6 years ago

Hello

Thanks for your rapid reply. Next level: Does this script work with you? RMETAR_OGIMET.zip

jwijffels commented 6 years ago

Yes, it does on my machine.

GreenhouseCH commented 6 years ago

Allright, do you own a Windows machine? I think it has something to do with the dynamic library.

jwijffels commented 6 years ago

yes, but currently not sitting behind one.

GreenhouseCH commented 6 years ago

It would be great if you could test it there and report.

jwijffels commented 6 years ago

I can confirm the crash on Windows.

GreenhouseCH commented 6 years ago

Thanks for checking. Is there any way to fix this?

jwijffels commented 6 years ago

Yes, but it is on a long todo list

GreenhouseCH commented 6 years ago

Allright. Would be great.

jwijffels commented 6 years ago

I think the best to fix this is to rewrite this using Rcpp but this requires quite some work.

andrie commented 4 years ago

I think we can close this, since it will be addressed by #8

jwijffels commented 4 years ago

Yes DEV version which uses https://github.com/flightaware/mdsplib no longer crashes on large number of METAR reports.