Modify

#7641 closed defect (fixed)

JOSM does not close file handle when parsing fails

Reported by: AM909 Owned by: team
Priority: normal Component: Core
Version: tested Keywords: file handle close open
Cc: AM909

Description

In r5181:

If you drag and drop a malformed OSM XML file onto JOSM, after it issues the error, it fails to close the file handle on that file, so you can't delete the file without closing JOSM. It should close the file handle if it can't keep the file open for editing.

Example malformed file:

<?xml version="1.0" encoding="UTF-8"?>
<osm version="0.6" generator="Overpass API">
  <node id="91287560" lat="35.0746370" lon="-120.0014730"/>
</osm>

results in error:
Could not read file 'temp.osm'. Error is: Missing attribute 'version' on OSM primitive with ID 91287560. (at line 3, column 60)

Attachments (0)

Change History (1)

comment:1 Changed 13 months ago by Don-vip

  • Resolution set to fixed
  • Status changed from new to closed

In 5205/josm:

fix #7641 - JOSM does not close file handle when parsing fails

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed .
as The resolution will be set. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.