Modify

Opened 4 years ago

Closed 4 years ago

#2782 closed defect (fixed)

nullpointerexception when downloading osm data around track

Reported by: pweemeeuw@… Owned by: jttt
Priority: major Component: Core
Version: Keywords:
Cc:

Description (last modified by stoecker)

steps:

  • start up osm
  • load gpx track (2.2 M)
  • select download from osm along this track (various settings: 50m around track, 50 sq km)

observed both for latest @ 20090628 and version 1566
on 901 eee pc (1 Mb memory; ubuntu 0904)

Path: trunk
URL: http://josm.openstreetmap.de/svn/trunk
Repository Root: http://josm.openstreetmap.de/svn
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Revision: 1708
Node Kind: directory
Last Changed Author: stoecker
Last Changed Rev: 1708
Last Changed Date: 2009-06-27 15:59:15 +0200 (Sat, 27 Jun 2009)

Memory Usage: 50 MB / 508 MB (19 MB allocated, but free)
Java version: 1.6.0_0

Plugins: colorschemelivegpsroutingslippymapsurveyorusertoolsutilspluginvalidator
Plugin colorscheme Version: 14233
Plugin livegps Version: 14120
Plugin routing Version: 14404
Plugin slippymap Version: 14015
Plugin usertools Version: 14125
Plugin utilsplugin Version: 14356
Plugin validator Version: 14123
Plugin surveyor Version: 14233

java.lang.NullPointerException

at java.awt.Container.createHierarchyEvents(Container.java:1415)
at java.awt.Container.createHierarchyEvents(Container.java:1415)
at java.awt.Container.createHierarchyEvents(Container.java:1415)
at java.awt.Container.createHierarchyEvents(Container.java:1415)
at java.awt.Dialog.conditionalShow(Dialog.java:959)
at java.awt.Dialog.show(Dialog.java:1061)
at java.awt.Component.show(Component.java:1464)
at java.awt.Component.setVisible(Component.java:1416)
at java.awt.Window.setVisible(Window.java:842)
at java.awt.Dialog.setVisible(Dialog.java:1011)
at org.openstreetmap.josm.gui.PleaseWaitRunnable$3.run(PleaseWaitRunnable.java:96)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:226)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:602)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:138)

Attachments (2)

2.3.1.gpx.gz (4.5 KB) - added by pweemeeuw@… 4 years ago.
gpx fragment still exhibiting the problem
progress.patch (162.5 KB) - added by jttt 4 years ago.

Download all attachments as: .zip

Change History (16)

comment:1 in reply to: ↑ description Changed 4 years ago by anonymous

forgot one step in the description above:
delete slippy map layer after loading the gpx track.
I can provide the gpx track as well, if needed.

comment:2 Changed 4 years ago by stoecker

  • Description modified (diff)
  • Owner changed from team to pweemeeuw@…
  • Status changed from new to needinfo

Yes, please provide track. But try updating plugins, restart and retry to produce bug before you do so. Some of them are outdated a lot.

comment:3 Changed 4 years ago by pweemeeuw@…

I disabled all plugins, and reduced the gpx file to 3% of the original.
I chose the parameters: 1 sq km, withing 50m of track.
I attach the reduced gpx file that still exhibits the problem.

Changed 4 years ago by pweemeeuw@…

gpx fragment still exhibiting the problem

comment:4 Changed 4 years ago by anonymous

  • Owner changed from pweemeeuw@… to stoecker
  • Status changed from needinfo to new

comment:5 Changed 4 years ago by jttt

This is caused by PleaseWaitDlg being accessed from different threads at the same time.

I don't think we can make everybody use EventQueue.invokeLater when manipulating Main.pleasWaitDlg, so probably the dialog instance should be hidden and manipulation allowed only using prepared methods. Unfortunatelly that will require a lot of code refactoring (including plugins). At least BoundingBoxDownloader should be fixed as it has caused the exception in this case.

The bug is not related to download osm data around track, it's just coincidence that PleaseWaitDlg is used a lot in this function so probabily that this happen is higher.

comment:6 Changed 4 years ago by stoecker

Actually currently is a good time for such a refactoring as most plugins have been broken anyway.

I once wanted to do that refactoring but then I had other things to do.

comment:7 Changed 4 years ago by jttt

  • Owner changed from stoecker to jttt

I'm working on a patch...

comment:8 Changed 4 years ago by jttt

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

comment:9 Changed 4 years ago by jttt

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

comment:10 Changed 4 years ago by jttt

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

comment:11 Changed 4 years ago by stoecker

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

comment:12 Changed 4 years ago by stoecker

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

Changed 4 years ago by jttt

comment:13 Changed 4 years ago by jttt

Here is a patch that replaces Main.pleaseWaitDialog with ProgressMonitor interface. It will require changes in plugins and also something is probably broken as I had to change lots of files.

comment:14 Changed 4 years ago by anonymous

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

Fixed in r1811

Add 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.