Modify

Ticket #3417 (new enhancement)

Opened 2 years ago

Last modified 4 months ago

GPX parsing error messages shown in the console aren't shown in the UI

Reported by: avar Owned by: team
Priority: normal Component: Core
Version: latest Keywords:
Cc: xeen, Cobra

Description (last modified by xeen) (diff)

When opening an invalid GPX file I might get something like this in the console:

org.xml.sax.SAXParseException: The element type "gpx" must be terminated by the matching end-tag "</gpx>"

However the UI only says that the file couldn't be opened due to a parsing error.

It would be helpful to have more specific error messages in the UI.

Attachments

Change History

comment:1 Changed 18 months ago by Cobra

Ticket #4592 has been marked as a duplicate of this ticket.

comment:2 Changed 18 months ago by Cobra

The error message and the line in which this error occured are really interesting in most cases. Most errors are simply caused by files not being finished or otherwise corrupted by crashed devices or applications. These errors can be fixed very easily - if you know where you have to look for oddities.

Bug is still existing in today's latest.

comment:3 Changed 4 months ago by xeen

  • Cc xeen, Cobra added
  • Description modified (diff)

I checked today, and JOSM parses everything correctly until the file becomes malformed. It doesn’t print any error message to the console anymore and I don’t see how it will be helpful to print an error message this complicated. Most of the GPX files are created by an application, so if the file is broken your chances to fix it manually are very slim. The most likely solution would be to try to download or export the GPX again; and for this the “broken” message seems fine.

If you agree with me here, please close the ticket. Otherwise, can you explain?

comment:4 Changed 4 months ago by Cobra

  • Type changed from defect to enhancement

The most common errors I have seen were missing </trk>, </trkseg>, </gpx> tags caused by a crashed application (mostly loggers). Files with such trivial errors are now loaded anyway so imo it's not a defect anymore.

But I still think it would be nice to offer some more details like the line number where an error was detected if there is some possibility to get this information while trying to load the file. This could be "hidden" behind a "details" button.

Because of that I'm changing this to enhancement.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as new
as The resolution will be set. Next status will be 'closed'
to The owner will be changed from team. Next status will be 'new'
Next status will be 'needinfo'The owner will change to avar
as duplicate The resolution will be set to duplicate. Next status will be 'closed'The specified ticket will be cross-referenced with this ticket
The owner will be changed from team to anonymous. Next status will be 'assigned'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.