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 232448 - NullPointerException at org.netbeans.modules.options.OptionsPanel$CategoryButton.mouseEntered
Summary: NullPointerException at org.netbeans.modules.options.OptionsPanel$CategoryBut...
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Options&Settings (show other bugs)
Version: 7.4
Hardware: All All
: P3 normal (vote)
Assignee: Theofanis Oikonomou
URL:
Keywords:
: 232788 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-07-09 13:03 UTC by MackSix
Modified: 2013-08-13 12:17 UTC (History)
9 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 202005


Attachments
stacktrace (2.42 KB, text/plain)
2013-07-09 13:03 UTC, MackSix
Details
stacktrace (2.42 KB, text/plain)
2013-07-09 13:09 UTC, MackSix
Details
logfile for comment #4 (151.28 KB, text/plain)
2013-07-10 01:07 UTC, MackSix
Details
stacktrace (2.42 KB, text/plain)
2013-07-10 09:45 UTC, mbukovsky
Details
stacktrace (2.42 KB, text/plain)
2013-07-18 13:45 UTC, ssazonov
Details
stacktrace (2.42 KB, text/plain)
2013-08-05 16:35 UTC, Jiri Prox
Details
stacktrace (2.42 KB, text/plain)
2013-08-13 05:36 UTC, mrpc
Details

Note You need to log in before you can comment on or make changes to this bug.
Description MackSix 2013-07-09 13:03:35 UTC
This bug was originally marked as duplicate of bug 231999, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE Dev (Build 201307082300)
VM: Java HotSpot(TM) 64-Bit Server VM, 23.25-b01, Java(TM) SE Runtime Environment, 1.7.0_25-b16
OS: Windows 7

User Comments:
GUEST: changed web browser from ff to default system browser

GUEST: Happened after I choose different Fonts & Colors profile

Selpi: I tried to change new settings like 'Same background color for files from same project' at Options->Miscellaneous->Windows and noticed that switching flags on this options  doesn't affect 'Ok' and 'Apply' buttons. After several seconds I got this exception.

MackSix: 1. View Tools>>Options>>C/C++
2. Apply button becomes active for now reason.
3. View Miscellaneous and click all the tabs starting with Windows tab through Action Item tab.
4. Click Apply button.

NPE

MackSix: On Tools>>Options>>PHP>>Code Analysis Tab

deep_pl: On import settings

GUEST: I just clicked the "apply button" after choosing the "Idea" keymap profile.

athompson: in Options, set web browser to chrome and hit the Apply button

cyhelsky: clicking on ok button in options/general

cyhelsky: options

athompson: opened options




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.options.OptionsPanel$CategoryButton.mouseEntered(OptionsPanel.java:1198)
   at java.awt.Component.processMouseEvent(Component.java:6514)
   at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
   at java.awt.Component.processEvent(Component.java:6270)
   at java.awt.Container.processEvent(Container.java:2229)
   at java.awt.Component.dispatchEventImpl(Component.java:4861)
Comment 1 MackSix 2013-07-09 13:03:37 UTC
Created attachment 136876 [details]
stacktrace
Comment 2 MackSix 2013-07-09 13:09:19 UTC
Created attachment 136877 [details]
stacktrace

Again, on Tools>>Options>>PHP>>Code Analysis Tab
While viewing tab, the Apply button is activated for no reason. Clicking Apply makes all but the Apply button deactivate. Status says validating tool collection, so it appears to be causing the C/C++ module to be doing something. Buttons flash and this NPE happens.
Comment 3 MackSix 2013-07-09 15:25:20 UTC
The Options Dialog is now left in a state where the OK, Apply, Help buttons are deactivated. The Cancel button is activated. Hovering mouse over menu to switch to another item (Keymap, Java, et. al.) causes this NPE.
Comment 4 MackSix 2013-07-10 00:56:31 UTC
1. Delete userdir and cachedir
2. start netbeans, but don't import any settings.
3. Tools>>Options>>Java>>GUI Builder and Activate. Wait for dialog box to go away and come back again.
4. Go to PHP and activate. Wait for dialog box to go away and come back again.
5. Go to C/C++ and activate.
6. If you get any exceptions up until now, restart NetBeans.
7. Tools>>Options>>PHP>>Code Analysis and add path for Code Sniffer (phpcs.bat) and Mess Detector (phpmd.bat).
8. Notice Default Standard field is blank. Choose a standard, but click OK button, don't click the Apply button.
9. Open Tools>>Options>>PHP>>Code Analysis again and verify paths are still showing and MySource is the Default Standard. Notice Apply button is enabled.
10. Click Apply button several times, rapidly until OK, Apply and Help (or Apply and Help) buttons are deactivated. Cancel any exception dialog boxes.
11. If this does not deactivate all three or the later 2 buttons (OK, Apply, Help) or (Apply, Help), then click OK and repeat steps 8 - 11.
12. Hover mouse cursor over Menu (General, Editor, et. al.)
At this poin you should get this NPE

If you cancel and restart NetBeans, the JavaSE, PHP and C/C++ modules may self deactivate (or maybe just one of them will deactivate). Sometimes they do and sometimes they don't.

Note that rapidly clicking the Apply button was not what I had done before, but I just discovered that doing it can make this occur.
Comment 5 MackSix 2013-07-10 01:07:18 UTC
Created attachment 136912 [details]
logfile for comment #4
Comment 6 mbukovsky 2013-07-10 09:45:24 UTC
Created attachment 136931 [details]
stacktrace

I have opened Tools -> Options -> Miscellaneous -> Windows. In that time, allways, when cursor hover over the icons above (Generaly, Editor, Font & Colors...) this exceptions occure.

Hint: Short time before, I unchecked Transparent floating windows and apply it in Window tab.
Comment 7 MackSix 2013-07-10 12:46:08 UTC
Still valid in: 

Product Version: NetBeans IDE 7.4 Beta (Build 201307092200)
Java: 1.7.0_25; Java HotSpot(TM) 64-Bit Server VM 23.25-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_25-b16
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
Comment 8 Milutin Kristofic 2013-07-16 11:35:14 UTC
*** Bug 232788 has been marked as a duplicate of this bug. ***
Comment 9 ssazonov 2013-07-18 13:45:42 UTC
Created attachment 137383 [details]
stacktrace

While I have opened Option Dialog (Tools->Options->Font&Colors->Java) I created new new project, then I pressed 'Restore' btn and I got this error
Comment 10 Jiri Prox 2013-08-05 16:35:14 UTC
Created attachment 138313 [details]
stacktrace

NPE when pressing Apply in options dialog
Comment 11 MackSix 2013-08-05 17:16:07 UTC
Please disregard Comment 4. There is easier steps to reproduce: 

1. Run NetBeans with new userdir and cachdir.
2. Activate JavaSE and activate PHP.
3. Goto Tools>>Options and then click on PHP tab will enable the Apply button.
4. Switch to the Code Completion Tab.
5. Fast click the Apply button many times, stop and watch for one of the other 3 buttons to be disabled. 
6. Hover mouse over Options menu items.

This NPE it thrown.

Note again, that rapidly clicking the Apply button was not what I had done before when this happened. I just discovered that doing it can make the same NPE happen.
Comment 12 MackSix 2013-08-05 17:18:31 UTC
(In reply to comment #11)
> Please disregard Comment 4. There is easier steps to reproduce: 
> 
> 1. Run NetBeans with new userdir and cachdir.
> 2. Activate JavaSE and activate PHP.
> 3. Goto Tools>>Options and then click on PHP tab will enable the Apply button.
> 4. Switch to the Code Completion Tab.
> 5. Fast click the Apply button many times, stop and watch for one of the other
> 3 buttons to be disabled. 
> 6. Hover mouse over Options menu items.
> 
> This NPE it thrown.
> 
> Note again, that rapidly clicking the Apply button was not what I had done
> before when this happened. I just discovered that doing it can make the same
> NPE happen.

Sorry, in step #4, keep repeating this until you see one of the other 3 buttons (OK, Apply, or Help) become disabled.

Product Version: NetBeans IDE Dev (Build 201308042300)
Java: 1.7.0_25; Java HotSpot(TM) 64-Bit Server VM 23.25-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_25-b16
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
Comment 13 mrpc 2013-08-13 05:36:38 UTC
Created attachment 138622 [details]
stacktrace

In settings, php/code analysis/code sniffer / search
it found two files, I selected one and OK.
Clicked on Apply to save the settings and the error occured.
Comment 14 Theofanis Oikonomou 2013-08-13 12:17:34 UTC
This is caused due to sync issues after clicking Apply button at some point and should be fixed by http://hg.netbeans.org/core-main/rev/850afc4ddc5f. Please try a latest build and reopen if this is not the case. Thank you