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 205837 - IllegalStateException: may not call Project.getLookup().lookup(...) inside org.netbeans.modules.profiler.nbimpl.providers.MarkerProcessor registered under @ProjectServiceProvider
Summary: IllegalStateException: may not call Project.getLookup().lookup(...) inside or...
Status: RESOLVED FIXED
Alias: None
Product: profiler
Classification: Unclassified
Component: Ide (show other bugs)
Version: 7.2
Hardware: All All
: P3 normal (vote)
Assignee: J Bachorik
URL:
Keywords:
: 206866 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-12-02 11:09 UTC by Tomas Hurka
Modified: 2012-01-05 15:50 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 183362


Attachments
stacktrace (3.27 KB, text/plain)
2011-12-02 11:09 UTC, Tomas Hurka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Hurka 2011-12-02 11:09:55 UTC
Build: NetBeans IDE Dev (Build 20111202-c7390a5282d7)
VM: Java HotSpot(TM) 64-Bit Server VM, 20.4-b02-402, Java(TM) SE Runtime Environment, 1.6.0_29-b11-402-10M3527
OS: Mac OS X

Stacktrace: 
java.lang.IllegalStateException: may not call Project.getLookup().lookup(...) inside org.netbeans.modules.profiler.nbimpl.providers.MarkerProcessor registered under @ProjectServiceProvider
   at org.netbeans.modules.projectapi.LazyLookupProviders$1$1.safeToLoad(LazyLookupProviders.java:127)
   at org.netbeans.modules.projectapi.LazyLookupProviders$1$1.beforeLookup(LazyLookupProviders.java:89)
   at org.openide.util.lookup.ProxyLookup$R.myBeforeLookup(ProxyLookup.java:672)
   at org.openide.util.lookup.ProxyLookup$R.beforeLookup(ProxyLookup.java:691)
   at org.openide.util.lookup.ProxyLookup$R.myBeforeLookup(ProxyLookup.java:680)
   at org.openide.util.lookup.ProxyLookup$R.computeResult(ProxyLookup.java:526)
Comment 1 Tomas Hurka 2011-12-02 11:09:57 UTC
Created attachment 113749 [details]
stacktrace
Comment 2 Jesse Glick 2011-12-02 13:44:21 UTC
Sorry for the recently introduced assertion, but it proved necessary for various reasons. Initialize the associatedParser field on demand, not in the constructor (or eliminate the field altogether by inlining).
Comment 3 J Bachorik 2011-12-22 12:56:07 UTC
fixed http://hg.netbeans.org/profiler-main/rev/4693d6a05073
Comment 4 J Bachorik 2012-01-04 08:46:57 UTC
*** Bug 206866 has been marked as a duplicate of this bug. ***
Comment 5 Quality Engineering 2012-01-05 15:50:58 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/4693d6a05073
User: Jaroslav Bachorik <yardus@netbeans.org>
Log: #205837: Not calling Project.getLookup().lookup(...) in a project service constructor