Modify ↓
Opened 10 years ago
Closed 10 years ago
#11158 closed defect (duplicate)
Exception when running eg. r8101 from josm-custom.jar
Reported by: | mstock | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Core | Version: | |
Keywords: | template_report | Cc: |
Description (last modified by )
What steps will reproduce the problem?
- Build r8101 with
ant dist
- Start JOSM using the
dist/josm-custom.jar
- Eg. download an area with data
What is the expected result?
The data is displayed,
What happens instead?
An error message is displayed, a stacktrace is printed to the console, and the UI looks pretty broken.
Potential fix
The following change seemed to fix the problem for me:
-
src/org/openstreetmap/josm/tools/ImageProvider.java
708 708 709 709 if (subdir == null) { 710 710 subdir = ""; 711 } else if (!subdir.isEmpty() ) {711 } else if (!subdir.isEmpty() && ! subdir.endsWith("/")) { 712 712 subdir += "/"; 713 713 } 714 714 String[] extensions;
Without this change, I noticed that the pencil
was searched with paths like dialogs/mappaint//pencil.png
, and it seems that when running from the jar, the double slash is causing problems.
Additional information from JOSM
Build-Date: 2015-02-23 14:06:06 Revision: 8101 Is-Local-Build: true Identification: JOSM/1.5 (8101 SVN de) Linux Debian GNU/Linux 7.8 (wheezy) Memory Usage: 344 MB / 1767 MB (190 MB allocated, but free) Java version: 1.7.0_75, Oracle Corporation, OpenJDK 64-Bit Server VM Java package: openjdk-7-jre:amd64-7u75-2.5.4-1~deb7u1 Dataset consistency test: No problems found Plugins: - OpeningHoursEditor (30962) - editgpx (30892) - mirrored_download (30962) - wikipedia (30892) Last errors/warnings: - E: Id 'openpt_map' is not unique - used by 'OpenPT-Karte (Einblendung)' and 'OpenPT-Karte (Einblendung)'! - E: Fehler beim Laden des Bildes 'presets/vending_machine.png' - W: Could not get presets icon presets/vending_machine.png - E: java.lang.RuntimeException: Fehler: Das Bild 'pencil.???' konnte nicht geladen werden. Das ist ein schwerwiegendes Konfigurationsproblem. - E: java.lang.RuntimeException: Fehler: Das Bild 'pencil.???' konnte nicht geladen werden. Das ist ein schwerwiegendes Konfigurationsproblem. java.lang.RuntimeException: Fehler: Das Bild 'pencil.???' konnte nicht geladen werden. Das ist ein schwerwiegendes Konfigurationsproblem. at org.openstreetmap.josm.tools.ImageProvider.getResource(ImageProvider.java:541) at org.openstreetmap.josm.tools.ImageProvider.get(ImageProvider.java:521) at org.openstreetmap.josm.gui.mappaint.StyleSource.getIcon(StyleSource.java:183) at org.openstreetmap.josm.gui.dialogs.MapPaintDialog$StyleSourceRenderer.getTableCellRendererComponent(MapPaintDialog.java:310) at javax.swing.JTable.prepareRenderer(JTable.java:5736) at javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:2108) at javax.swing.plaf.basic.BasicTableUI.paintCells(BasicTableUI.java:2010) at javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:1806) at javax.swing.plaf.ComponentUI.update(ComponentUI.java:161) at javax.swing.JComponent.paintComponent(JComponent.java:770) at javax.swing.JComponent.paint(JComponent.java:1046) at javax.swing.JComponent.paintChildren(JComponent.java:879) at javax.swing.JComponent.paint(JComponent.java:1055) at javax.swing.JComponent.paintChildren(JComponent.java:879) at javax.swing.JComponent.paint(JComponent.java:1055) at javax.swing.JViewport.paint(JViewport.java:731) at javax.swing.JComponent.paintChildren(JComponent.java:879) at javax.swing.JComponent.paint(JComponent.java:1055) at javax.swing.JComponent.paintChildren(JComponent.java:879) at javax.swing.JComponent.paint(JComponent.java:1055) at javax.swing.JComponent.paintChildren(JComponent.java:879) at javax.swing.JComponent.paint(JComponent.java:1055) at javax.swing.JComponent.paintChildren(JComponent.java:879) at org.openstreetmap.josm.gui.widgets.MultiSplitPane.paintChildren(MultiSplitPane.java:206) at javax.swing.JComponent.paint(JComponent.java:1055) at javax.swing.JComponent.paintChildren(JComponent.java:879) at javax.swing.JComponent.paint(JComponent.java:1055) at javax.swing.JComponent.paintChildren(JComponent.java:879) at javax.swing.JSplitPane.paintChildren(JSplitPane.java:1047) at javax.swing.JComponent.paint(JComponent.java:1055) at javax.swing.JComponent.paintChildren(JComponent.java:879) at javax.swing.JComponent.paint(JComponent.java:1055) at javax.swing.JComponent.paintChildren(JComponent.java:879) at javax.swing.JComponent.paint(JComponent.java:1055) at javax.swing.JComponent.paintChildren(JComponent.java:879) at javax.swing.JComponent.paint(JComponent.java:1055) at javax.swing.JComponent.paintChildren(JComponent.java:879) at javax.swing.JComponent.paint(JComponent.java:1055) at javax.swing.JLayeredPane.paint(JLayeredPane.java:585) at javax.swing.JComponent.paintChildren(JComponent.java:879) at javax.swing.JComponent.paintToOffscreen(JComponent.java:5219) at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1529) at javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1452) at javax.swing.RepaintManager.paint(RepaintManager.java:1249) at javax.swing.JComponent.paint(JComponent.java:1032) at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:39) at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:78) at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:115) at java.awt.Container.paint(Container.java:1967) at java.awt.Window.paint(Window.java:3877) at javax.swing.RepaintManager$3.run(RepaintManager.java:819) at javax.swing.RepaintManager$3.run(RepaintManager.java:796) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:796) at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:769) at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:718) at javax.swing.RepaintManager.access$1100(RepaintManager.java:62) at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1677) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:312) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:738) at java.awt.EventQueue.access$300(EventQueue.java:103) at java.awt.EventQueue$3.run(EventQueue.java:699) at java.awt.EventQueue$3.run(EventQueue.java:697) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:708) 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)
Attachments (0)
Change History (2)
comment:1 by , 10 years ago
Description: | modified (diff) |
---|
comment:2 by , 10 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Closed as duplicate of #11155.