Modify

Ticket #4503 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

RuntimeException when trying to load file with unknown extension

Reported by: WrongWayGC Owned by: team
Priority: normal Component: Core
Version: latest Keywords: RuntimeException
Cc:

Description

The following exception is thrown in my installation since several revisions when starting josm. Beside the exception dialog being shown nothing bad seems to happen.

Trace in terminal: java.lang.RuntimeException

at org.openstreetmap.josm.actions.OpenFileAction$OpenFileTask.realRun(OpenFileAction.java:141) at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:81) at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:123) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:636)

java.lang.RuntimeException

at org.openstreetmap.josm.actions.OpenFileAction$OpenFileTask.realRun(OpenFileAction.java:141) at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:81) at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:123) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:636)

java version "1.6.0_0" OpenJDK Runtime Environment (IcedTea6 1.6.1) (6b16-1.6.1-3ubuntu1) OpenJDK Server VM (build 14.0-b16, mixed mode)

Plugins: Plugin openstreetbugs Plugin wmsplugin Plugin editgpx Plugin tageditor Plugin validator Plugin slippymap Plugin routing Plugin multipoly

Attachments

Change History

comment:1 Changed 2 years ago by bastiK

This happens if you start josm from the command line and add a file that has an unknown extension:
E.g. java -jar josm-latest.jar test.exe

How do you start josm? Do you use a script?

comment:2 Changed 2 years ago by mjulius

In any case, just throwing an exception without any explanation is certainly not the right thing to do.

comment:3 Changed 2 years ago by WrongWayGC

  • Status changed from new to closed
  • Resolution set to invalid

Okay, I could trace this down to me using the following script, where the jar is given first:

#!/bin/sh java -jar josm-latest.jar -Xmx512m -Dsun.java2d.opengl=true

When I put the -jar option last, the problem is gone. This is clearly my fault as java -h says that the -jar option has to go last (for whatever reason?). The proper way is:

#!/bin/sh java -Xmx512m -Dsun.java2d.opengl=true -jar josm-latest.jar

Excuse me for bringing up this bogous bug report and thank you very much for quickly helping and pointing me towards the proper solution.

comment:4 Changed 2 years ago by bastiK

  • Status changed from closed to reopened
  • Resolution invalid deleted

comment:5 Changed 2 years ago by mjulius

  • Summary changed from Rev 2959 RuntimeException in org.openstreetmap.josm.actions.OpenFileAction$OpenFileTask.realRun to RuntimeException when trying to load file with unknown extension

comment:6 Changed 2 years ago by bastiK

  • Status changed from reopened to closed
  • Resolution set to fixed

fixed in [2980] (by Gubaer)

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.