Modify

Opened 11 months ago

Closed 8 months ago

Last modified 7 months ago

#18462 closed defect (fixed)

[Patch RFC] JOSM doesn't use preferences.xml_backup

Reported by: GerdP Owned by: team
Priority: normal Milestone: 20.05
Component: Core Version:
Keywords: template_report Cc:

Description (last modified by GerdP)

What steps will reproduce the problem?

  1. Stop JOSM
  2. Edit preferences.xml and remove all but the first 4 lines to simulate a previous crash of JOSM
  3. Start JOSM

What is the expected result?

JOSM detects invalid preferences.xml and valid preferences.xml_backup and uses the backup.

What happens instead?

Popup saying that the preferences.xml was bad and that a new file is created with defaults.
popup

Please provide any additional information below. Attach a screenshot if possible.

See also german forum https://forum.openstreetmap.org/viewtopic.php?id=68309
It seems JOSM never tries to use the backup and it is likely that the user will overwrite this good copy before they really understand what happened.

URL:https://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2019-12-01 23:10:15 +0100 (Sun, 01 Dec 2019)
Build-Date:2019-12-02 02:30:57
Revision:15553
Relative:URL: ^/trunk

Identification: JOSM/1.5 (15553 de) Windows 10 64-Bit
OS Build number: Windows 10 Home 1903 (18362)
Memory Usage: 674 MB / 4551 MB (145 MB allocated, but free)
Java version: 1.8.0_221-b11, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Screen: \Display0 1920x1080
Maximum Screen Size: 1920x1080

Last errors/warnings:
- E: org.xml.sax.SAXParseException: XML-Dokumentstrukturen müssen innerhalb derselben Entity beginnen und enden.
- W: No configuration settings found.  Using hardcoded default values for all pools.

Attachments (2)

bak.png (7.9 KB) - added by GerdP 11 months ago.
popup
18462.patch (2.4 KB) - added by GerdP 11 months ago.

Download all attachments as: .zip

Change History (14)

Changed 11 months ago by GerdP

Attachment: bak.png added

popup

comment:1 Changed 11 months ago by GerdP

Description: modified (diff)

comment:2 Changed 11 months ago by GerdP

Description: modified (diff)

Changed 11 months ago by GerdP

Attachment: 18462.patch added

comment:3 Changed 11 months ago by GerdP

Summary: JOSM doesn't use preferences.xml_backup[Patch RFC] JOSM doesn't use preferences.xml_backup

comment:4 Changed 11 months ago by GerdP

Attached patch shows a different popup saying that JOSM tries to read the preferences.xml_backup.
It copies the content of preferences.xml_backup to preferences.xml and tries to load again.
If that fails also, the preferences are reset (as without the patch).

It improves the cases that preferences.xml is corrupted and preferences.xml_backup is good.

comment:5 Changed 11 months ago by GerdP

Please try if it works on other OS, I've only tested Windows.

comment:6 Changed 11 months ago by Don-vip

#18569 should probably be considered while working on saving preferences.xml

comment:7 Changed 11 months ago by Bjoeni

Replying to GerdP:

Please try if it works on other OS, I've only tested Windows.

Works for me

Build-Date:2020-01-17 22:59:15
Revision:15715
Is-Local-Build:true

Identification: JOSM/1.5 (15715 SVN en_AU) Linux Ubuntu 19.10
Memory Usage: 801 MB / 1744 MB (401 MB allocated, but free)
Java version: 1.8.0_232-8u232-b09-0ubuntu1.1-b09, Private Build, OpenJDK 64-Bit Server VM
Screen: :0.0 1600x900
Maximum Screen Size: 1600x900
Java package: openjdk-8-jre:amd64-8u232-b09-0ubuntu1.1
Java ATK Wrapper package: libatk-wrapper-java:all-0.35.0-3
libcommons-logging-java: libcommons-logging-java:-
fonts-noto: fonts-noto:-
VM arguments: [-agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:45233, -javaagent:/home/niklas/.eclipse/360744294_linux_gtk_x86_64/configuration/org.eclipse.osgi/219/0/.cp/lib/javaagent-shaded.jar, -Dfile.encoding=UTF-8]

comment:8 Changed 9 months ago by Don-vip

Milestone: 20.03

comment:9 Changed 9 months ago by Don-vip

Milestone: 20.0320.04

comment:10 Changed 9 months ago by GerdP

@Vincent: IIGTR MacOS should work like other unix based OS, so I think I should commit the patch after 20.03 was released.

comment:11 Changed 8 months ago by GerdP

Resolution: fixed
Status: newclosed

In 16241/josm:

fix #18462: JOSM doesn't use preferences.xml_backup
Show a popup saying that JOSM tries to read the preferences.xml_backup.
It copies the content of preferences.xml_backup to preferences.xml and tries to load again.
If that fails also, the preferences are reset (as without the patch).

It improves the cases that preferences.xml is corrupted and preferences.xml_backup is good.

comment:12 Changed 7 months ago by Klumbumbus

Milestone: 20.0420.05

Milestone renamed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted.

Add Comment


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

 
Note: See TracTickets for help on using tickets.