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 209424 - NullPointerException at org.netbeans.modules.java.hints.spiimpl.hints.HintsTask$HintPositionRefresherHelper.access$100
Summary: NullPointerException at org.netbeans.modules.java.hints.spiimpl.hints.HintsTa...
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 7.2
Hardware: All All
: P1 normal with 1 vote (vote)
Assignee: Jan Lahoda
URL:
Keywords:
: 209426 209449 209496 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-03-11 08:56 UTC by Vladimir Voskresensky
Modified: 2012-04-03 09:38 UTC (History)
38 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 185750


Attachments
stacktrace (1.04 KB, text/plain)
2012-03-11 08:56 UTC, Vladimir Voskresensky
Details
stacktrace (1.04 KB, text/plain)
2012-03-11 11:17 UTC, Sergey Petrov
Details
stacktrace (1.04 KB, text/plain)
2012-03-11 15:35 UTC, Sergey Petrov
Details
stacktrace (1.04 KB, text/plain)
2012-03-11 15:53 UTC, Vladimir Voskresensky
Details
stacktrace (1.04 KB, text/plain)
2012-03-12 00:59 UTC, cdicarlo
Details
stacktrace (1.04 KB, text/plain)
2012-03-12 01:05 UTC, cdicarlo
Details
stacktrace (1.04 KB, text/plain)
2012-03-12 08:23 UTC, Jiri Skrivanek
Details
stacktrace (1.04 KB, text/plain)
2012-03-12 08:29 UTC, Peter Nabbefeld
Details
stacktrace (1.04 KB, text/plain)
2012-03-12 09:38 UTC, Martin Fousek
Details
stacktrace (1.04 KB, text/plain)
2012-03-12 09:47 UTC, Tomas Mysik
Details
stacktrace (1.04 KB, text/plain)
2012-03-12 10:14 UTC, Antonin Nebuzelsky
Details
stacktrace (1.04 KB, text/plain)
2012-03-12 13:26 UTC, javydreamercsw
Details
stacktrace (1.04 KB, text/plain)
2012-03-12 16:50 UTC, Jesse Glick
Details
stacktrace (1.04 KB, text/plain)
2012-03-12 17:32 UTC, Petr Jiricka
Details
stacktrace (1.04 KB, text/plain)
2012-03-13 09:05 UTC, J Bachorik
Details
stacktrace (1.04 KB, text/plain)
2012-03-13 09:17 UTC, J Bachorik
Details
Snapshot with exception on Java source file opening (34.48 KB, application/octet-stream)
2012-03-14 07:52 UTC, KhArtNJava
Details
exception screenshot (508.00 KB, image/tiff)
2012-03-14 08:22 UTC, eltony81
Details
stacktrace (1.04 KB, text/plain)
2012-03-14 10:44 UTC, Egor Ushakov
Details
stacktrace (1.04 KB, text/plain)
2012-03-14 11:50 UTC, rrhegde
Details
stacktrace (1.04 KB, text/plain)
2012-03-14 11:53 UTC, rrhegde
Details
stacktrace (1.04 KB, text/plain)
2012-03-14 12:02 UTC, rrhegde
Details
stacktrace (1.04 KB, text/plain)
2012-03-14 13:59 UTC, javydreamercsw
Details
stacktrace (1.04 KB, text/plain)
2012-03-14 17:26 UTC, Karol Harezlak
Details
stacktrace (1.04 KB, text/plain)
2012-03-15 16:32 UTC, aldobrucale
Details
stacktrace (1.05 KB, text/plain)
2012-04-03 09:38 UTC, Jaroslav Tulach
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Voskresensky 2012-03-11 08:56:48 UTC
Build: NetBeans IDE Dev (Build 20120311-209c662b6f6a)
VM: Java HotSpot(TM) Client VM, 20.4-b02, Java(TM) SE Runtime Environment, 1.6.0_29-b11
OS: SunOS

User Comments:
vv159170: working in IDE




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.java.hints.spiimpl.hints.HintsTask$HintPositionRefresherHelper.access$100(HintsTask.java:190)
   at org.netbeans.modules.java.hints.spiimpl.hints.HintsTask.run(HintsTask.java:126)
   at org.netbeans.modules.java.hints.spiimpl.hints.HintsTask.run(HintsTask.java:83)
   at org.netbeans.modules.java.source.JavaSourceAccessor$CancelableTaskWrapper.run(JavaSourceAccessor.java:298)
   at org.netbeans.modules.parsing.impl.TaskProcessor.callParserResultTask(TaskProcessor.java:558)
   at org.netbeans.modules.parsing.impl.TaskProcessor$CompilationJob.run(TaskProcessor.java:734)
Comment 1 Vladimir Voskresensky 2012-03-11 08:56:51 UTC
Created attachment 116545 [details]
stacktrace
Comment 2 Sergey Petrov 2012-03-11 11:17:16 UTC
Created attachment 116549 [details]
stacktrace
Comment 3 Sergey Petrov 2012-03-11 11:23:37 UTC
got it after opening a file and now it's shown on almost any click withing the file
Comment 4 Sergey Petrov 2012-03-11 15:35:15 UTC
Created attachment 116560 [details]
stacktrace

it's almost impossible to work with classes
Comment 5 Vladimir Voskresensky 2012-03-11 15:53:16 UTC
Created attachment 116561 [details]
stacktrace
Comment 6 Exceptions Reporter 2012-03-11 22:56:16 UTC
This bug already has 5 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=185750
Comment 7 cdicarlo 2012-03-12 00:59:17 UTC
Created attachment 116567 [details]
stacktrace

Editing a java flie.
Comment 8 cdicarlo 2012-03-12 01:05:16 UTC
Created attachment 116568 [details]
stacktrace
Comment 9 280Z28 2012-03-12 02:58:01 UTC
This occurs because the Java hints SPI uses the following call for initializing a lookup (in IntroduceHint.java and HintsTask.java):

MimeLookup.getLookup("text/x-java").lookupAll(PositionRefresherHelper.class);

With the recent change to make the collection returned by lookupAll lazily initialized, this call was effectively removed. To get me working again until this gets fixed, I added a call to toArray() to force the returned collection to initialize the elements:

MimeLookup.getLookup("text/x-java").lookupAll(PositionRefresherHelper.class).toArray();
Comment 10 Jiri Skrivanek 2012-03-12 08:23:15 UTC
Created attachment 116573 [details]
stacktrace

Started IDE with previously opened files.
Comment 11 Peter Nabbefeld 2012-03-12 08:29:15 UTC
Created attachment 116574 [details]
stacktrace

Opened a Java file.
Comment 12 Martin Fousek 2012-03-12 09:38:16 UTC
Created attachment 116583 [details]
stacktrace

opened file in editor
Comment 13 Tomas Mysik 2012-03-12 09:47:17 UTC
Created attachment 116585 [details]
stacktrace
Comment 14 Jan Lahoda 2012-03-12 10:13:20 UTC
*** Bug 209449 has been marked as a duplicate of this bug. ***
Comment 15 Antonin Nebuzelsky 2012-03-12 10:14:15 UTC
Created attachment 116586 [details]
stacktrace
Comment 16 Jan Lahoda 2012-03-12 10:15:57 UTC
I apologize for problems, the lookupAll approach is neither nice nor reliable, so I rewrote the code not to use it:
http://hg.netbeans.org/jet-main/rev/defd2018d7c4
Comment 17 Exceptions Reporter 2012-03-12 10:35:17 UTC
This bug already has 20 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=185750
Comment 18 Jan Lahoda 2012-03-12 12:28:13 UTC
*** Bug 209426 has been marked as a duplicate of this bug. ***
Comment 19 javydreamercsw 2012-03-12 13:26:16 UTC
Created attachment 116608 [details]
stacktrace

Running a platform application
Comment 20 Jesse Glick 2012-03-12 16:50:15 UTC
Created attachment 116626 [details]
stacktrace
Comment 21 Petr Jiricka 2012-03-12 17:32:15 UTC
Created attachment 116629 [details]
stacktrace

Opening and scrolling in source code (nb module project).
Comment 22 J Bachorik 2012-03-13 09:05:16 UTC
Created attachment 116644 [details]
stacktrace
Comment 23 Jan Lahoda 2012-03-13 09:09:46 UTC
*** Bug 209496 has been marked as a duplicate of this bug. ***
Comment 24 J Bachorik 2012-03-13 09:17:16 UTC
Created attachment 116646 [details]
stacktrace
Comment 25 KhArtNJava 2012-03-14 07:52:04 UTC
Created attachment 116699 [details]
Snapshot with exception on Java source file opening

Snapshot with exception on Java source file opening
Comment 26 Peter Nabbefeld 2012-03-14 08:08:09 UTC
Please, increase spec version of the module, as the spam here will not stop until it is available on UC. Please, don't forget to update dependent modules, if necessary!
Comment 27 KhArtNJava 2012-03-14 08:15:04 UTC
I join the request of Peter.
Please expedite the release of the patch.
A lot of error messages on this bug.
In connection with this development is extremely complex.
Comment 28 eltony81 2012-03-14 08:22:04 UTC
Created attachment 116701 [details]
exception screenshot

The exception occurring when I just click on code editor window
Comment 29 Egor Ushakov 2012-03-14 10:44:14 UTC
Created attachment 116704 [details]
stacktrace
Comment 30 rrhegde 2012-03-14 11:50:14 UTC
Created attachment 116707 [details]
stacktrace
Comment 31 rrhegde 2012-03-14 11:53:15 UTC
Created attachment 116708 [details]
stacktrace
Comment 32 rrhegde 2012-03-14 12:02:15 UTC
Created attachment 116709 [details]
stacktrace
Comment 33 javydreamercsw 2012-03-14 13:59:15 UTC
Created attachment 116719 [details]
stacktrace

Switching to the IDE (Alt+Tab)
Comment 34 Jesse Glick 2012-03-14 15:21:58 UTC
(In reply to comment #26)
> until it is available on UC

Remember that in general you need to install fresh development builds; the great majority of changes made during the development cycle are not offered as updates, only those happening to have been made prior to an unrelated API change.
Comment 35 Karol Harezlak 2012-03-14 17:26:15 UTC
Created attachment 116743 [details]
stacktrace
Comment 36 theosib 2012-03-14 19:38:24 UTC
> Remember that in general you need to install fresh development builds; the
> great majority of changes made during the development cycle are not offered as
> updates, only those happening to have been made prior to an unrelated API
> change.

If you hadn't mentioned this here, I would never have known.  Is this a fact that can be made more prominent?
Comment 37 Jan Lahoda 2012-03-15 10:30:26 UTC
FYI, this should increase the module versions on the development AUC:
http://hg.netbeans.org/jet-main/rev/fd2de48fee8c

Would still recommend to download the build rather than updating it from the AUC, though.
Comment 38 KhArtNJava 2012-03-15 10:31:31 UTC
In what release have fix for this bug?
Comment 39 Peter Nabbefeld 2012-03-15 10:41:59 UTC
(In reply to comment #38)
> In what release have fix for this bug?

Updated my dev build via UC about 4 hours ago, can confirm it's working now.
Comment 40 Jan Lahoda 2012-03-15 10:48:29 UTC
The fix is part of daily build 201203130400 and later.
Comment 41 KhArtNJava 2012-03-15 10:50:55 UTC
There are no builds 201203130400 and later. Is they a in planning and why do they delayed?
Comment 42 Jan Lahoda 2012-03-15 12:34:53 UTC
Seems there were/are some technical problems with build upload, the build is here:
http://bits.netbeans.org/netbeans/trunk/nightly/2012-03-13_04-00-40/
but is not linked as the lastest one, so is not accessible without the above link. This should resolve once a build is successfully uploaded.
Comment 43 eltony81 2012-03-15 12:51:02 UTC
(In reply to comment #42)
> Seems there were/are some technical problems with build upload, the build is
> here:
> http://bits.netbeans.org/netbeans/trunk/nightly/2012-03-13_04-00-40/
> but is not linked as the lastest one, so is not accessible without the above
> link. This should resolve once a build is successfully uploaded.

Under Mac Os X:
Isn't better remove also "/Users/<you_username>/Library/Application\ Support/NetBeans/" ?
Comment 44 aldobrucale 2012-03-15 16:32:15 UTC
Created attachment 116769 [details]
stacktrace

I switched to an external shell window
Comment 45 Quality Engineering 2012-03-17 10:38:41 UTC
Integrated into 'main-golden', will be available in build *201203170400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/fd2de48fee8c
User: Jan Lahoda <jlahoda@netbeans.org>
Log: #209424: pushing fix to update center
Comment 46 Jaroslav Tulach 2012-04-03 09:38:16 UTC
Created attachment 117723 [details]
stacktrace