Opened 7 years ago
Last modified 7 years ago
#17338 closed defect
Missing and Bad Anchor in Help Browser throws NPE — at Initial Version
| Reported by: | Hb--- | Owned by: | team |
|---|---|---|---|
| Priority: | normal | Milestone: | 19.02 |
| Component: | Core | Version: | latest |
| Keywords: | trac wiki help browser anchor | Cc: |
Description
In De:Help/Concepts/Object, first paragraph the link Linien aims to the anchor #WaysAnchor. That anchor is intentionally missing for the purpose of this report. Clicking the link will throw the Null Pointer Exception shown below. Anchors were last dealt with in #15985.
Additionally the same NPE occurs when the anchor is created with [=#Myanchor] and has no content inside the brackets. Trac recommends this in WikiFormatting#SettingAnchors. Trac generates the HTML code <span class="wikianchor" id="Myanchor"></span> which is fine for common browsers. But not for our Help system.
URL:https://josm.openstreetmap.de/svn/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2019-02-12 22:29:23 +0100 (Tue, 12 Feb 2019) Build-Date:2019-02-13 02:30:51 Revision:14786 Relative:URL: ^/trunk Identification: JOSM/1.5 (14786 de) Windows 7 64-Bit OS Build number: Windows 7 Professional (7601) Memory Usage: 183 MB / 247 MB (14 MB allocated, but free) Java version: 1.8.0_172-ea-b03, Oracle Corporation, Java HotSpot(TM) Client VM Screen: \Display0 1280x1024 Maximum Screen Size: 1280x1024 Program arguments: [--trace] Plugins: + PicLayer (34867) + apache-commons (34506) + ejml (34389) + geotools (34513) + jaxb (34678) + jts (34524) + opendata (34867) + utilsplugin2 (34867) Last errors/warnings: - W: No configuration settings found. Using hardcoded default values for all pools. - E: Handled by bug report queue: java.lang.NullPointerException OSM API: https://api06.dev.openstreetmap.org/api === REPORTED CRASH DATA === BugReportExceptionHandler#handleException: No data collected. Warning issued by: BugReportExceptionHandler#handleException === STACK TRACE === Thread: AWT-EventQueue-0 (15) of main java.lang.NullPointerException at org.openstreetmap.josm.gui.help.HelpBrowser$HyperlinkHandler.scrollToElementWithId(HelpBrowser.java:582) at org.openstreetmap.josm.gui.help.HelpBrowser$HyperlinkHandler.hyperlinkUpdate(HelpBrowser.java:635) at javax.swing.JEditorPane.fireHyperlinkUpdate(Unknown Source) at javax.swing.text.html.HTMLEditorKit$LinkController.activateLink(Unknown Source) at javax.swing.text.html.HTMLEditorKit$LinkController.mouseClicked(Unknown Source) at java.awt.AWTEventMulticaster.mouseClicked(Unknown Source) at java.awt.Component.processMouseEvent(Unknown Source) at javax.swing.JComponent.processMouseEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Window.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$500(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source)


