﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
23802	[PATCH] Backup preferences files get overwritten by bad preference files	SekeRob	team	"We suffer here frequent power network overloads resulting in spikes / glitches, causing the main fuse to pop. When restarting the comp and JOSM often a message appears saying that the preferences are damaged, a backup generated and new clean preferences files created, as if JOSM is in day 1 state. When then trying to put the backup preferences.xml and default_preferences.xml back in, JOSM says these are broken and the cycle is repeated. Come this experience I've been doing manual backups of the 2 files found in

C:\Users\...\AppData\Local\JOSM\cache and
C:\Users\...\AppData\Roaming\JOSM

After putting these manual backup in place, JOSM starts fine with all my settings/styles/presets/plugins etc to include the CS comments made up to the point of the manual backup.

Do not really understand why the recovery procedure is overwriting the last backup, rather I'd expect that if preferences.osm/default_preferences.osm is/are considered bad, the first action would be to overwrite those with the assumed to be autogenerated good backups. At any rate I'd ask to review the procedure and restore the last 'good' backup rather than overwrite during recovery which seemingly is happening.

The thought has crossed my mind that the manual restore of the 2 pref files never fails so maybe there never is a good JOSM generated backup in the first place. E.g. there are momentarily after the recovery a preferences.xml.bak dated the 12th and a preferences.xml.backup timestamp around when last manually recovering. Of default_preferences there only exists a .backup. From past discussion on the community forum (discourse) it seems I'm not the only one doing manual/automated backup of the prefs i.e. I'm not alone. Maybe this could be written up in a wiki page to explain which is which and what action to take to get the good prefs back.

thanks

==== Please provide any additional information below. Attach a screenshot if possible.

{{{
Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2024-07-02 17:10:50 +0200 (Tue, 02 Jul 2024)
Revision:19128
Build-Date:2024-07-03 01:31:15
URL:https://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (19128 en) Windows 10 64-Bit
OS Build number: Windows 10 Home 22H2 (19045)
Memory Usage: 1168 MB / 4084 MB (270 MB allocated, but free)
Java version: 21.0.3+9-LTS, Azul Systems, Inc., OpenJDK 64-Bit Server VM
Look and Feel: com.sun.java.swing.plaf.windows.WindowsLookAndFeel
Screen: \Display0 1920x1080x32bpp@60Hz (scaling 1.00×1.00)
Maximum Screen Size: 1920×1080
Best cursor sizes: 16×16→32×32, 32×32→32×32
System property file.encoding: UTF-8
System property sun.jnu.encoding: Cp1252
Locale info: en_US
Numbers with default locale: 1234567890 -> 1234567890
VM arguments: [-Dicedtea-web.bin.location=%UserProfile%\AppData\Local\Programs\OpenWebStart\javaws, -Djava.util.Arrays.useLegacyMergeSort=true, --add-reads=java.base=ALL-UNNAMED,java.desktop, --add-reads=java.desktop=ALL-UNNAMED,java.naming, --add-reads=java.naming=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/sun.awt=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/javax.jnlp=ALL-UNNAMED,java.desktop, --add-exports=java.base/com.sun.net.ssl.internal.ssl=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.net.www.protocol.jar=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.security.action=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.security.provider=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.security.util=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.security.validator=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.security.x509=ALL-UNNAMED,java.desktop, --add-exports=java.base/jdk.internal.util.jar=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.net.www.protocol.http=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/sun.awt.X11=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/sun.applet=ALL-UNNAMED,java.desktop,jdk.jsobject, --add-exports=java.naming/com.sun.jndi.toolkit.url=ALL-UNNAMED,java.desktop, --add-modules=java.scripting,java.sql,javafx.controls,javafx.media,javafx.swing,javafx.web, --add-exports=java.desktop/com.apple.eawt=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.spi=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED, --add-exports=javafx.graphics/com.sun.javafx.application=ALL-UNNAMED, --add-exports=jdk.deploy/com.sun.deploy.config=ALL-UNNAMED, --add-opens=java.base/java.lang=ALL-UNNAMED, --add-opens=java.base/java.nio=ALL-UNNAMED, --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED, --add-opens=java.base/jdk.internal.ref=ALL-UNNAMED, --add-opens=java.desktop/javax.imageio.spi=ALL-UNNAMED, --add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED, --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED, -Djava.security.manager=allow]

Plugins:
+ HouseNumberTaggingTool (36226)
+ KartaView (490)
+ Mapillary (1769)
+ OpeningHoursEditor (36258)
+ RoadSigns (36258)
+ apache-commons (36273)
+ buildings_tools (36226)
+ easypresets (1623509627)
+ graphview (36258)
+ gridify (1718663815)
+ libphonenumber (8.13.41)
+ measurement (36256)
+ notesolver (0.5.0)
+ phonenumber (1.1.1)
+ pt_assistant (637)
+ reltoolbox (36280)
+ reverter (36256)
+ routing (36226)
+ scripting (v0.3.1)
+ tageditor (36258)
+ terracer (36205)
+ todo (137)
+ turnlanes (36206)
+ turnlanes-tagging (0.0.5)
+ turnrestrictions (36226)
+ utilsplugin2 (36241)

Tagging presets:
+ <josm.pref>/EasyPresets.xml
+ https://josm.openstreetmap.de/josmfile?page=Presets/OneClick&zip=1
+ https://raw.githubusercontent.com/osmlab/name-suggestion-index/main/dist/presets/nsi-josm-presets.min.xml
+ https://josm.openstreetmap.de/josmfile?page=Presets/Golf_Course&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/AdvertisingPreset&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/Maxspeed-zones&zip=1
+ https://raw.githubusercontent.com/yopaseopor/traffic_signs_preset_JOSM/master/IT.zip
+ https://josm.openstreetmap.de/josmfile?page=Presets/Manholes&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/LaneAttributes&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/TurnLanes&zip=1
+ https://github.com/kendzi/Simple3dBuildingsPreset/releases/download/0.9_2018-05-08/s3db-preset.zip

Map paint styles:
+ https://josm.openstreetmap.de/josmfile?page=Styles/Potlach2_access&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Admin_Boundaries&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/AddressValidator&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Styles/PublicTransport&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Lane_and_Road_Attributes&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Styles/PublicTransportV2&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Styles/ColorWays&zip=1
- https://josm.openstreetmap.de/josmfile?page=Rules/IncompleteObjectWarnings&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Styles/Coloured_buildings_en&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Enhanced_Lane_and_Road_Attributes&zip=1
+ https://gitlab.com/cartocite/josm-style-traffic-signs-orientation/-/raw/main/traffic_sign_orientation_style.zip
- https://josm.openstreetmap.de/josmfile?page=Styles/Modified&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Styles/MapWithAI&zip=1
+ https://raw.githubusercontent.com/yopaseopor/traffic_signs_style_JOSM/master/Styles_Traffic_signs_EUR_OC.zip
- https://josm.openstreetmap.de/josmfile?page=Styles/Maxspeed&zip=1
- https://raw.githubusercontent.com/OpenNauticalChart/josm/master/european-waterways-classification-style/CEMT-style.mapcss
- https://josm.openstreetmap.de/josmfile?page=Styles/Waterways&zip=1

Last errors/warnings:
- 00029.936 E: Failed to locate image 'traffic_signs_presets/ES_road_beacon_big.png'
- 00029.937 W:  Reset Dummy (00): Could not get presets icon traffic_signs_presets/ES_road_beacon_big.png
- 00029.975 E: Failed to locate image 'traffic_signs/IT/IT_II.50-110.png'
- 00029.976 W:  Maxspeed 50 (67): Could not get presets icon traffic_signs/IT/IT_II.50-110.png
- 00029.979 E: Failed to locate image 'traffic_signs_presets/ES_r101.png'
- 00029.980 W:  No Entry Sign (70): Could not get presets icon traffic_signs_presets/ES_r101.png
- 00029.981 E: Failed to locate image 'traffic_signs/IT/IT_II.76.png'
- 00029.982 W:  Disabled parking space (71): Could not get presets icon traffic_signs/IT/IT_II.76.png
- 00029.988 E: Failed to locate image 'traffic_signs/IT/IT_II.305.png'
- 00029.989 W:  Emergency Bay node (80): Could not get presets icon traffic_signs/IT/IT_II.305.png
}}}
"	defect	closed	normal	24.08	Core		fixed	template_report	
