Opened 6 months ago

Last modified 6 months ago

#23360 reopened defect

[PATCH] Saving the TODO task list

Reported by: leni Owned by: Gnonthgol
Priority: normal Milestone:
Component: Core Version:
Keywords: template_report Cc:


What steps will reproduce the problem?

  1. I've opened a layer and a TODO list
  2. I save a session, then close it
  3. I open the created session

What is the expected result?

loading the layer and TODO list (

What happens instead?

only the layer is loaded

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

Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2023-12-07 13:35:12 +0100 (Thu, 07 Dec 2023)
Build-Date:2023-12-07 16:38:49

Identification: JOSM/1.5 (18907 fr) Windows 10 64-Bit
OS Build number: Windows 10 Home 2009 (19045)
Memory Usage: 468 MB / 1970 MB (98 MB allocated, but free)
Java version: 21.0.1+12-LTS, Azul Systems, Inc., OpenJDK 64-Bit Server VM
Look and Feel:
Screen: \Display0 1920×1080 (scaling 1.25×1.25)
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: fr_FR
Numbers with default locale: 1234567890 -> 1234567890
VM arguments: [-Dicedtea-web.bin.location=%UserProfile%\AppData\Local\Programs\OpenWebStart\javaws, -Djava.util.Arrays.useLegacyMergeSort=true, --add-exports=jdk.deploy/com.sun.deploy.config=ALL-UNNAMED, --add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED, --add-reads=java.naming=ALL-UNNAMED,java.desktop, --add-exports=java.base/,java.desktop, --add-reads=java.base=ALL-UNNAMED,java.desktop, --add-exports=java.naming/com.sun.jndi.toolkit.url=ALL-UNNAMED,java.desktop, --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED, --add-exports=java.desktop/, --add-exports=java.desktop/sun.awt=ALL-UNNAMED,java.desktop, --add-opens=java.base/jdk.internal.ref=ALL-UNNAMED, --add-exports=java.base/,java.desktop, --add-exports=java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED, --add-exports=java.base/,java.desktop, --add-exports=java.base/jdk.internal.util.jar=ALL-UNNAMED,java.desktop, --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED, --add-exports=java.base/,java.desktop,, --add-modules=java.scripting,java.sql,javafx.controls,,javafx.swing,javafx.web, --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.base/,java.desktop, --add-opens=java.base/java.lang=ALL-UNNAMED, --add-exports=java.base/,java.desktop, --add-exports=java.desktop/com.sun.imageio.spi=ALL-UNNAMED, --add-reads=java.desktop=ALL-UNNAMED,java.naming, --add-opens=java.base/java.nio=ALL-UNNAMED, --add-exports=java.base/,java.desktop, --add-opens=java.desktop/javax.imageio.spi=ALL-UNNAMED, --add-exports=java.desktop/javax.jnlp=ALL-UNNAMED,java.desktop, --add-exports=java.base/,java.desktop,]
Dataset consistency test: No problems found

+ DirectUpload (36178)
+ HouseNumberTaggingTool (36178)
+ ImageWayPoint (36126)
+ MapRoulette (26)
+ PicLayer (1.0.3)
+ apache-commons (36176)
+ apache-http (36176)
+ auto_tools (81)
+ buildings_tools (36178)
+ cadastre-fr (36178)
+ conflation (0.6.11)
+ easypresets (1623509627)
+ ejml (36176)
+ geotools (36176)
+ graphview (36178)
+ indoorhelper (1.2.3)
+ jackson (36176)
+ javafx (36178)
+ jaxb (36118)
+ jna (36176)
+ jts (36004)
+ mapwithai (819)
+ opendata (36186)
+ photo_geotagging (36126)
+ photoadjust (36188)
+ pmtiles (36156)
+ tagging-preset-tester (36126)
+ todo (133)
+ utilsplugin2 (36178)

Tagging presets:
+ <josm.pref>/EasyPresets.xml

Map paint styles:
+ <josm.pref>\plugins\indoorhelper\resources\sit.mapcss
- <josm.pref>\plugins\indoorhelper\resources\sit.mapcss

Last errors/warnings:
- 00000.375 W: extended font config - overriding 'filename.Malgun_Gothic=malgun.ttf' with 'MALGUN.TTF'
- 00000.377 W: extended font config - overriding 'filename.Myanmar_Text=mmrtext.ttf' with 'MMRTEXT.TTF'
- 00000.377 W: extended font config - overriding 'filename.Mongolian_Baiti=monbaiti.ttf' with 'MONBAITI.TTF'
- 00021.485 E: java.nio.file.NoSuchFileException: <josm.pref>\EasyPresets.xml
- 00021.486 E: <josm.pref>/EasyPresets.xml

Attachments (1)

SaveSessionwithTodoList.png (75.3 KB ) - added by leni 6 months ago.

Download all attachments as: .zip

Change History (5)

comment:1 by taylor.smock, 6 months ago

Resolution: fixed
Status: newclosed

It looks like I just need to trigger a release.

by leni, 6 months ago

Attachment: SaveSessionwithTodoList.png added

comment:2 by leni, 6 months ago

Resolution: fixed
Status: closedreopened

I update the plugin to 137.
Nothing's change
I open a layer and select the selected items to the todolist list
I save the session, I can only see the layers (screenshot SaveSessionwithTodoList.png attached)
then I close it
I open the created session
I have the layers, but not the todo list

+ ...
+ todo (137)
+ ...

plugins=[DirectUpload, HouseNumberTaggingTool, ImageWayPoint, MapRoulette, PicLayer, apache-commons, apache-http, auto_tools, buildings_tools, cadastre-fr, conflation, easypresets, ejml, geotools, graphview, indoorhelper, jackson, javafx, jaxb, jna, jts, mapwithai, opendata, photo_geotagging, photoadjust, pmtiles, tageditor, tagging-preset-tester, terracer, todo, utilsplugin2]

taggingpreset.entries=[{title=Modèle d’attributs interne, url=resource://data/defaultpresets.xml}, {title=Jungle stops, url=}, {title=Street Parking, url=}, {title=EasyPresets, url=<josm.pref>/EasyPresets.xml}]

comment:3 by taylor.smock, 6 months ago

It looks like there is something causing the org.openstreetmap.josm.plugins.todo.TodoDialog to not equal the org.openstreetmap.josm.plugins.todo.TodoDialog (yes, those are the same canonical name). The equality method isn't using the canonical name (it is the default method, which is memory address), so I'm going to need to figure out what is going on with classloaders (probably).

comment:4 by taylor.smock, 6 months ago

Component: Plugin todoCore
Summary: Saving the TODO task list[PATCH] Saving the TODO task list

I don't particularly like this, but it works and avoids having yet another classloader. I'm not certain why it worked in my initial testing (on a mac). It seems like one of the following is true:

  • A change in how classloaders work
  • A difference in how Java does classloading on different operating systems

Best guess, until I get around to doing a more in-depth debugging session, is that something changed and either classloaders stopped looking to see if a class was already loaded or they started looking to see if a class was already loaded.

  • core/src/org/openstreetmap/josm/plugins/

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    diff --git a/core/src/org/openstreetmap/josm/plugins/ b/core/src/org/openstreetmap/josm/plugins/
    a b  
    799799    private static synchronized DynamicURLClassLoader getJoinedPluginResourceCL() {
    800800        if (joinedPluginResourceCL == null) {
    801801            joinedPluginResourceCL = AccessController.doPrivileged((PrivilegedAction<DynamicURLClassLoader>)
    802                     () -> new DynamicURLClassLoader(new URL[0], PluginHandler.class.getClassLoader()));
     802                    () -> new DynamicURLClassLoader(new URL[0], PluginHandler.class.getClassLoader()) {
     803                        @Override
     804                        protected Class<?> loadClass(String name, boolean resolve)
     805                                throws ClassNotFoundException {
     806                            for (ClassLoader cl : getPluginClassLoaders()) {
     807                                try {
     808                                    return cl.loadClass(name);
     809                                } catch (ClassNotFoundException cnfe) {
     810                                    Logging.trace(cnfe);
     811                                }
     812                            }
     813                            return super.loadClass(name, resolve);
     814                        }
     815                    });
    803816            sources.add(0, joinedPluginResourceCL);
    804817        }
    805818        return joinedPluginResourceCL;

Modify Ticket

Change Properties
Set your email in Preferences
as reopened The owner will remain Gnonthgol.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from Gnonthgol to the specified user. Next status will be 'new'.
Next status will be 'needinfo'. The owner will be changed from Gnonthgol to leni.
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. The specified ticket will be cross-referenced with this ticket.

Add Comment

E-mail address and name can be saved in the Preferences .
Note: See TracTickets for help on using tickets.