Modify

Opened 3 years ago

Closed 3 years ago

#21043 closed defect (fixed)

[Patch] Vector Tiles: ClassCastException when toggling OSM filter

Reported by: anonymous Owned by: Don-vip
Priority: normal Milestone: 21.06
Component: Core Version: latest
Keywords: template_report, vector Cc:

Description (last modified by taylor.smock)

What steps will reproduce the problem?

  1. Add a Mapillary point object layer (traffic signs/point detections)
  2. Add a JOSM filter (e.g., type:way and highway=*)
  3. Toggle the filter
Revision:17942
Is-Local-Build:true
Build-Date:2021-06-26 08:38:11

Identification: JOSM/1.5 (17942 SVN en) Linux Fedora release 34 (Thirty Four)
Memory Usage: 2152 MB / 3988 MB (1404 MB allocated, but free)
Java version: 16.0.1+9, Red Hat, Inc., OpenJDK 64-Bit Server VM
Look and Feel: javax.swing.plaf.metal.MetalLookAndFeel
Screen: :0.0 3840×2160 (scaling 1.00×1.00) :0.1 3840×2160 (scaling 1.00×1.00)
Maximum Screen Size: 3840×2160
Best cursor sizes: 16×16→16×16, 32×32→32×32
Environment variable LANG: en_US.UTF-8
Environment variable LC_ALL: C
System property file.encoding: ANSI_X3.4-1968
System property sun.jnu.encoding: ANSI_X3.4-1968
Locale info: en_US
Numbers with default locale: 1234567890 -> 1234567890
Desktop environment: GNOME
apache-commons-compress: apache-commons-compress:noarch-1.20
apache-commons-jcs-core: apache-commons-jcs-core:noarch-2.2
apache-commons-logging: apache-commons-logging:noarch-1.2
metadata-extractor2: metadata-extractor2:noarch-2.10.1
signpost-core: signpost-core:noarch-1.2.1.2
svgsalamander: svgsalamander:noarch-1.1.2
Dataset consistency test: No problems found

Plugins:
+ Lanes (${version.entry.commit.revision})
+ Mapillary (2.0.0-alpha.20)
+ apache-commons (35524)
+ apache-http (35589)
+ auto_tools (79)
+ buildings_tools (35756)
+ ejml (35458)
+ geotools (35458)
+ gridify (1606242219)
+ imagery_offset_db (35640)
+ indoor_sweepline (35640)
+ indoorhelper (1.2.0)
+ jaxb (35543)
+ jna (35662)
+ jts (35458)
+ mapwithai (1.8.2)
+ markseen (14)
+ notesolver (0.3.3)
+ opendata (35640)
+ openqa (0.2.2)
+ osm-obj-info (56)
+ reverter (35732)
+ todo (30306)
+ utilsplugin2 (35691)
+ wikidata (1.2.3)

Tagging presets:
+ https://josm.openstreetmap.de/josmfile?page=Presets/ParkingLanes&zip=1

Map paint styles:
+ https://josm.openstreetmap.de/josmfile?page=Styles/MapWithAI&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Coloured_Streets&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Styles/Maxspeed&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Styles/Lane_and_Road_Attributes&zip=1
+ https://raw.githubusercontent.com/species/josm-preset-traffic_sign_direction/master/direction.mapcss
- <josm.pref>/styles/sit.mapcss
+ resource://mapcss/Mapillary.mapcss

Last errors/warnings:
- 17697.050 E: java.io.FileNotFoundException: ${HOME}/Pictures/TravelPictures/ext_hdd/VIRB/330/8/DCIM/347_VIRB/VIRB0397-4648.JPG (No such file or directory)
- 17697.050 E: java.io.FileNotFoundException: ${HOME}/Pictures/TravelPictures/ext_hdd/VIRB/330/8/DCIM/347_VIRB/VIRB0397-4649.JPG (No such file or directory)
- 17697.050 E: java.io.FileNotFoundException: ${HOME}/Pictures/TravelPictures/ext_hdd/VIRB/330/8/DCIM/347_VIRB/VIRB0397-4650.JPG (No such file or directory)
- 17794.583 E: Handled by bug report queue: java.lang.ClassCastException: class org.openstreetmap.josm.data.vector.VectorRelation cannot be cast to class org.openstreetmap.josm.data.osm.Relation (org.openstreetmap.josm.data.vector.VectorRelation and org.openstreetmap.josm.data.osm.Relation are in unnamed module of loader 'app')
- 17798.264 E: Handled by bug report queue: java.lang.ClassCastException: class org.openstreetmap.josm.data.vector.VectorRelation cannot be cast to class org.openstreetmap.josm.data.osm.Relation (org.openstreetmap.josm.data.vector.VectorRelation and org.openstreetmap.josm.data.osm.Relation are in unnamed module of loader 'app')
- 17800.396 E: Handled by bug report queue: java.lang.ClassCastException: class org.openstreetmap.josm.data.vector.VectorRelation cannot be cast to class org.openstreetmap.josm.data.osm.Relation (org.openstreetmap.josm.data.vector.VectorRelation and org.openstreetmap.josm.data.osm.Relation are in unnamed module of loader 'app')
- 17801.625 E: Handled by bug report queue: java.lang.ClassCastException: class org.openstreetmap.josm.data.vector.VectorRelation cannot be cast to class org.openstreetmap.josm.data.osm.Relation (org.openstreetmap.josm.data.vector.VectorRelation and org.openstreetmap.josm.data.osm.Relation are in unnamed module of loader 'app')
- 17802.782 E: Handled by bug report queue: java.lang.ClassCastException: class org.openstreetmap.josm.data.vector.VectorRelation cannot be cast to class org.openstreetmap.josm.data.osm.Relation (org.openstreetmap.josm.data.vector.VectorRelation and org.openstreetmap.josm.data.osm.Relation are in unnamed module of loader 'app')
- 17803.884 E: Handled by bug report queue: java.lang.ClassCastException: class org.openstreetmap.josm.data.vector.VectorRelation cannot be cast to class org.openstreetmap.josm.data.osm.Relation (org.openstreetmap.josm.data.vector.VectorRelation and org.openstreetmap.josm.data.osm.Relation are in unnamed module of loader 'app')
- 17805.930 E: Handled by bug report queue: java.lang.ClassCastException: class org.openstreetmap.josm.data.vector.VectorRelation cannot be cast to class org.openstreetmap.josm.data.osm.Relation (org.openstreetmap.josm.data.vector.VectorRelation and org.openstreetmap.josm.data.osm.Relation are in unnamed module of loader 'app')



=== REPORTED CRASH DATA ===
BugReportExceptionHandler#handleException:
No data collected.

Warning issued by: BugReportExceptionHandler#handleException

=== STACK TRACE ===
Thread: AWT-EventQueue-0 (21) of main
java.lang.ClassCastException: class org.openstreetmap.josm.data.vector.VectorRelation cannot be cast to class org.openstreetmap.josm.data.osm.Relation (org.openstreetmap.josm.data.vector.VectorRelation and org.openstreetmap.josm.data.osm.Relation are in unnamed module of loader 'app')
	at org.openstreetmap.josm.data.osm.FilterMatcher.allParentMultipolygonsFiltered(FilterMatcher.java:212)
	at org.openstreetmap.josm.data.osm.FilterMatcher.test(FilterMatcher.java:282)
	at org.openstreetmap.josm.data.osm.FilterMatcher.isHidden(FilterMatcher.java:309)
	at org.openstreetmap.josm.data.osm.FilterWorker.doExecuteFilters(FilterWorker.java:62)
	at org.openstreetmap.josm.data.osm.FilterWorker.executeFilters(FilterWorker.java:52)
	at org.openstreetmap.josm.plugins.mapillary.data.osm.event.FilterEventListener.updateAndRunFilters(FilterEventListener.java:56)
	at org.openstreetmap.josm.plugins.mapillary.data.osm.event.FilterEventListener.tableChanged(FilterEventListener.java:41)
	at java.desktop/javax.swing.table.AbstractTableModel.fireTableChanged(AbstractTableModel.java:302)
	at java.desktop/javax.swing.table.AbstractTableModel.fireTableRowsUpdated(AbstractTableModel.java:252)
	at org.openstreetmap.josm.gui.dialogs.FilterTableModel.setValue(FilterTableModel.java:182)
	at org.openstreetmap.josm.gui.dialogs.FilterTableModel.setValueAt(FilterTableModel.java:259)
	at java.desktop/javax.swing.JTable.setValueAt(JTable.java:2730)
	at java.desktop/javax.swing.JTable.editingStopped(JTable.java:4728)
	at java.desktop/javax.swing.AbstractCellEditor.fireEditingStopped(AbstractCellEditor.java:152)
	at java.desktop/javax.swing.DefaultCellEditor$EditorDelegate.stopCellEditing(DefaultCellEditor.java:375)
	at java.desktop/javax.swing.DefaultCellEditor.stopCellEditing(DefaultCellEditor.java:234)
	at java.desktop/javax.swing.JTable$CellEditorRemover.propertyChange(JTable.java:6045)
	at java.desktop/java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:342)
	at java.desktop/java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:335)
	at java.desktop/java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:267)
	at java.desktop/java.awt.KeyboardFocusManager.firePropertyChange(KeyboardFocusManager.java:1487)
	at java.desktop/java.awt.KeyboardFocusManager.setGlobalPermanentFocusOwner(KeyboardFocusManager.java:783)
	at java.desktop/java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:656)
	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4874)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2322)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4825)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

Attachments (1)

21043.patch (1.4 KB ) - added by taylor.smock 3 years ago.
Relation -> IRelation<?>, IPrimitive::isMultiPolygon -> i -> i.isMultipolygon() && i instanceof IFilterablePrimitive (instanceof is probably unnecessary, but added just in case)

Download all attachments as: .zip

Change History (6)

comment:1 by taylor.smock, 3 years ago

Description: modified (diff)

comment:2 by taylor.smock, 3 years ago

Component: Plugin mapillaryCore
Description: modified (diff)
Keywords: vector added
Owner: changed from taylor.smock to team
Summary: Mapillary: ClassCastException when toggling OSM filter[Patch] Vector Tiles: ClassCastException when toggling OSM filter
Version: latest

It looks like I missed FilterMatcher#allParentMultipolygonsFiltered in #17177.

https://gitlab.com/smocktaylor/josm/-/merge_requests/6.patch

https://gitlab.com/smocktaylor/josm/-/merge_requests/6/pipelines (hopefully the test stage doesn't time out again...)

by taylor.smock, 3 years ago

Attachment: 21043.patch added

Relation -> IRelation<?>, IPrimitive::isMultiPolygon -> i -> i.isMultipolygon() && i instanceof IFilterablePrimitive (instanceof is probably unnecessary, but added just in case)

comment:3 by taylor.smock, 3 years ago

I've fixed this in the Mapillary plugin (workaround). See 34a8cbc82c1ac3b701dd42c0caaad34b4564d366.

comment:4 by Don-vip, 3 years ago

Milestone: 21.06
Owner: changed from team to Don-vip
Status: newassigned

comment:5 by Don-vip, 3 years ago

Resolution: fixed
Status: assignedclosed

In 17980/josm:

fix #21043 - update FilterMatcher#allParentMultipolygonsFiltered (patch by taylor.smock)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Don-vip.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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