Modify

Opened 9 months ago

Last modified 4 months ago

#13993 reopened defect

NPE in tofix plugin when adding new layer

Reported by: nevw Owned by: Rub21
Priority: critical Milestone:
Component: Plugin tofix Version:
Keywords: template_report Cc:

Description

What steps will reproduce the problem?

  1. JOSM opens ok. I have recorded a gpx today on my etrex30 and on opening it josm says 'you have encountered a bug in josm'
  2. That's as far as I have got.
  3. I tried to open the gpx twice and is same both times

After lodging this report I shall close the 'you have encountered a bug in josm' window and see if all procees ok from there
Behind the 'you have encountered a bug in josm' window I can see the gpx at the bottom of the screen, so maybe ok after closing the error message window.

What is the expected result?

I have always opened my gpx in josm and normally convert to layer, edit out the un-needed bits then save as gpx, convert to gpx and use a plugin to send to osm, then use trace to edit osm along track.

What happens instead?

Page with 'you have encountered a bug in josm' comes on screen asking me to report a bug, which i am dutifully doing now :)

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

URL:http://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2016-11-06 20:18:38 +0100 (Sun, 06 Nov 2016)
Build-Date:2016-11-06 21:45:03
Revision:11223
Relative:URL: ^/trunk

Identification: JOSM/1.5 (11223 en) Mac OS X 10.11.6
Memory Usage: 442 MB / 910 MB (215 MB allocated, but free)
Java version: 1.8.0_111-b14, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Screen: Display 69671616 1680x1050
Maximum Screen Size: 1680x1050
VM arguments: [-Djava.library.path=/Applications/josm-macosx/JOSM.app/Contents/MacOS, -DLibraryDirectory=${HOME}/Library, -DDocumentsDirectory=${HOME}/Documents, -DApplicationSupportDirectory=${HOME}/Library/Application Support, -DCachesDirectory=${HOME}/Library/Caches, -DSandboxEnabled=false, -Dapple.laf.useScreenMenuBar=true, -Dcom.apple.macos.use-file-dialog-packages=true, -Dcom.apple.macos.useScreenMenuBar=true, -Dcom.apple.mrj.application.apple.menu.about.name=JOSM, -Dcom.apple.smallTabs=true]

Plugins:
+ DirectUpload (32699)
+ FastDraw (32938)
+ ImproveWay (9)
+ PicLayer (32796)
+ apache-commons (32699)
+ ejml (32680)
+ geojson (43)
+ geotools (33042)
+ graphview (32796)
+ jts (32699)
+ measurement (32936)
+ opendata (33049)
+ pdfimport (32796)
+ tofix (1470237162)
+ turnrestrictions (32796)
+ utilsplugin2 (32815)

Map paint styles:
- https://josm.openstreetmap.de/josmfile?page=Styles/Cycleways&zip=1
- https://github.com/bastik/mapcss-tools/raw/osm/mapnik2mapcss/osm-results/mapnik.zip
- https://josm.openstreetmap.de/josmfile?page=Styles/Maxspeed&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Noname&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Lane_and_Road_Attributes&zip=1

Last errors/warnings:
- W: Old style SideButton usage for action org.openstreetmap.josm.plugins.tofix.TofixDialog$3@3f7d5780
- W: Old style SideButton usage for action org.openstreetmap.josm.plugins.tofix.TofixDialog$4@1363cfb2
- W: Old style SideButton usage for action org.openstreetmap.josm.plugins.tofix.TofixDialog$5@2a5a43c8
- E: Handled by bug report queue: org.openstreetmap.josm.plugins.PluginException: An error occurred in plugin tofix. Cause: java.lang.reflect.InvocationTargetException. Cause: java.lang.NullPointerException


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

Warning issued by: BugReportExceptionHandler#handleException

=== STACK TRACE ===
Thread: AWT-EventQueue-0 (16) of main
org.openstreetmap.josm.plugins.PluginException: An error occurred in plugin tofix
	at org.openstreetmap.josm.plugins.PluginProxy.handlePluginException(PluginProxy.java:39)
	at org.openstreetmap.josm.plugins.PluginProxy.mapFrameInitialized(PluginProxy.java:50)
	at org.openstreetmap.josm.gui.MainPanel.updateContent(MainPanel.java:78)
	at org.openstreetmap.josm.gui.MainPanel$1.beforeFirstLayerAdded(MainPanel.java:155)
	at org.openstreetmap.josm.gui.layer.MainLayerManager.realAddLayer(MainLayerManager.java:248)
	at org.openstreetmap.josm.gui.layer.LayerManager.lambda$addLayer$0(LayerManager.java:189)
	at org.openstreetmap.josm.gui.util.GuiHelper.runInEDTAndWaitWithException(GuiHelper.java:138)
	at org.openstreetmap.josm.gui.layer.LayerManager.addLayer(LayerManager.java:189)
	at org.openstreetmap.josm.io.GpxImporter.lambda$addLayers$0(GpxImporter.java:124)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.awt.EventQueue$3.run(EventQueue.java:703)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
	at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:184)
	at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:229)
	at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:227)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:227)
	at java.awt.Dialog.show(Dialog.java:1084)
	at java.awt.Component.show(Component.java:1671)
	at java.awt.Component.setVisible(Component.java:1623)
	at java.awt.Window.setVisible(Window.java:1014)
	at java.awt.Dialog.setVisible(Dialog.java:1005)
	at org.openstreetmap.josm.gui.progress.PleaseWaitProgressMonitor.lambda$doBeginTask$2(PleaseWaitProgressMonitor.java:186)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.awt.EventQueue$3.run(EventQueue.java:703)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.openstreetmap.josm.plugins.PluginProxy.mapFrameInitialized(PluginProxy.java:45)
	... 43 more
Caused by: java.lang.NullPointerException
	at org.glassfish.json.JsonObjectBuilderImpl$JsonObjectImpl.getString(JsonObjectBuilderImpl.java:199)
	at org.openstreetmap.josm.plugins.tofix.controller.ListTaskController.getListTasksBean(ListTaskController.java:44)
	at org.openstreetmap.josm.plugins.tofix.TofixDialog.<init>(TofixDialog.java:233)
	at org.openstreetmap.josm.plugins.tofix.TofixPlugin.mapFrameInitialized(TofixPlugin.java:22)
	... 48 more

=== RUNNING THREADS ===
Thread: RemoteControl HTTPS Server (33) of main
java.net.PlainSocketImpl.socketAccept(Native Method)
java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:409)
java.net.ServerSocket.implAccept(ServerSocket.java:545)
sun.security.ssl.SSLServerSocketImpl.accept(SSLServerSocketImpl.java:348)
org.openstreetmap.josm.io.remotecontrol.RemoteControlHttpsServer.run(RemoteControlHttpsServer.java:406)

Thread: TimerQueue (18) of system
sun.misc.Unsafe.park(Native Method)
java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
java.util.concurrent.DelayQueue.take(DelayQueue.java:211)
javax.swing.TimerQueue.run(TimerQueue.java:174)
java.lang.Thread.run(Thread.java:745)

Thread: Timer-1 (40) of main
java.lang.Object.wait(Native Method)
java.lang.Object.wait(Object.java:502)
java.util.TimerThread.mainLoop(Timer.java:526)
java.util.TimerThread.run(Timer.java:505)

Thread: Java2D Disposer (13) of system
java.lang.Object.wait(Native Method)
java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:143)
java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:164)
sun.java2d.Disposer.run(Disposer.java:148)
java.lang.Thread.run(Thread.java:745)

Thread: Map Status Collector (41) of main
sun.misc.Unsafe.park(Native Method)
java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
org.openstreetmap.josm.gui.MapStatus$Collector.run(MapStatus.java:380)
java.lang.Thread.run(Thread.java:745)

Thread: message-notifier-0 (36) of main
sun.misc.Unsafe.park(Native Method)
java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093)
java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809)
java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
java.lang.Thread.run(Thread.java:745)

Thread: RemoteControl HTTP Server (30) of main
java.net.PlainSocketImpl.socketAccept(Native Method)
java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:409)
java.net.ServerSocket.implAccept(ServerSocket.java:545)
java.net.ServerSocket.accept(ServerSocket.java:513)
org.openstreetmap.josm.io.remotecontrol.RemoteControlHttpServer.run(RemoteControlHttpServer.java:103)

Thread: File Watcher (9) of main
sun.misc.Unsafe.park(Native Method)
java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
java.util.concurrent.LinkedBlockingDeque.takeFirst(LinkedBlockingDeque.java:492)
java.util.concurrent.LinkedBlockingDeque.take(LinkedBlockingDeque.java:680)
sun.nio.fs.AbstractWatchService.take(AbstractWatchService.java:118)
org.openstreetmap.josm.io.FileWatcher.processEvents(FileWatcher.java:114)
org.openstreetmap.josm.io.FileWatcher$$Lambda$4/772777427.run(Unknown Source)
java.lang.Thread.run(Thread.java:745)

Thread: Signal Dispatcher (4) of system

Thread: AWT-EventQueue-0 (16) of main
Stacktrace see above.

Thread: Keep-Alive-Timer (35)
java.lang.Thread.sleep(Native Method)
sun.net.www.http.KeepAliveCache.run(KeepAliveCache.java:172)
java.lang.Thread.run(Thread.java:745)

Thread: RemoteControl HTTPS Server (31) of main
java.net.PlainSocketImpl.socketAccept(Native Method)
java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:409)
java.net.ServerSocket.implAccept(ServerSocket.java:545)
sun.security.ssl.SSLServerSocketImpl.accept(SSLServerSocketImpl.java:348)
org.openstreetmap.josm.io.remotecontrol.RemoteControlHttpsServer.run(RemoteControlHttpsServer.java:406)

Thread: AWT-Shutdown (11) of system
java.lang.Object.wait(Native Method)
java.lang.Object.wait(Object.java:502)
sun.awt.AWTAutoShutdown.run(AWTAutoShutdown.java:295)
java.lang.Thread.run(Thread.java:745)

Thread: Reference Handler (2) of system
java.lang.Object.wait(Native Method)
java.lang.Object.wait(Object.java:502)
java.lang.ref.Reference.tryHandlePending(Reference.java:191)
java.lang.ref.Reference$ReferenceHandler.run(Reference.java:153)

Thread: RemoteControl HTTP Server (29) of main
java.net.PlainSocketImpl.socketAccept(Native Method)
java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:409)
java.net.ServerSocket.implAccept(ServerSocket.java:545)
java.net.ServerSocket.accept(ServerSocket.java:513)
org.openstreetmap.josm.io.remotecontrol.RemoteControlHttpServer.run(RemoteControlHttpServer.java:103)

Thread: WeakCollectionCleaner (24) of main
java.lang.Object.wait(Native Method)
java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:143)
java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:164)
org.geotools.util.WeakCollectionCleaner.run(WeakCollectionCleaner.java:77)

Thread: Java2D Queue Flusher (12) of system
java.lang.Object.wait(Native Method)
sun.java2d.opengl.OGLRenderQueue$QueueFlusher.run(OGLRenderQueue.java:203)

Thread: Timer-0 (32) of main
java.lang.Object.wait(Native Method)
java.util.TimerThread.mainLoop(Timer.java:552)
java.util.TimerThread.run(Timer.java:505)

Thread: Finalizer (3) of system
java.lang.Object.wait(Native Method)
java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:143)
java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:164)
java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:209)

Thread: Nashorn AST Serializer (25) of main
sun.misc.Unsafe.park(Native Method)
java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
java.util.concurrent.LinkedBlockingDeque.pollFirst(LinkedBlockingDeque.java:522)
java.util.concurrent.LinkedBlockingDeque.poll(LinkedBlockingDeque.java:684)
java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1066)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
java.lang.Thread.run(Thread.java:745)

Thread: GT authority factory disposer (23) of main
java.lang.Object.wait(Native Method)
java.util.TimerThread.mainLoop(Timer.java:552)
java.util.TimerThread.run(Timer.java:505)

Thread: main-worker-0 (39) of main
java.lang.Object.wait(Native Method)
java.lang.Object.wait(Object.java:502)
java.awt.EventQueue.invokeAndWait(EventQueue.java:1315)
java.awt.EventQueue.invokeAndWait(EventQueue.java:1296)
org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:98)
org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:141)
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
java.util.concurrent.FutureTask.run(FutureTask.java:266)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
java.lang.Thread.run(Thread.java:745)

Thread: DestroyJavaVM (37) of main

Thread: AppKit Thread (10) of system

Attachments (2)

2016-11-17-Current.gpx (288.6 KB) - added by nevw 9 months ago.
screenshot of error message and the gpx
Screen Shot 2016-11-17 at 7.44.11 PM.png (195.8 KB) - added by nevw 9 months ago.

Download all attachments as: .zip

Change History (29)

Changed 9 months ago by nevw

Attachment: 2016-11-17-Current.gpx added

screenshot of error message and the gpx

Changed 9 months ago by nevw

comment:1 Changed 9 months ago by Klumbumbus

Component: CorePlugin tofix
Owner: changed from team to Rub21

comment:2 Changed 9 months ago by Klumbumbus

Deinstalling the tofix plugin until it is fixed should help.

comment:3 Changed 9 months ago by Rub21

Thank you to report this!! We are working to fix this issue.

comment:4 Changed 9 months ago by Klumbumbus

Summary: Josm reports bug on opening gpxNPE in tofix plugin when opening gpx

comment:5 Changed 8 months ago by skyper

Ticket #14052 has been marked as a duplicate of this ticket.

comment:6 Changed 5 months ago by stoecker

Ticket #13994 has been marked as a duplicate of this ticket.

comment:7 Changed 5 months ago by stoecker

Ticket #14507 has been marked as a duplicate of this ticket.

comment:8 Changed 5 months ago by stoecker

Ticket #14505 has been marked as a duplicate of this ticket.

comment:9 Changed 5 months ago by stoecker

Ticket #14052 has been marked as a duplicate of this ticket.

comment:10 Changed 5 months ago by stoecker

Summary: NPE in tofix plugin when opening gpxNPE in tofix plugin when adding new layer

There are multiple different reports, but it boils down to the fact that tofix does not handle adding a new layer properly.

comment:11 Changed 5 months ago by stoecker

Priority: normalmajor

comment:12 Changed 5 months ago by stoecker

Ticket #14508 has been marked as a duplicate of this ticket.

comment:13 Changed 5 months ago by stoecker

Ticket #14506 has been marked as a duplicate of this ticket.

comment:14 Changed 5 months ago by stoecker

Ticket #14511 has been marked as a duplicate of this ticket.

comment:15 Changed 5 months ago by stoecker

Ticket #14509 has been marked as a duplicate of this ticket.

comment:16 Changed 5 months ago by stoecker

Ticket #14510 has been marked as a duplicate of this ticket.

comment:17 Changed 5 months ago by stoecker

Ticket #14512 has been marked as a duplicate of this ticket.

comment:18 Changed 5 months ago by stoecker

Could someone please fix this? Is this plugin still maintained?

comment:19 Changed 5 months ago by Don-vip

Priority: majorcritical

what the hell happened? 10 duplicates in 1 day?!

comment:20 Changed 5 months ago by Don-vip

Resolution: fixed
Status: newclosed

comment:21 Changed 5 months ago by stoecker

Ticket #14549 has been marked as a duplicate of this ticket.

comment:22 Changed 5 months ago by stoecker

Resolution: fixed
Status: closedreopened

The new report is for recent version 277.

comment:23 Changed 5 months ago by stoecker

Ticket #14583 has been marked as a duplicate of this ticket.

comment:24 Changed 5 months ago by stoecker

Ticket #14587 has been marked as a duplicate of this ticket.

comment:25 Changed 5 months ago by stoecker

Ticket #14601 has been marked as a duplicate of this ticket.

comment:26 Changed 5 months ago by stoecker

There will be no updates, as the new version number 277 is much much smaller than the old number. JOSM does not "downgrade" to new versions. It upgrades.

comment:27 Changed 4 months ago by samely

Can someone please help me to get this error? I've been testing it, but I can't replicate this scenario.

Modify Ticket

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

Add Comment


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

 
Note: See TracTickets for help on using tickets.