This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Rob, Apparently, we need to leave some things open in order for the indexer to work properly. The trouble is that if some problem occurs, then someone needs to close but that message gets lost. I looked into putting some sort of fix into our current development branch (4.4.3), but raf touches and is touched in lots of places. The next development branch is 4.5, which actually already has quite a bit of rework on grib, collections, and file access. Most likely, the fix will be in that branch, which is a few months away. -Lansing On 2/27/2014 12:10 PM, Rob Weingruber wrote: > New Client Reply: EOFException: Reading file.grb2.ncx at 0 file length = 0 > > Lansing - > > What did you think of the following: > > > Thinking out loud.... > > In Grib1CollectionBuilder's >> protected boolean readIndex(RandomAccessFile raf) method, > > should you close the index file (raf) when you catch the IOException, or > EOFException or Throwable? > > The comment at the beginning of the readIndex method even says: > > gc.setIndexRaf(raf); // LOOK leaving the raf open in the GribCollection > > Definitely seems like a RAF leak to me, though I may not have the whole > picture in mind. Since the readIndex method catches any Throwables, and the > readOrCreateIndexFromSingleFile method does not check the return boolean from > readIndex, I can't imagine there's anywhere the RAF is closed. > > Thoughts? > > Thanks, > Rob > > On 02/25/2014 10:54 AM, Unidata netCDF Java Support wrote: >> Rob, >> >> Can you verify whether or not the .ncx file in the stack trace is actually >> of zero length? >> >> -Lansing >> >> Ticket Details >> =================== >> Ticket ID: NWR-841654 >> Department: Support netCDF Java >> Priority: Normal >> Status: Open > > > > Ticket Details > =================== > Ticket ID: NWR-841654 > Department: Support netCDF Java > Priority: Normal > Status: Open > Link: > https://www.unidata.ucar.edu/esupport/staff/index.php?_m=tickets&_a=viewticket&ticketid=23410 Ticket Details =================== Ticket ID: NWR-841654 Department: Support netCDF Java Priority: Normal Status: Open