#41 Fail to parse tcx files with laps without altitude

closed-fixed
nobody
5
2012-08-02
2012-07-29
No

Fails on TCX files straight from Garmin Forerunner 410 (using garmin-ant-downloader)
I then opened the file in emacs, formatted the XML, and removed the first lap, saved, opened the file from SportsTracker and everything worked perfectly.
The first lap was useless anyway because it was before I got on the water (rowing).

I then did the opposite, left in only the first lap to get a minimal file that demonstrates the error.

The code involved seems to be a NullPointerException in GarminTcxParser.groovy:

for (evLap in exercise.lapList) {
exercise.altitude.ascent += evLap.altitude.ascent
}

The file bug11.tgx fails. tile bug11ok.tcx and one altituteMeters item added.

Discussion

  • file without altitude in last lap.

     
    Attachments
  • Working file with altitude value in each lap.

     
    Attachments
  • I could not reopen ticket 3548033 so I am making a new.

     
  • I used SportsTracker-5.5.0
    I also build a Sportstracker from source (Mercurial) That also did not work.
    This platform is Debian Unstable, 64 bit.

    $ java -version
    java version "1.7.0_03"
    OpenJDK Runtime Environment (IcedTea7 2.1.1) (7~u3-2.1.1-3)
    OpenJDK 64-Bit Server VM (build 22.0-b10, mixed mode)

    $ uname -a
    Linux brodtgaard 3.2.0-3-amd64 #1 SMP Mon Jul 23 02:45:17 UTC 2012 x86_64 GNU/Linux

     
  • jede28
    jede28
    2012-08-02

    • status: open --> open-accepted
     
  • jede28
    jede28
    2012-08-02

    OK, the attached TCX file has reproduced the problem this time.
    The bugfix was very easy. The changes are available in the SourceForge Mercurial repository.

    Thanks for reporting!

     
  • jede28
    jede28
    2012-08-02

    • status: open-accepted --> closed-fixed