Opened 11 years ago
Closed 11 years ago
#10584 closed defect (fixed)
NPE and strange behavior on fast mouse actions
Reported by: | mdk | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 14.10 |
Component: | Core | Version: | latest |
Keywords: | template_report | Cc: |
Description
What steps will reproduce the problem?
There are two (I think related) problems. Both start with the same actions. I will describe it in a very special case, but the positions and directions are not relevant. The wrong behaviour is just better visible.
- Ensure current mode is "select" (press s)
- Grab the drawing canvas (press and hold right mouse button) near the lower right corner. (The mouse icon changes to a closed hand)
- Now the complicated part: You have to do three things nearly at the same time:
- move FAST to the upper left corner
- while moving the mouse, zoom in with the mouse wheel (the middle mouse button)
- while you are zooming in AND moving the mouse FAST, release the right mouse button.
What is the expected result?
Canvas move and is zoomed in.
What happens instead?
Some times (I can reproduce the problem about one time in 10 tries) I got an NPE (see below).
There is a slightly modified variant:
- while moving the mouse, press the right mouse button, to select an area.
- while you are selecting an area AND moving the mouse FAST, release the right mouse button.
- stop moving the mouse and release right mouse button
What is the expected result?
Canvas move and afterwards an area is selected. When the right mouse button is released, the "rubber band rectangle for selection disappears and the nodes inside the rectangle are selected.
What happens instead?
If you do it not fast enough, you will see only one white pixel which is the rubber band rectangle with width=0 and height=0 (I think). This pixel stay as long as you are not start a new selection (press the left mouse button) and is no longer related to the actual mouse position (normally the mouse pointer is one of the corners of the rectangle). If you are fast enough you see a real rectangle, which stays there independent from your mouse moves.
To reproduce the NPE is very hard, and I was not able to do this on a second machine. But I hope that fixing the similar problem with the selection, which is easily to reproduce, will also fix that problem or at least will help to understand the cause of the exception, which looks like a concurrency problem.
Repository Root: http://josm.openstreetmap.de/svn Build-Date: 2014-09-29 22:12:08 Last Changed Author: Don-vip Revision: 7588 Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Relative URL: ^/trunk URL: http://josm.openstreetmap.de/svn/trunk Last Changed Date: 2014-09-29 23:52:43 +0200 (Mon, 29 Sep 2014) Last Changed Rev: 7588 Identification: JOSM/1.5 (7588 en) Linux Ubuntu 14.04.1 LTS Memory Usage: 392 MB / 876 MB (251 MB allocated, but free) Java version: 1.7.0_65, Oracle Corporation, OpenJDK Server VM Java package: openjdk-7-jre:i386-7u65-2.5.2-3~14.04 VM arguments: [-Djosm.restart=true, -Djosm.home=/home/michael/.josm-latest, -Djava.net.useSystemProxies=true] Dataset consistency test: No problems found Plugins: - ColumbusCSV (30416) - FastDraw (30416) - HouseNumberTaggingTool (30416) - OpeningHoursEditor (30609) - RoadSigns (30495) - SimplifyArea (30624) - buildings_tools (30485) - contourmerge (1010) - imagery_offset_db (30534) - poly (30495) - public_transport (30664) - reltoolbox (30587) - reverter (30521) - terracer (30643) - turnrestrictions (30651) - utilsplugin2 (30460) Last errors/warnings: - W: java.lang.reflect.InvocationTargetException. Cause: java.lang.NullPointerException - E: java.lang.NullPointerException java.lang.NullPointerException at org.openstreetmap.josm.gui.MapMover.mouseDragged(MapMover.java:139) at java.awt.AWTEventMulticaster.mouseDragged(AWTEventMulticaster.java:320) at java.awt.Component.processMouseMotionEvent(Component.java:6564) at javax.swing.JComponent.processMouseMotionEvent(JComponent.java:3329) at java.awt.Component.processEvent(Component.java:6285) at java.awt.Container.processEvent(Container.java:2229) at java.awt.Component.dispatchEventImpl(Component.java:4872) at java.awt.Container.dispatchEventImpl(Container.java:2287) at java.awt.Component.dispatchEvent(Component.java:4698) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4509) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422) at java.awt.Container.dispatchEventImpl(Container.java:2273) at java.awt.Window.dispatchEventImpl(Window.java:2719) at java.awt.Component.dispatchEvent(Component.java:4698) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735) 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.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87) at java.awt.EventQueue$4.run(EventQueue.java:708) at java.awt.EventQueue$4.run(EventQueue.java:706) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:705) 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 (6)
comment:1 by , 11 years ago
comment:2 by , 11 years ago
In the heat of the moment.
When I copy from aerial images, I zoom in, out, and move around all the time to see if I missed something. Since one or two months, I get these annoying NPE, but I can't guarantee, that the error didn't exists before or I just increase my mapping speed. ;-)
comment:3 by , 11 years ago
Milestone: | → 14.10 |
---|
comment:4 by , 11 years ago
Can you please test with JOSM latest if you still got the NPE? I fixed a similar one in r7590.
comment:6 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Hey, you're violating your mouse :-)