Modify

Opened 14 months ago

#23321 new defect

Square brackets in filename result in error (and not loading the file)

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

Description

What steps will reproduce the problem?

  1. Have a (KMZ) file that has two bracekts in its name []
  2. Drag and drop it on JOSM

What is the expected result?

Thefile loads

What happens instead?

It does not, it throws an exception.

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

When I rename the file, it loads. I am on Linux, the file is KMZ from Google Earth. But also empty file named "[]" triggers this.

Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2023-08-29 13:38:40 +0200 (Tue, 29 Aug 2023)
Revision:18822
Build-Date:2023-08-30 01:30:57
URL:https://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (18822 en) Linux Ubuntu 22.04.3 LTS
Memory Usage: 2252 MB / 7958 MB (484 MB allocated, but free)
Java version: 11.0.20.1+1-post-Ubuntu-0ubuntu122.04, Ubuntu, OpenJDK 64-Bit Server VM
Look and Feel: javax.swing.plaf.metal.MetalLookAndFeel
Screen: :0.0 1920×1080 (scaling 1.00×1.00) :0.1 2560×1440 (scaling 1.00×1.00) :0.2 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
System property file.encoding: UTF-8
System property sun.jnu.encoding: UTF-8
Locale info: en_US
Numbers with default locale: 1234567890 -> 1234567890
Desktop environment: KDE
Java package: openjdk-11-jre:amd64-11.0.20.1+1-0ubuntu1~22.04
Java ATK Wrapper package: libatk-wrapper-java:all-0.38.0-5build1
libcommons-compress-java: libcommons-compress-java:all-1.21-1
fonts-noto: fonts-noto:all-20201225-1build1
VM arguments: [--module-path=/usr/share/openjfx/lib, --add-modules=java.scripting,java.sql,javafx.controls,javafx.media,javafx.swing,javafx.web, -Djosm.restart=true, -Djava.net.useSystemProxies=true, --add-exports=java.base/sun.security.action=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.spi=ALL-UNNAMED]
Dataset consistency test: No problems found

Plugins:
+ apache-commons (36176)
+ ejml (36176)
+ geotools (36176)
+ imagery_offset_db (36126)
+ jackson (36176)
+ jaxb (36118)
+ jts (36004)
+ opendata (36186)
+ pbf (36176)
+ utilsplugin2 (36178)

Last errors/warnings:
- 36912.199 E: java.lang.IllegalStateException: JOSM expected to find primitive [way -45283] in dataset but it is not there. Please report this at https://josm.openstreetmap.de. This is not a critical error, it should be safe to continue in your work.
- 36912.579 E: java.lang.IllegalStateException: JOSM expected to find primitive [node -2419092] in dataset but it is not there. Please report this at https://josm.openstreetmap.de. This is not a critical error, it should be safe to continue in your work.
- 36912.747 E: java.lang.IllegalStateException: JOSM expected to find primitive [way -45270] in dataset but it is not there. Please report this at https://josm.openstreetmap.de. This is not a critical error, it should be safe to continue in your work.
- 36912.941 E: java.lang.IllegalStateException: JOSM expected to find primitive [node -2419077] in dataset but it is not there. Please report this at https://josm.openstreetmap.de. This is not a critical error, it should be safe to continue in your work.
- 68732.775 E: Handled by bug report queue: java.awt.dnd.InvalidDnDOperationException: java.net.URISyntaxException: Illegal character in path at index 51: file://${HOME}/Desktop/OH-TL-A%20%7B10-01A%7D%20[0.0+4.2].kmz
- 68781.789 E: Handled by bug report queue: java.awt.dnd.InvalidDnDOperationException: java.net.URISyntaxException: Illegal character in path at index 51: file://${HOME}/Desktop/OH-TL-A%20%7B10-01A%7D%20[0.0+4.2].kmz
- 68882.978 E: Handled by bug report queue: java.awt.dnd.InvalidDnDOperationException: java.net.URISyntaxException: Illegal character in path at index 51: file://${HOME}/Desktop/OH-TL-A%20%7B10-01A%7D%20[0.0+4.2].kmz
- 68942.695 E: Handled by bug report queue: java.awt.dnd.InvalidDnDOperationException: java.net.URISyntaxException: Illegal character in path at index 29: file://${HOME}/Desktop/%20[0.0+4.2].kmz
- 68979.328 E: Handled by bug report queue: java.awt.dnd.InvalidDnDOperationException: java.net.URISyntaxException: Illegal character in path at index 26: file://${HOME}/Desktop/[].kmz
- 69000.443 E: Handled by bug report queue: java.awt.dnd.InvalidDnDOperationException: java.net.URISyntaxException: Illegal character in path at index 26: file://${HOME}/Desktop/[].kmz



=== REPORTED CRASH DATA ===
AbstractStackTransferHandler#importData:
 - paster: org.openstreetmap.josm.gui.datatransfer.importers.FilePaster@3e33bd
 - flavors: 
    - [Ljava.awt.datatransfer.DataFlavor;@44123641

Warning issued by: AbstractStackTransferHandler#importData

=== STACK TRACE ===
Thread: AWT-EventQueue-0 (28) of main
java.awt.dnd.InvalidDnDOperationException: java.net.URISyntaxException: Illegal character in path at index 26: file:///home/drew/Desktop/[].kmz
	at java.desktop/sun.awt.dnd.SunDropTargetContextPeer.getTransferData(SunDropTargetContextPeer.java:273)
	at java.desktop/sun.awt.datatransfer.TransferableProxy.getTransferData(TransferableProxy.java:73)
	at java.desktop/java.awt.dnd.DropTargetContext$TransferableProxy.getTransferData(DropTargetContext.java:386)
	at org.openstreetmap.josm.gui.datatransfer.importers.FilePaster.importData(FilePaster.java:36)
	at org.openstreetmap.josm.gui.datatransfer.AbstractStackTransferHandler.importData(AbstractStackTransferHandler.java:54)
	at org.openstreetmap.josm.gui.datatransfer.AbstractStackTransferHandler.importData(AbstractStackTransferHandler.java:43)
	at java.desktop/javax.swing.TransferHandler$DropHandler.drop(TransferHandler.java:1544)
	at java.desktop/java.awt.dnd.DropTarget.drop(DropTarget.java:452)
	at java.desktop/javax.swing.TransferHandler$SwingDropTarget.drop(TransferHandler.java:1282)
	at java.desktop/sun.awt.dnd.SunDropTargetContextPeer.processDropMessage(SunDropTargetContextPeer.java:547)
	at java.desktop/sun.awt.X11.XDropTargetContextPeer.processDropMessage(XDropTargetContextPeer.java:185)
	at java.desktop/sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchDropEvent(SunDropTargetContextPeer.java:863)
	at java.desktop/sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchEvent(SunDropTargetContextPeer.java:787)
	at java.desktop/sun.awt.dnd.SunDropTargetEvent.dispatch(SunDropTargetEvent.java:48)
	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4876)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4843)
	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918)
	at java.desktop/java.awt.LightweightDispatcher.processDropTargetEvent(Container.java:4621)
	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4483)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307)
	at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2772)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4843)
	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(Native Method)
	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(Native Method)
	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)

[].kmz (3.6 KB ) - added by felagund 14 months ago.
sample file

Download all attachments as: .zip

Change History (1)

by felagund, 14 months ago

Attachment: [].kmz added

sample file

Modify Ticket

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

Add Comment


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