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.
Build: Oracle Solaris Studio 12.2 (Build cnd-build-2711-on-100506) VM: Java HotSpot(TM) Client VM, 16.0-b13, Java(TM) SE Runtime Environment, 1.6.0_18-b07 OS: SunOS Stacktrace: java.lang.NullPointerException at org.netbeans.modules.dlight.management.api.DLightSession.prepareContext(DLightSession.java:699) at org.netbeans.modules.dlight.management.api.DLightSession.access$700(DLightSession.java:100) at org.netbeans.modules.dlight.management.api.DLightSession$2.run(DLightSession.java:422) at org.netbeans.modules.dlight.util.DLightExecutorService$2.run(DLightExecutorService.java:89) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1415) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1954)
Created attachment 100006 [details] stacktrace
it was "run" of bunha sample on OpenSolaris using express 10/6
I cannot reproduce the problem. The source code was re-written in the DLightSession and the line from stack cannot give NPE. I will close as WORKSFORME
easily reproduced with clean userdir on e**f when created Quote sample and started THA
Looks like key point here: default toolchain used in project is tied to Studio 12
*** Bug 202972 has been marked as a duplicate of this bug. ***
Created attachment 111418 [details] proposed patch please, review patch for 701
There are 2 more places where result of getDataStorageFor is not verified for null value... Shouldn't these be handled as well?
Created attachment 111431 [details] Proposed patch
next proposed patch is better. Although it's preferable to have logic used before introduction of proxy storages. Otherwise collectors are started even in case of missing storages
Created attachment 111435 [details] Reworked patch Proposed patch contains: - prevention of possible NPEs related to absence of particular storages; - earlier initialization of serviceInfoDataStorage
Patch is good. The only question I have: how initial split by two exclusive groups 'idproviders' and 'collectors' handles the situation when collector was not able to be initialized due to absence storage, wehn it is still indicator data provider. How it will be inited? it's not in list 'idproviders'
Isn't it what is commented in the patch? + /* + * DataCollector usually acts as IndicatorDataProvider.. + * It could be that infrastructure cannot provide all needed + * storages for the collector. This means that collector will + * not be able to *store* any data, still it *may* be able to + * act as an IndicatorDataProvider (with transient data). + * + * So do unconditional init with serviceInfoDataStorage. + * This will give a chance for collector to at least provide + * some information for Indicators... + * + * Note: It is collector's responsibility to handle the + * situation when it was not initialized with DataStorages! + * + * Note: Collector *will* be notified about session start even + * if it was not initialized with any DataStorage. + * + */ + toolCollector.init(serviceInfoDataStorage); +
Created attachment 111448 [details] take #3 This time both operations: + toolCollector.init(serviceInfoDataStorage); + addDataFilterListener(toolCollector); are performed unconditionally (even if cannot find all needed storages). So in this case DataFilter events will be available to the toolCollector.. Also I have split the patch into two. This one contains changes related to infrastructure. The second one (will attach) related to preparing ProcFSDataCollector to the situation if no storage provided...
Created attachment 111449 [details] ProcFSDataCollector to be ready for storgae absence
I've reviewed both patches and now they looks like complete solution of the problem. Thanks for splitting as well.
pushed to releases/release701_fixes changeset: e7e7df47fd77 [http://hg.netbeans.org/releases/rev/e7e7df47fd77] changeset: afa15f6d4e27 [http://hg.netbeans.org/releases/rev/afa15f6d4e27]
I agree there should be an extra fix which also keep sequence of calls in order as was before
extra fix is http://hg.netbeans.org/releases/rev/078f6bc91602
verified in dev OSS IDE build #3375, NPE does not appear any more.
Integrated into 'releases' Changeset: http://hg.netbeans.org/releases/rev/e7e7df47fd77 User: Andrew Krasny <akrasny@netbeans.org> Log: Bug #187469 - NullPointerException at org.netbeans.modules.dlight.management.api.DLightSession.prepareContext
verified in OSS dev build #3394 (built on NB 7.0.1 patch 2 20111007)
*** Bug 203564 has been marked as a duplicate of this bug. ***