Opened 7 years ago
Closed 7 years ago
#17509 closed defect (fixed)
[PATCH] NPE at auto_tools.actions.SplittingTool$1.keyPressed
| Reported by: | anonymous | Owned by: | Rub21 |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Plugin auto_tools | Version: | |
| Keywords: | template_report | Cc: |
Description
What steps will reproduce the problem?
What is the expected result?
What happens instead?
Please provide any additional information below. Attach a screenshot if possible.
URL:https://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2019-03-03 00:16:03 +0100 (Sun, 03 Mar 2019)
Build-Date:2019-03-02 23:16:53
Revision:14824
Relative:URL: ^/trunk
Identification: JOSM/1.5 (14824 en) Mac OS X 10.14.3
OS Build number: Mac OS X 10.14.3 (18D109)
Memory Usage: 648 MB / 1820 MB (241 MB allocated, but free)
Java version: 1.8.0_201-b09, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Screen: Display 188945226 1920x1080, Display 69988428 2048x1152
Maximum Screen Size: 2048x1152
VM arguments: [-Djava.security.policy=file:<java.home>/lib/security/javaws.policy, -DtrustProxy=true, -Djnlpx.home=<java.home>/bin, -Djava.security.manager, -Djnlpx.origFilenameArg=${HOME}/Library/Application Support/Oracle/Java/Deployment/cache/6.0/56/1ee8cfb8-43cfc93f, -Djnlpx.remove=false, -Dsun.awt.warmup=true, -Djava.util.Arrays.useLegacyMergeSort=true, -Djnlpx.heapsize=NULL,2048m, -Dmacosx.jnlpx.dock.name=JOSM, -Dmacosx.jnlpx.dock.icon=${HOME}/Library/Application Support/Oracle/Java/Deployment/cache/6.0/25/4c122699-382dd66c.icns, -Djnlp.application.href=https://josm.openstreetmap.de/download/josm.jnlp , -Djnlpx.jvm="<java.home>/bin/java"]
Dataset consistency test: No problems found
Plugins:
+ auto_tools (67)
+ buildings_tools (34904)
+ markseen (11)
+ osm-obj-info (51)
+ utilsplugin2 (34915)
Map paint styles:
+ ${HOME}/Desktop/JOSM Paintstyles and Screenshots/MX_Import.mapcss
+ ${HOME}/Desktop/JOSM Paintstyles and Screenshots/Kaart Paintstyles/Overlapping Ways.mapcss
- https://josm.openstreetmap.de/josmfile?page=Styles/Lane_and_Road_Attributes&zip=1
Validator rules:
- https://raw.githubusercontent.com/KaartGroup/KaartValidator/master/kaart.mexicobrazil.validator.mapcss
Last errors/warnings:
- W: java.io.IOException: Attribution is not loaded yet
- W: java.io.IOException: Attribution is not loaded yet
- W: java.io.IOException: Attribution is not loaded yet
- W: java.io.IOException: Attribution is not loaded yet
- W: Region [WMS_BLOCK_v2] Resetting cache
- W: Region [WMTS_BLOCK_v2] Resetting cache
- W: Conflicts detected - <html>There were 7 conflicts detected.</html>
- E: Handled by bug report queue: java.lang.NullPointerException
- E: Handled by bug report queue: java.lang.NullPointerException
- W: Warning - <html>JOSM could not find information about the following plugins:<ul><li>auto_tools</li><li>utilsplugin2</li><li>markseen</li><li>buildings_tools</li><li>osm-obj-info</li></ul>The plugins are not going to be loaded.</html>
=== REPORTED CRASH DATA ===
BugReportExceptionHandler#handleException:
No data collected.
Warning issued by: BugReportExceptionHandler#handleException
=== STACK TRACE ===
Thread: AWT-EventQueue-2 (36) of javawsApplicationThreadGroup
java.lang.NullPointerException
at org.openstreetmap.josm.plugins.auto_tools.actions.SplittingTool$1.keyPressed(SplittingTool.java:92)
at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:249)
at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:249)
at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:249)
at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:249)
at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:249)
at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:249)
at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:249)
at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:249)
at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:249)
at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:249)
at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:249)
at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:249)
at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:249)
at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:249)
at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:249)
at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:249)
at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:249)
at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:249)
at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:249)
at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:249)
at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:249)
at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:249)
at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:249)
at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:249)
at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:249)
at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:249)
at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:249)
at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:249)
at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:249)
at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:249)
at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:249)
at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:249)
at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:249)
at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:249)
at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:249)
at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:249)
at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:249)
at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:249)
at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:249)
at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:249)
at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:249)
at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:249)
at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:249)
at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:249)
at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:249)
at java.awt.Component.processKeyEvent(Component.java:6497)
at javax.swing.JComponent.processKeyEvent(JComponent.java:2832)
at java.awt.Component.processEvent(Component.java:6316)
at java.awt.Container.processEvent(Container.java:2239)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2297)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1954)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:835)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1103)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:974)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:800)
at java.awt.Component.dispatchEventImpl(Component.java:4760)
at java.awt.Container.dispatchEventImpl(Container.java:2297)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
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:74)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
at java.awt.EventQueue$4.run(EventQueue.java:733)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
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)
Attachments (1)
Change History (7)
comment:1 by , 7 years ago
| Component: | Core → Plugin auto_tools |
|---|---|
| Owner: | changed from to |
| Summary: | Autotools plugin could not update. → NPE at auto_tools.actions.SplittingTool$1.keyPressed |
comment:2 by , 7 years ago
See https://josm.openstreetmap.de/browser/josm/trunk/src/org/openstreetmap/josm/gui/MapFrame.java#L476 for where null can be assigned to mapMode.
comment:3 by , 7 years ago
| Summary: | NPE at auto_tools.actions.SplittingTool$1.keyPressed → [PATCH] NPE at auto_tools.actions.SplittingTool$1.keyPressed |
|---|
comment:4 by , 7 years ago
Thanks, patch applied. auto_tools is one of the few GitHub plugins, so you can also send pull requests if you prefer. For a new release, the plugin must first replace calls to deprecated JOSM API. Would you like to do it?
comment:5 by , 7 years ago
OK. I replaced the calls to the deprecated JOSM API in https://github.com/JOSM/auto-tools/pull/24. It was fairly easy -- all I had to do was replace OsmPrimitive.getFilteredSet with Utils.filteredCollection inside its appropriate constructor. Eclipse was warning about dead code in SplittingTool.java#L138 as well. I left that alone so the patch was more focused though.
if (n != null) { ... } else { if (n != null) { ... } else { ... } }
comment:6 by , 7 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Thanks! Fixed in https://github.com/JOSM/auto-tools/releases/tag/v1.3.2


