Modify

Opened 9 years ago

Closed 8 years ago

Last modified 7 years ago

#13100 closed defect (fixed)

NPE on launch

Reported by: dobratzp Owned by: team
Priority: major Milestone: 17.05
Component: Core Version:
Keywords: template_report Cc: jpn@…, alex@…

Description

What steps will reproduce the problem?

  1. Start JOSM by running: java -Xmx2048M -jar josm-tested.jar
  2. Get NPE

What is the expected result?

Not getting a NPE

What happens instead?

Get NPE

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-06-04 17:28:58 +0200 (Sat, 04 Jun 2016)
Build-Date:2016-06-04 15:31:27
Revision:10327
Relative:URL: ^/trunk

Identification: JOSM/1.5 (10327 en) Mac OS X 10.11.5
Memory Usage: 650 MB / 1820 MB (463 MB allocated, but free)
Java version: 1.8.0_45-b14, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM

Plugins:
- FixAddresses (32158)
- Mapillary (32158)
- OpeningHoursEditor (32158)
- apache-commons (32158)
- apache-http (32158)
- reverter (32158)
- terracer (32158)
- utilsplugin2 (32158)

Map paint styles:
- https://josm.openstreetmap.de/josmfile?page=Styles/Maxspeed&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/MaxspeedIcons&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Traffic_signs&zip=1
- https://raw.githubusercontent.com/species/josm-preset-traffic_sign_direction/master/direction.mapcss

Last errors/warnings:
- W: Failed to parse Mappaint styles from 'https://josm.openstreetmap.de/josmfile?page=Styles/Traffic_signs&zip=1'. Error was: Reached end of file while parsing
- E: org.openstreetmap.josm.gui.mappaint.mapcss.parsergen.ParseException: Reached end of file while parsing
- W: Initializing map style https://josm.openstreetmap.de/josmfile?page=Styles/Traffic_signs&zip=1 completed in 4 ms (2 errors, 0 warnings)
- E: java.lang.reflect.InvocationTargetException. Cause: java.lang.NullPointerException
- E: java.lang.NullPointerException

java.lang.NullPointerException
	at javax.swing.BoxLayout.preferredLayoutSize(BoxLayout.java:302)
	at javax.swing.JToolBar$DefaultToolBarLayout.preferredLayoutSize(JToolBar.java:771)
	at java.awt.Container.preferredSize(Container.java:1794)
	at java.awt.Container.getPreferredSize(Container.java:1778)
	at javax.swing.JComponent.getPreferredSize(JComponent.java:1664)
	at java.awt.BorderLayout.layoutContainer(BorderLayout.java:815)
	at java.awt.Container.layout(Container.java:1508)
	at java.awt.Container.doLayout(Container.java:1497)
	at java.awt.Container.validateTree(Container.java:1693)
	at java.awt.Container.validateTree(Container.java:1702)
	at java.awt.Container.validateTree(Container.java:1702)
	at java.awt.Container.validateTree(Container.java:1702)
	at java.awt.Container.validate(Container.java:1628)
	at java.awt.Window.dispatchEventImpl(Window.java:2748)
	at java.awt.Component.dispatchEvent(Component.java:4703)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
	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$1.doIntersectionPrivilege(ProtectionDomain.java:75)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.awt.EventQueue$4.run(EventQueue.java:731)
	at java.awt.EventQueue$4.run(EventQueue.java:729)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
	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)

Change History (28)

comment:1 by Don-vip, 9 years ago

Hi,
Thanks for the bug report. It is difficult to reproduce and understand, so I need your help.
Can you please:

  1. tell us if the issue is reproducible always
  2. attach a screenshot of JOSM when the bug appears
  3. try to upgrade to latest java (8u91) and see if the problem's still here
  4. start josm in detailed debug mode (java -jar josm-tested.jar --trace) and attach the complete console output

Thanks

comment:2 by Don-vip, 9 years ago

Owner: changed from team to dobratzp
Status: newneedinfo

comment:3 by Don-vip, 9 years ago

Resolution: othersoftware
Status: needinfoclosed

comment:4 by Don-vip, 9 years ago

Resolution: othersoftware
Status: closedreopened

comment:5 by Don-vip, 9 years ago

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

comment:6 by Don-vip, 8 years ago

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

comment:7 by Don-vip, 8 years ago

Cc: jpn@… added
Owner: changed from dobratzp to team
Status: reopenednew

comment:8 by skyper, 8 years ago

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

comment:9 by skyper, 8 years ago

Cc: alex@… added

comment:10 by skyper, 8 years ago

#13691 is similar

comment:11 by Don-vip, 8 years ago

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

comment:12 by Don-vip, 8 years ago

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

comment:13 by Don-vip, 8 years ago

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

comment:14 by Don-vip, 8 years ago

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

comment:15 by Don-vip, 8 years ago

Priority: normalmajor

comment:16 by bastiK, 8 years ago

Problem could be in Main.initialize(), which runs in Main thread:

        // creating toolbar
        contentPanePrivate.add(toolbar.control, BorderLayout.NORTH);
[...]
        new InitializationTask(tr("Updating user interface"), () -> {
            toolbar.refreshToolbarControl();
            toolbar.control.updateUI();
            contentPanePrivate.updateUI();
        }).call();

We had this before where EDT violation on Main thread could never be reproduced on Linux, but only showed on Mac OS.

comment:17 by bastiK, 8 years ago

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

comment:18 by bastiK, 8 years ago

Resolution: fixed
Status: newclosed

In 11898/josm:

fixed #13100 - NPE on launch

comment:19 by Klumbumbus, 8 years ago

Milestone: 17.04

comment:20 by bastiK, 8 years ago

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

comment:21 by bastiK, 8 years ago

Resolution: fixed
Status: closedreopened

New report for r12039 -> not fixed in [11898].

comment:22 by bastiK, 8 years ago

I noticed there are lots of EDT violations deep in the startup initializers. [11898] just fixes the most blatant one related to the toolbar.

comment:23 by Don-vip, 8 years ago

Milestone: 17.0417.05

in reply to:  22 comment:24 by michael2402, 8 years ago

Replying to bastiK:

I noticed there are lots of EDT violations deep in the startup initializers.

You can add a GuiHelper.assertCallFromEdt() after fixing them, just to make sure nobody changes it back accidentally.

comment:25 by bastiK, 8 years ago

Resolution: fixed
Status: reopenedclosed

In 12135/josm:

fixed #13100 - NPE on launch (2)

comment:26 by bastiK, 8 years ago

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

comment:27 by Don-vip, 7 years ago

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

comment:28 by Don-vip, 7 years ago

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

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.