FS#38269 - [josm] "java.lang.NullPointerException" on startup

Attached to Project: Community Packages
Opened by AK (Andreaskem) - Tuesday, 24 December 2013, 22:30 GMT
Last edited by Jaroslav Lichtblau (Dragonlord) - Tuesday, 04 February 2014, 21:16 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Jaroslav Lichtblau (Dragonlord)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

I installed josm today and tried to start it via dmenu (I use i3 as my window manager). No window showed up, but a java process was created using quite a few CPU cycles. Nothing happened for a few minutes, so I killed the process. I then tried to start josm on a terminal and got an endlessly repeating "java.lang.NullPointerException" (see below). Again, nothing happened aside from the java process. I cannot get josm to start.

Version: josm 6502-1
Error message:
java.lang.NullPointerException
at sun.awt.X11FontManager.getDefaultPlatformFont(X11FontManager.java:779)
at sun.font.SunFontManager$2.run(SunFontManager.java:432)
at java.security.AccessController.doPrivileged(Native Method)
at sun.font.SunFontManager.<init>(SunFontManager.java:375)
at sun.awt.X11FontManager.<init>(X11FontManager.java:32)
at sun.reflect.GeneratedConstructorAccessor2.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at java.lang.Class.newInstance(Class.java:374)
at sun.font.FontManagerFactory$1.run(FontManagerFactory.java:83)
at java.security.AccessController.doPrivileged(Native Method)
at sun.font.FontManagerFactory.getInstance(FontManagerFactory.java:74)
at java.awt.Font.getFont2D(Font.java:490)
at java.awt.Font.getFamily(Font.java:1219)
at java.awt.Font.getFamily_NoClientCode(Font.java:1193)
at java.awt.Font.getFamily(Font.java:1185)
at sun.swing.SwingUtilities2.displayPropertiesToCSS(SwingUtilities2.java:1335)
at javax.swing.plaf.basic.BasicHTML$BasicDocument.setFontAndColor(BasicHTML.java:365)
at javax.swing.plaf.basic.BasicHTML$BasicDocument.<init>(BasicHTML.java:355)
at javax.swing.plaf.basic.BasicHTML$BasicEditorKit.createDefaultDocument(BasicHTML.java:311)
at javax.swing.plaf.basic.BasicHTML.createHTMLView(BasicHTML.java:54)
at javax.swing.plaf.basic.BasicHTML.updateRenderer(BasicHTML.java:207)
at javax.swing.plaf.basic.BasicLabelUI.installComponents(BasicLabelUI.java:348)
at javax.swing.plaf.basic.BasicLabelUI.installUI(BasicLabelUI.java:325)
at javax.swing.JComponent.setUI(JComponent.java:655)
at javax.swing.JLabel.setUI(JLabel.java:260)
at javax.swing.JLabel.updateUI(JLabel.java:274)
at javax.swing.JLabel.<init>(JLabel.java:163)
at javax.swing.JLabel.<init>(JLabel.java:193)
at org.openstreetmap.josm.tools.BugReportExceptionHandler$1.run(BugReportExceptionHandler.java:96)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:694)
at java.awt.EventQueue$3.run(EventQueue.java:692)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:703)
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)
This task depends upon

Closed by  Jaroslav Lichtblau (Dragonlord)
Tuesday, 04 February 2014, 21:16 GMT
Reason for closing:  Not a bug
Comment by Jaroslav Lichtblau (Dragonlord) - Wednesday, 08 January 2014, 18:27 GMT
jsom 6502-1 starts fine for me, cannot recreate this behavior. Removal of the ~/.josm directory and starting from commandline ends with the same error? Anyone else experiencing this?
Comment by AK (Andreaskem) - Thursday, 09 January 2014, 23:26 GMT
I finally found the right search terms on Google revealing the problem:
http://stackoverflow.com/questions/8109607/headless-continuous-integration-with-jenkins

I needed ttf-dejavu. As soon as I installed the package, josm started without complaints. I guess you would also need fontconfig for it to work, but I had that one installed already.

This seems a little strange to me. Why is ttf-dejavu needed? Why isn't a package providing ttf-font enough (I had ttf-linux-libertine)?

edit:
I guess jenkins, the package referenced in the link, (now?) has an explicit dependence on ttf-dejavu.
https://www.archlinux.org/packages/community/any/jenkins/
Comment by Jaroslav Lichtblau (Dragonlord) - Tuesday, 04 February 2014, 21:14 GMT
I'll be closing this bug, as I guess there is not much more to do.

Loading...