Modify

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#8697 closed defect (fixed)

Cannot restart after having installed a new plugin

Reported by: Don-vip Owned by: Don-vip
Priority: normal Milestone:
Component: Core restart Version:
Keywords: plugins Cc:

Description

What steps will reproduce the problem?

  1. Start JOSM with a blank profile
  2. Go to preferences, plugins, download list
  3. Install measurement plugin
  4. Press OK
  5. JOSM asks for restart, press restart button
  6. JOSM does not restart (silent NPE)
Build-Date: 2013-05-09 13:54:19
Revision: 5949
Is-Local-Build: true

Identification: JOSM/1.5 (5949 SVN fr) Windows 7 64-Bit
Memory Usage: 48 MB / 247 MB (21 MB allocated, but free)
Java version: 1.6.0_24, Sun Microsystems Inc., Java HotSpot(TM) Client VM
VM arguments: [-Dfile.encoding=Cp1252]

Plugin: measurement
java.io.IOException: Error while trying to restart the application
	at org.openstreetmap.josm.actions.RestartAction.restartJOSM(RestartAction.java:97)
	at org.openstreetmap.josm.actions.RestartAction.actionPerformed(RestartAction.java:43)
	at org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane$4.run(PreferenceTabbedPane.java:309)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:642)
	at java.awt.EventQueue.access$000(EventQueue.java:85)
	at java.awt.EventQueue$1.run(EventQueue.java:603)
	at java.awt.EventQueue$1.run(EventQueue.java:601)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:612)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: java.lang.NullPointerException
	at org.openstreetmap.josm.actions.RestartAction.restartJOSM(RestartAction.java:67)
	... 16 more

Attachments (0)

Change History (11)

comment:1 by skyper, 12 years ago

Work for me on Debian (did install all three plugins):

Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2013-05-09 01:34:44
Last Changed Author: Don-vip
Revision: 5947
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2013-05-09 03:29:40 +0200 (Thu, 09 May 2013)
Last Changed Rev: 5947

Identification: JOSM/1.5 (5947 de) Linux Debian GNU/Linux 7.0 (wheezy)
Memory Usage: 158 MB / 672 MB (123 MB allocated, but free)
Java version: 1.6.0_27, Sun Microsystems Inc., OpenJDK 64-Bit Server VM

Plugin: reverter (29561)
Plugin: undelete (29555)
Plugin: utilsplugin2 (29435)

comment:2 by Don-vip, 12 years ago

Works for me too with latest Oracle Java VMs (6u45/7u21)
I only see this with oldest JVM 6u24 on my office laptop (I'm stuck with this old version of Java, I'll check why this property is not accessible)
I will also check if we can use this feature with IBM JVM.

comment:3 by Don-vip, 12 years ago

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

comment:4 by Don-vip, 12 years ago

Funny, it works fine with IBM JVM, but not with this oldest Oracle JVM. It looks like this property has only been made visible to Java applications starting from HotSpot VM 20 (JVM 6u25) and that IBM JVM mimics this behaviour since.

comment:5 by Don-vip, 12 years ago

Resolution: fixed
Status: assignedclosed

In 5951/josm:

fix #8697 - Disable restart action with JVMs that do not provide sun.java.command system property (ex: JDK 6u24)

comment:6 by malenki, 12 years ago

Resolution: fixed
Status: closedreopened

I can still confirm this bug on r5954 starting without a ~/.josm and installing one plugin.
This bug also prevents to start JOSM with my up-to-now used ~/.josm with all the plugins I normally use.
on
debian sid 3.9-1.towo-siduction-amd64
java version "1.7.0_21"
OpenJDK Runtime Environment (IcedTea 2.3.9) (7u21-2.3.9-4)
OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode

With OpenJDK6 it doesn't work either:
java version "1.6.0_27"
OpenJDK Runtime Environment (IcedTea6 1.12.5) (6b27-1.12.5-1)
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)

btw: Clicking the "report bug"-button with this issue gives just one more nullpointer exception:

Lokale Revision ist 5954, neueste verfügbare Revision ist 5950 - benutze lokale Revision 5954
starte josm...
josm wurde mit mit Prozess-ID 11005 gestartet
java.util.concurrent.ExecutionException: java.lang.NoSuchMethodError: org.openstreetmap.josm.tools.Utils.close(Ljava/io/InputStream;)V
	at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:252)
	at java.util.concurrent.FutureTask.get(FutureTask.java:111)
	at org.openstreetmap.josm.plugins.PluginHandler.loadLocallyAvailablePluginInformation(PluginHandler.java:632)
	at org.openstreetmap.josm.plugins.PluginHandler.buildListOfPluginsToLoad(PluginHandler.java:697)
	at org.openstreetmap.josm.gui.MainApplication.main(MainApplication.java:332)
Caused by: java.lang.NoSuchMethodError: org.openstreetmap.josm.tools.Utils.close(Ljava/io/InputStream;)V
	at org.openstreetmap.josm.plugins.ReadLocalPluginInformationTask.processLocalPluginInformationFile(ReadLocalPluginInformationTask.java:185)
	at org.openstreetmap.josm.plugins.ReadLocalPluginInformationTask.scanSiteCacheFiles(ReadLocalPluginInformationTask.java:89)
	at org.openstreetmap.josm.plugins.ReadLocalPluginInformationTask.scanLocalPluginRepository(ReadLocalPluginInformationTask.java:161)
	at org.openstreetmap.josm.plugins.ReadLocalPluginInformationTask.realRun(ReadLocalPluginInformationTask.java:216)
	at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:82)
	at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:145)
	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:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:722)
java.lang.NullPointerException
	at org.openstreetmap.josm.plugins.PluginHandler.buildListOfPluginsToLoad(PluginHandler.java:701)
	at org.openstreetmap.josm.gui.MainApplication.main(MainApplication.java:332)
java.lang.NullPointerException
	at org.openstreetmap.josm.actions.ShowStatusReportAction.getReportHeader(ShowStatusReportAction.java:101)
	at org.openstreetmap.josm.tools.BugReportExceptionHandler$1.run(BugReportExceptionHandler.java:118)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:727)
	at java.awt.EventQueue.access$200(EventQueue.java:103)
	at java.awt.EventQueue$3.run(EventQueue.java:688)
	at java.awt.EventQueue$3.run(EventQueue.java:686)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:697)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

Last edited 12 years ago by malenki (previous) (diff)

comment:7 by malenki, 12 years ago

PS: This bug got invented with r5948.
The last working version is r5947.

comment:8 by Don-vip, 12 years ago

Resolution: fixed
Status: reopenedclosed

This has absolutely nothing to do with this ticket !
Looks like a plugin has not been recompiled with latest core changes, and its jar still references old JOSM code.
Please create another ticket for this bug and tell us what plugin did you install.

comment:9 by Don-vip, 12 years ago

Before creating a new ticket, make sure your local environment is clean, it could be also your local project that has not been correctly compiled.
The second NPE has been fixed in r5955.

in reply to:  9 comment:10 by malenki, 12 years ago

Replying to Don-vip:

Before creating a new ticket, make sure your local environment is clean, it could be also your local project that has not been correctly compiled.

That was the case. Great thing hunting a (more or less) self inflicted bug. -.-

comment:11 by Don-vip, 12 years ago

Well, the second NPE was a real bug :) Thanks for the report !

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.