This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 213268 - NullPointerException at javax.swing.plaf.basic.BasicScrollPaneUI$Handler.mouseWheelMoved
Summary: NullPointerException at javax.swing.plaf.basic.BasicScrollPaneUI$Handler.mous...
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 7.2
Hardware: All All
: P1 normal (vote)
Assignee: Miloslav Metelka
URL:
Keywords:
: 211695 217752 221890 224073 249969 253698 254047 255420 256330 257437 257672 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-05-31 04:12 UTC by keeperlink
Modified: 2016-06-08 09:23 UTC (History)
29 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 188674


Attachments
stacktrace (2.63 KB, text/plain)
2012-05-31 04:12 UTC, keeperlink
Details

Note You need to log in before you can comment on or make changes to this bug.
Description keeperlink 2012-05-31 04:12:15 UTC
Build: NetBeans IDE 7.2 Beta (Build 201205031832)
VM: Java HotSpot(TM) 64-Bit Server VM, 23.0-b21, Java(TM) SE Runtime Environment, 1.7.0_04-b20
OS: Windows 7

Stacktrace: 
java.lang.NullPointerException
   at javax.swing.plaf.basic.BasicScrollPaneUI$Handler.mouseWheelMoved(BasicScrollPaneUI.java:866)
   at java.awt.AWTEventMulticaster.mouseWheelMoved(AWTEventMulticaster.java:532)
   at java.awt.AWTEventMulticaster.mouseWheelMoved(AWTEventMulticaster.java:531)
   at java.awt.Component.processMouseWheelEvent(Component.java:6593)
   at java.awt.Component.processEvent(Component.java:6277)
   at java.awt.Container.processEvent(Container.java:2229)
Comment 1 keeperlink 2012-05-31 04:12:20 UTC
Created attachment 120098 [details]
stacktrace
Comment 2 Stanislav Aubrecht 2012-05-31 13:38:31 UTC
There's no NetBeans code in the stack trace. Please reopen if you can provide steps to reproduce, thanks.
Comment 3 Marian Mirilovic 2012-09-11 16:40:02 UTC
*** Bug 217752 has been marked as a duplicate of this bug. ***
Comment 4 Marian Mirilovic 2012-11-11 13:47:58 UTC
*** Bug 211695 has been marked as a duplicate of this bug. ***
Comment 5 Marian Mirilovic 2012-11-11 13:48:11 UTC
*** Bug 221890 has been marked as a duplicate of this bug. ***
Comment 6 Stanislav Aubrecht 2012-11-12 10:30:10 UTC
Text editor is manipulating with ScrollPane's mouse wheel listener in org.netbeans.modules.editor.lib2.view.DocumentViewOp
Please evaluate, thanks.
Comment 7 Marian Mirilovic 2012-12-20 09:48:43 UTC
*** Bug 224073 has been marked as a duplicate of this bug. ***
Comment 8 Marian Mirilovic 2012-12-20 09:49:05 UTC
another one came ...
Comment 9 Exceptions Reporter 2014-09-22 19:34:33 UTC
This bug already has 10 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=188674
Comment 10 Antonin Nebuzelsky 2015-02-09 13:58:52 UTC
*** Bug 249969 has been marked as a duplicate of this bug. ***
Comment 11 cezariusz 2015-06-14 09:12:45 UTC
40 exception reports, most of them from 8.0 and dev builds.
Comment 12 Jiri Prox 2015-08-03 13:47:39 UTC
*** Bug 254047 has been marked as a duplicate of this bug. ***
Comment 13 Miloslav Metelka 2015-08-05 09:56:32 UTC
I cannot reproduce but it looks like restoration of the original mouse-wheel listener may come at point when the BasicScrollPaneUI is already in uninstalled state. Not sure why the uninstalling happens for a ordinarily opened component (some sort of L&F change??) but I'll attempt to either do scrollpane.setWheelScrollingEnabled(false) and copy the scrolling code or I comment out the original MW listener restoration code.
Comment 14 Miloslav Metelka 2015-08-05 11:45:20 UTC
Fixed by http://hg.netbeans.org/jet-main/rev/e91df292ccb2
Comment 15 _ gtzabari 2015-08-05 14:16:12 UTC
Miloslav,

You can reproduce this (and other bugs) using the following repro steps:

1. Open Netbeans in a local Windows session.
2. "Switch users" (WindowsKey+L)
3. Remote Desktop into the machine using Colors = High Color (16bit)
4. If you try scrolling downward using the mouse wheel you will get this exception.
5. If you try CTRL+F in the editor, it will not work. (This bug isn't covered by this issue, should I open a separate report for it?)

It seems that a lot of things go wrong if you Remote Desktop into the machine with a different color depth than you originally opened Netbeans with. Can you please take a look and fix these bugs? It's pretty commonplace to Remote Desktop into the machine with a lower color depth than native.
Comment 16 Quality Engineering 2015-08-06 01:24:09 UTC
Integrated into 'main-silver', will be available in build *201508060002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/e91df292ccb2
User: Miloslav Metelka <mmetelka@netbeans.org>
Log: #213268 - NullPointerException at javax.swing.plaf.basic.BasicScrollPaneUI$Handler.mouseWheelMoved.
Comment 17 Miloslav Metelka 2015-08-06 09:54:47 UTC
(In reply to _ gtzabari from comment #15)

> 5. If you try CTRL+F in the editor, it will not work. (This bug isn't
> covered by this issue, should I open a separate report for it?)
> 
Yes, please file them.
Comment 18 _ gtzabari 2015-08-07 14:38:30 UTC
(In reply to Miloslav Metelka from comment #17)
> (In reply to _ gtzabari from comment #15)
> 
> > 5. If you try CTRL+F in the editor, it will not work. (This bug isn't
> > covered by this issue, should I open a separate report for it?)
> > 
> Yes, please file them.

Done: https://netbeans.org/bugzilla/show_bug.cgi?id=254200
Comment 19 Miloslav Metelka 2015-08-25 13:47:05 UTC
*** Bug 253698 has been marked as a duplicate of this bug. ***
Comment 20 Miloslav Metelka 2015-09-29 14:57:36 UTC
The present fix was undone due to issue #255420. There is a new fix for the original NPE.
http://hg.netbeans.org/jet-main/rev/06eb62020dee
Comment 21 Miloslav Metelka 2015-09-29 14:59:56 UTC
*** Bug 255420 has been marked as a duplicate of this bug. ***
Comment 22 Quality Engineering 2015-10-01 05:02:32 UTC
Integrated into 'main-silver', will be available in build *201510010328* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/06eb62020dee
User: Miloslav Metelka <mmetelka@netbeans.org>
Log: #213268 - NullPointerException at javax.swing.plaf.basic.BasicScrollPaneUI$Handler.mouseWheelMoved - the present fix was undone and there is a new fix for the original NPE.
Comment 23 _ gtzabari 2015-11-02 23:08:35 UTC
I don't think this issue is fixed. I just reproduced this problem in:

Product Version: NetBeans IDE Dev (Build 201510270002)
Java: 1.8.0_66; Java HotSpot(TM) 64-Bit Server VM 25.66-b17
Runtime: Java(TM) SE Runtime Environment 1.8.0_66-b17
System: Windows 7 version 6.1 running on amd64; UTF-8; en_US (nb)
User directory: C:\dev\Netbeans\user\dev
Cache directory: C:\dev\Netbeans\cache\dev

The exception reporter opened a new bug #256330 with an almost-identical stacktrace.
Comment 24 Jiri Prox 2015-11-06 22:34:46 UTC
*** Bug 256330 has been marked as a duplicate of this bug. ***
Comment 25 Exceptions Reporter 2015-11-30 12:11:33 UTC
This bug already has 150 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=188674
Comment 26 Miloslav Metelka 2015-12-03 14:27:58 UTC
I've reworked the fix but I'm unable to reproduce the NPE so I'll be grateful if anyone can test the fix once it gets into the daily build. Thanks.

http://hg.netbeans.org/jet-main/rev/a3bf117c58a3
Comment 27 _ gtzabari 2015-12-03 15:31:35 UTC
Miloslav,

Did you try using Remote Desktop as mentioned in comment 15?
Comment 28 Quality Engineering 2015-12-04 02:20:26 UTC
Integrated into 'main-silver', will be available in build *201512040002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/a3bf117c58a3
User: Miloslav Metelka <mmetelka@netbeans.org>
Log: #213268 - NullPointerException at javax.swing.plaf.basic.BasicScrollPaneUI$Handler.mouseWheelMoved.
Comment 29 victork 2015-12-05 16:51:58 UTC
I've checked using build 20151205-c96149a5249f.
Checked several disconnects and reconnects of the RDP session - problem seems solved. Also i can't reproduce the 'greyed-out' Find option bug(With it's non-working Ctrl-F counterpart) bug this time.
Can be that the fix fixed both of those issues? Or my moving to JDK8 as complier and JRE8 as run-time have affected it somehow?
Comment 30 Jiri Prox 2016-01-14 12:03:03 UTC
*** Bug 257437 has been marked as a duplicate of this bug. ***
Comment 31 _ gtzabari 2016-01-16 12:33:15 UTC
I believe this bug is fixed. I haven't run into it in a while.

Can you merge this change into the release branch?
Comment 32 Jiri Prox 2016-01-27 10:21:06 UTC
*** Bug 257672 has been marked as a duplicate of this bug. ***
Comment 33 andreasxjohansson 2016-03-14 13:59:17 UTC
I have the latest update and i still have the issue.
Comment 34 Jiri Prox 2016-03-23 15:55:42 UTC
to andreasxjohansson@netbeans.org:
Which version and build do you use?
Comment 35 andreasxjohansson 2016-03-23 15:59:49 UTC
Product Version: NetBeans IDE 8.1 (Build 201510222201)
Updates: NetBeans IDE is updated to version NetBeans 8.1 Patch 1
Java: 1.8.0_60; Java HotSpot(TM) 64-Bit Server VM 25.60-b23
Runtime: Java(TM) SE Runtime Environment 1.8.0_60-b27
System: Windows Server 2008 R2 version 6.1 running on amd64; UTF-8; en_US (nb)
Comment 36 Jiri Prox 2016-03-24 11:22:15 UTC
The issue was fixed only in dev build, the patch is not propagated to previous releases. 

Restoring the issue status to fixed and marking it as candidate for back port.
Comment 37 KhArtNJava 2016-06-07 16:41:27 UTC
Reproducable in 


Product Version: NetBeans IDE 8.1 (Build 201510222201)
Updates: NetBeans IDE is updated to version NetBeans 8.1 Patch 1
Java: 1.8.0_60; Java HotSpot(TM) 64-Bit Server VM 25.60-b23
Runtime: Java(TM) SE Runtime Environment 1.8.0_60-b27
System: Windows 10 version 10.0 running on amd64; Cp1251; en_US (nb)
Comment 38 Jiri Prox 2016-06-08 09:23:02 UTC
As was mentioned in Comment 36, this issue is currently fixed only in dev builds.
It is marked as patch candidate, so it will be included in the next patch.