#19252 closed defect (fixed)
Crashreport when mouse is near split pane
Reported by: | GerdP | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 20.05 |
Component: | Core | Version: | latest |
Keywords: | template_report regression stream | Cc: | simon04 |
Description
What steps will reproduce the problem?
- Move mouse onto the right side of the edit window
What is the expected result?
cursor changes to resize the split pane window
What happens instead?
crash report
Please provide any additional information below. Attach a screenshot if possible.
Build-Date:2020-05-17 15:04:03 Revision:16439 Is-Local-Build:true Identification: JOSM/1.5 (16439 SVN en) Windows 10 64-Bit OS Build number: Windows 10 Home 1903 (18362) Memory Usage: 740 MB / 1753 MB (368 MB allocated, but free) Java version: 1.8.0_191-b12, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM Screen: \Display0 1920x1080 Maximum Screen Size: 1920x1080 VM arguments: [-agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:53347, -ea, -Dfile.encoding=UTF-8] Program arguments: [--debug] Dataset consistency test: No problems found Plugins: + OpeningHoursEditor (35414) + PolygonCutOut (v0.7) + apache-commons (35362) + buildings_tools (35405) + continuosDownload (91) + ejml (35313) + geotools (35169) + jaxb (35092) + jts (35122) + merge-overlap (35248) + o5m (35248) + opendata (35405) + pbf (35446) + poly (35248) + reverter (35409) + undelete (35405) + utilsplugin2 (35440) Validator rules: + c:\josm\core\resources\data\validator\geometry.mapcss Last errors/warnings: - E: Handled by bug report queue: java.lang.NullPointerException === REPORTED CRASH DATA === BugReportExceptionHandler#handleException: No data collected. Warning issued by: BugReportExceptionHandler#handleException === STACK TRACE === Thread: AWT-EventQueue-0 (20) of main java.lang.NullPointerException at java.util.Objects.requireNonNull(Objects.java:203) at java.util.Optional.<init>(Optional.java:96) at java.util.Optional.of(Optional.java:108) at java.util.stream.FindOps$FindSink$OfRef.get(FindOps.java:193) at java.util.stream.FindOps$FindSink$OfRef.get(FindOps.java:190) at java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:152) at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:464) at org.openstreetmap.josm.gui.widgets.MultiSplitLayout.dividerAt(MultiSplitLayout.java:782) at org.openstreetmap.josm.gui.widgets.MultiSplitLayout.dividerAt(MultiSplitLayout.java:796) at org.openstreetmap.josm.gui.widgets.MultiSplitPane.updateCursor(MultiSplitPane.java:336) at org.openstreetmap.josm.gui.widgets.MultiSplitPane.access$0(MultiSplitPane.java:330) at org.openstreetmap.josm.gui.widgets.MultiSplitPane$InputHandler.mouseEntered(MultiSplitPane.java:350) at java.awt.Component.processMouseEvent(Component.java:6548) at javax.swing.JComponent.processMouseEvent(JComponent.java:3324) at java.awt.Component.processEvent(Component.java:6304) 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.LightweightDispatcher.retargetMouseEvent(Container.java:4904) at java.awt.LightweightDispatcher.retargetMouseEnterExit(Container.java:4686) at java.awt.LightweightDispatcher.trackMouseEnterExit(Container.java:4664) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4515) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476) at java.awt.Container.dispatchEventImpl(Container.java:2283) 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 (0)
Change History (8)
comment:1 by , 5 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 by , 5 years ago
Keywords: | regression stream added |
---|---|
Milestone: | → 20.05 |
Thank you for fixing this issue!
comment:3 by , 5 years ago
Any idea why your change didn't work? Is the stream api not yet stable in JDK8?
comment:5 by , 5 years ago
But do you really get the same result? My understanding is that the old code stopped when child.getBounds().contains(x, y)
is true, no matter what result we get from dividerAt(child, x, y)
.
My understanding of the new code is that it continous to loop in case that dividerAt(child, x, y)
returns null.
comment:6 by , 5 years ago
What do you think about this variant?
return split.getChildren().stream() .filter(child -> child.getBounds().contains(x, y)) .findFirst() .map(child -> dividerAt(child, x, y)) .orElse(null);
comment:7 by , 5 years ago
Yes, that's it! I rechecked for similar cases and found a few glitches in the refactoring. I'll commit a fix shortly.
In 16440/josm: