Modify

Opened 11 months ago

Closed 11 months ago

Last modified 11 months ago

#23683 closed defect (duplicate)

InvalidPathException when clicking "Open file" due to a special filename (e.g. ö,ä,å)

Reported by: unnerving@… Owned by: team
Priority: normal Milestone:
Component: Core Version: latest
Keywords: template_report Cc:

Description

What steps will reproduce the problem?

  1. Drag and drop a .gpx track in the editor
  2. Import images to the track

What is the expected result?

The directory with the images should open

What happens instead?

It will error and not proceed

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

Looking at the bug report, I'm fairly certain it has to do with the characters in my language. After changing them and I can import the images just fine.

Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2024-04-29 18:37:36 +0200 (Mon, 29 Apr 2024)
Revision:19067
Build-Date:2024-05-02 01:31:13
URL:https://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (19067 en) Linux Freedesktop SDK 23.08 (Flatpak runtime)
Memory Usage: 328 MB / 3954 MB (88 MB allocated, but free)
Java version: 21.0.3+2, Flathub, OpenJDK 64-Bit Server VM
Look and Feel: javax.swing.plaf.metal.MetalLookAndFeel
Screen: :0.0 1920×1080 (scaling 1.00×1.00)
Maximum Screen Size: 1920×1080
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: ANSI_X3.4-1968
Locale info: en_US
Numbers with default locale: 1234567890 -> 1234567890
Desktop environment: KDE
VM arguments: [--module-path=/app/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]

Plugins:
+ apache-commons (36176)
+ photo_geotagging (36178)

Last errors/warnings:
- 00028.184 E: Handled by bug report queue: java.nio.file.InvalidPathException: Malformed input or input contains unmappable characters: ${HOME}/Pictures/M��kkireissu 2024-05-19
- 00032.672 E: Handled by bug report queue: java.nio.file.InvalidPathException: Malformed input or input contains unmappable characters: ${HOME}/Pictures/M��kkireissu 2024-05-19
- 00035.798 E: Handled by bug report queue: java.nio.file.InvalidPathException: Malformed input or input contains unmappable characters: ${HOME}/Pictures/M��kkireissu 2024-05-19



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

Warning issued by: BugReportExceptionHandler#handleException

=== STACK TRACE ===
Thread: Basic L&F File Loading Thread (83)
java.nio.file.InvalidPathException: Malformed input or input contains unmappable characters: /home/duck/Pictures/M��kkireissu 2024-05-19
	at java.base/sun.nio.fs.UnixPath.encode(UnixPath.java:129)
	at java.base/sun.nio.fs.UnixPath.<init>(UnixPath.java:76)
	at java.base/sun.nio.fs.UnixFileSystem.getPath(UnixFileSystem.java:312)
	at java.base/java.nio.file.Path.of(Path.java:148)
	at java.base/java.nio.file.Paths.get(Paths.java:69)
	at java.desktop/sun.awt.shell.ShellFolder.getShellFolder(ShellFolder.java:260)
	at java.desktop/javax.swing.filechooser.FileSystemView.getFiles(FileSystemView.java:585)
	at java.desktop/javax.swing.plaf.basic.BasicDirectoryModel$FilesLoader.run0(BasicDirectoryModel.java:306)
	at java.desktop/javax.swing.plaf.basic.BasicDirectoryModel$FilesLoader.run(BasicDirectoryModel.java:295)
	at java.base/java.lang.Thread.run(Thread.java:1583)

Attachments (0)

Change History (3)

comment:1 by taylor.smock, 11 months ago

Resolution: duplicate
Status: newclosed
Summary: Cannot import images when there are special characters in the directory name (e.g. ö,ä,å)InvalidPathException when clicking "Open file" due to a special filename (e.g. ö,ä,å)

Closed as duplicate of #14596.

comment:2 by taylor.smock, 11 months ago

I was hoping that this would be fixed by Java 18 (which uses UTF-8 by default).

Can you copy-paste the exact directory name into this ticket or the other linked ticket?

comment:3 by unnerving@…, 11 months ago

The exact name is

/home/duck/Pictures/Mökkireissu 2024-05-19/

Modify Ticket

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