This should be fixed in r4824.
I tried it with your file HuddardPark.tpo.  I was able to reproduce the issue with r4823 (TPO: malformed input file - attempt to read past end), and it is resolved in r4824.

On 4/28/2014 1:06 PM, SRE wrote:
At 09:47 AM 4/22/2014, Robert Lipe wrote:
Bizarre. Â  This was actually tsteven4's discovery.
We have two different formats that show this problem now, but only on Windows.
I'm obviously taking long chunks of time off looking at this... but found a window this morning.

Whether I'm opening a .tpo or .tpo.gz file, the print statement below (in gbfopen, gpfile.cc)
produces identical results! The file->memapi value is *always* zero, file->gzapi is *always*
1, and gzip input is always used no matter what the filename. Odd comment about forcing gzip
on output, eh? And why is gzapi always true??

I'm thrashing around a bit, but does that move the ball far enough that someone can see
the obvious problem?

The program aborts at line 218 of tpo.cc, in the first iteration of a while loop,
probably because a seek messed up:
        if (gbfread(&byte, 1, 1, tpo_file_in) < 1) {
              fatal(MYNAME ": malformed input file - attempt to read past end");
        }
BTW, gbfread calls gzapi_read for both types of input.

Steve


----------------------------------------------------------
gpfile.cc - printf added go gbfopen for debugging
        GBFOPEN: file=S:/temp/HuddartPark.tpo, module=TPO, mode=rb, memapi=0, gzapi=1
        GBFOPEN: file=S:/temp/HuddartPark.tpo.gz, module=TPO, mode=rb, memapi=0, gzapi=1
----------------------------------------------------------
  for (m = mode; *m; m++) {
    switch (tolower(*m)) {
    case 'r':
      file->mode = 'r';
#if !ZLIB_INHIBITED
      file->gzapi = 1;  /* native or transparent */
#endif
      break;
    case 'w':
      file->mode = 'w';
      break;
    }
  }
  printf("GBFOPEN: file=%s, module=%s, mode=%s, memapi=%d\n",filename,module,mode,file->memapi );
  if (file->memapi) {
    file->gzapi = 0;
    file->name = xstrdup("(Memory stream)");

    file->fileclearerr = memapi_clearerr;
    file->fileclose = memapi_close;
    file->fileeof = memapi_eof;
    file->fileerror = memapi_error;
    file->fileflush = memapi_flush;
    file->fileopen = memapi_open;
    file->fileread = memapi_read;
    file->fileseek = memapi_seek;
    file->filetell = memapi_tell;
    file->fileungetc = memapi_ungetc;
    file->filewrite = memapi_write;
  } else {
    file->name = xstrdup(filename);
    file->is_pipe = (strcmp(filename, "-") == 0);

    /* Do we have a '.gz' extension in the filename ? */
    len = strlen(file->name);
    if ((len > 3) && (case_ignore_strcmp(&file->name[len-3], ".gz") == 0)) {
#if !ZLIB_INHIBITED
      /* force gzipped files on output */
      file->gzapi = 1;
#else
      fatal(NO_ZLIB);
#endif
    }



------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get 
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Gpsbabel-code mailing list  http://www.gpsbabel.org
Gpsbabel-code@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gpsbabel-code