Modify

Opened 7 months ago

Closed 7 months ago

#14595 closed defect (fixed)

Silently failing if subject or reference sets contain a relation

Reported by: bagage Owned by: Tyndare
Priority: normal Milestone:
Component: Plugin conflation Version: latest
Keywords: template_report Cc: Don-vip

Description

What steps will reproduce the problem?

  1. Configure Conflation with sets that contain at least one relation
  2. Click "configure"

What is the expected result?

Either tables are filled, or an error pops "Relations not supported yet"

What happens instead?

Tables are "filled" as if it was OK, but there are empty/contain nothing. No exception is shown in logs either.

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

By debugging a bit, I saw that the exception beeing thrown is:

java.lang.UnsupportedOperationException: Relations not supported yet.

at org.openstreetmap.josm.plugins.jts.JTSConverter.convert(JTSConverter.java:106)
at org.openstreetmap.josm.plugins.conflation.OsmFeature.<init>(OsmFeature.java:35)
at org.openstreetmap.josm.plugins.conflation.MatchesComputation.createFeatureCollection(MatchesComputation.java:116)
at org.openstreetmap.josm.plugins.conflation.MatchesComputation.generateMatches(MatchesComputation.java:47)
at org.openstreetmap.josm.plugins.conflation.ConflationToggleDialog$2.realRun(ConflationToggleDialog.java:1115)
at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:96)
at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:149)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

To find it, I had to add in PleaseWaitRunnable.java:

    private void doRealRun() {
         //....
        try {
          } catch (final JosmRuntimeException | IllegalArgumentException | IllegalStateException |
                OsmTransferException | IOException | SAXException | InvocationTargetException | InterruptedException e) {
// added this code:
        } catch (Exception e) {
            e.printStackTrace();
        }
Build-Date:2017-03-30 17:49:38
Revision:11772
Is-Local-Build:true

Identification: JOSM/1.5 (11772 SVN fr) Linux Debian GNU/Linux 9.0 (stretch)
Memory Usage: 595 MB / 1760 MB (387 MB allocated, but free)
Java version: 1.8.0_121-8u121-b13-4-b13, Oracle Corporation, OpenJDK 64-Bit Server VM
Screen: :0.0 1920x1080
Maximum Screen Size: 1920x1080
Java package: openjdk-8-jre:amd64-8u121-b13-4
Java ATK Wrapper package: libatk-wrapper-java:all-0.33.3-13
VM arguments: [-Dfile.encoding=UTF-8]
Program arguments: [${HOME}/majcadastre/CL140-GEYSSANS/CL140-GEYSSANS-houses-simplifie.osm]
Dataset consistency test: No problems found

Plugins:
+ PicLayer (33148)
+ buildings_tools (33004)
+ conflation (0.5.0)
+ jts (32699)
+ rex (26)
+ todo (30000)
+ utilsplugin2 (33182)

Last errors/warnings:
- W: No configuration settings found.  Using hardcoded default values for all pools.
- W: Old style SideButton usage for action org.openstreetmap.josm.plugins.todo.TodoDialog$SelectAction@7889cb30
- W: Old style SideButton usage for action org.openstreetmap.josm.plugins.todo.TodoDialog$AddAction@4810ba
- W: Old style SideButton usage for action org.openstreetmap.josm.plugins.todo.TodoDialog$PassAction@1895dc45
- W: Old style SideButton usage for action org.openstreetmap.josm.plugins.todo.TodoDialog$MarkAction@348c01ba

Attachments (0)

Change History (5)

comment:1 Changed 7 months ago by Tyndare

Cc: Don-vip added

Thanks for the report. As you have noticed, the problem of the exception silently ignored is related to the class PleaseWaitRunnable which is part of JOSM core, it is not part of the conflation plugin.

It has been introduced 13 days ago by the changeset @11746
https://josm.openstreetmap.de/log/josm/?action=stop_on_copy&mode=stop_on_copy&rev=11746&stop_rev=11746&limit=100&verbose=on&sfp_email=&sfph_mail=

Supporting relations will be difficult as they are not supported by uttilsplugin2's replaceGeometry function.

comment:2 Changed 7 months ago by Tyndare

I've added a message about relations not supported, and also avoid trying to convert them.
https://github.com/JOSM/conflation/commit/6056fa32a395741d776cf03c6a78f67a1db7412f

comment:3 Changed 7 months ago by Don-vip

In 11801/josm:

see #14595 - catch UnsupportedOperationException

comment:4 Changed 7 months ago by bagage

Wow, thanks both for the 2 quickfixes! JOSM development ROCKS ;-).

comment:5 Changed 7 months ago by Tyndare

Resolution: fixed
Status: newclosed

Thanks, I close the ticket then.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Tyndare.
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.