Matlab function gui_mainfcn.m crashes on feval

5 views (last 30 days)
Kurt
Kurt on 15 Mar 2024
Commented: Kurt on 28 Mar 2024 at 13:30
I am trying to work with the GRIB1 file reader found at this address:
This is very old Matlab code (2016), with lots of low-level function calls. When I get to line 95 of the gui_mainfcn.m function (written by Matlab), the whole Matlab tool crashes. I sent a copy of the crash log to MathWorks. The log says, "Access violation detected".
The offending code in gui_mainfcn.m is here:
varargin{1} = gui_State.gui_Callback;
if nargout
[varargout{1:nargout}] = feval(varargin{:});
else
feval(varargin{:}); % crashes here (line 95)
end
The crash occurs when I try to open a file from the GRIB1 GUI. When I use the pulldown menu for the GFS TEST FILE RAIN folder, Matlab freezes up and crashes.
At line 91, varargin{1} = 'popupmenu13_Callback'.
nargout = 0
When I try to evaluate line 95, even from the command line, Matlab dies.
Is there something funny going on in the popupmenu13_Callback?
Is there a newer version of this GRIB1 reader? All I'm interested in is parsing the data in the GRIB files. I don't need to display them, although that would be nice.

Accepted Answer

Ayush
Ayush on 28 Mar 2024 at 5:51
Hello Kurt,
The crash that you have mentioned is a common occurrence as per the discussion section of the linked file exchange i.e. “Efficient GRIB1 data reader”. Since this is also an older file exchange which has not been updated since 2016, I would recommend certain newer alternatives that can cater to your particular use case of parsing the data in GRIB files. Here are two file exchanges that would let you do the same:
Hope this helps!
  1 Comment
Kurt
Kurt on 28 Mar 2024 at 13:30
Thanks. Shortly after I posted here, I found that Matlab R2023b supports GRIB2 data processing very nicely. No need for WGRIB2 or NOMADS or any of that stuff.
There's also this example:
Kurt

Sign in to comment.

More Answers (0)

Products


Release

R2023a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!