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 267339 - NPE in ElfReader.<init>
Summary: NPE in ElfReader.<init>
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Project Discovery (show other bugs)
Version: 8.1
Hardware: All All
: P2 normal (vote)
Assignee: Alexander Simon
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-27 20:51 UTC by Vladimir Kvashin
Modified: 2016-08-24 01:56 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Kvashin 2016-07-27 20:51:13 UTC
This happened with one very important client, whose binaries are very large.

java.lang.NullPointerException
at org.netbeans.modules.cnd.dwarfdump.reader.ElfReader.<init>(ElfReader.java:91)
at org.netbeans.modules.cnd.dwarfdump.reader.DwarfReader.<init>(DwarfReader.java:74)
at org.netbeans.modules.cnd.dwarfdump.Dwarf.<init>(Dwarf.java:98)
at com.oracle.tools.ide.projectless.impl.binary.DwarfInfoCache.cacheDwarfInfo(DwarfInfoCache.java:79)
at com.oracle.tools.ide.projectless.impl.binary.DwarfInfoCache.producedByStudio(DwarfInfoCache.java:70)
at com.oracle.tools.ide.projectless.impl.binary.DwarfBasedBinaryInformationProvider.getBinaryInformation(DwarfBasedBinaryInformationProvider.java:23)
at com.oracle.tools.ide.projectless.utils.BinaryUtils.getBestBinaryInformation(BinaryUtils.java:54)
at com.oracle.tools.ide.projectless.impl.ContentProviderUtils.getBinaryArtifact(ContentProviderUtils.java:31)
at com.oracle.tools.ide.projectless.impl.DefaultBinaryTargetLookupContentProvider.getArtifacts(DefaultBinaryTargetLookupContentProvider.java:35)
at com.oracle.tools.ide.projectless.impl.DefaultTargetImpl.getLookup(DefaultTargetImpl.java:74)
at com.oracle.tools.ide.projectless.impl.DefaultTargetPersistenceProvider$3.loadTarget(DefaultTargetPersistenceProvider.java:160)
at com.oracle.tools.ide.projectless.api.TargetManager.getTarget(TargetManager.java:49)
at com.oracle.tools.ide.projectless.debug.impl.DebugActionPerformer.startDebugging(DebugActionPerformer.java:99)
at com.oracle.tools.ide.projectless.debug.impl.DebugActionPerformer.access$000(DebugActionPerformer.java:30)
at com.oracle.tools.ide.projectless.debug.impl.DebugActionPerformer$1.run(DebugActionPerformer.java:78)
at org.netbeans.modules.progress.ui.RunOffEDTImpl.runOffEventDispatchThread(RunOffEDTImpl.java:102)
at org.netbeans.api.progress.ProgressUtils.runOffEventDispatchThread(ProgressUtils.java:112)
at com.oracle.tools.ide.projectless.debug.impl.DebugActionPerformer.performAction(DebugActionPerformer.java:87)
at com.oracle.tools.ide.projectless.debug.impl.DebugActionPerformer.perform(DebugActionPerformer.java:54)
at com.oracle.tools.ide.projectless.debug.impl.DebugTargetNodeAction.performAction(DebugTargetNodeAction.java:81)
at org.openide.util.actions.NodeAction$DelegateAction$1.run(NodeAction.java:586)
at org.openide.util.actions.ActionInvoker$1.run(ActionInvoker.java:95)
at org.openide.util.actions.ActionInvoker$ActionRunnable.actionPerformed(ActionInvoker.java:162)
at org.netbeans.core.ModuleActions.invokeAction(ModuleActions.java:109)
at org.netbeans.modules.openide.actions.ActionsBridgeImpl.invokeAction(ActionsBridgeImpl.java:60)
at org.openide.util.actions.ActionInvoker$ActionRunnable.doRun(ActionInvoker.java:153)
at org.openide.util.actions.ActionInvoker$2.run(ActionInvoker.java:110)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1423)
[catch] at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
Comment 1 Vladimir Kvashin 2016-07-27 20:55:00 UTC
That's not the main problem in CR 24292078, but one of the problems it discovers. Taking into account the importance of the client, I set it to P2.

The readSectionHeaderTable() method does not necessarily initialize sectionHeadersTable, but the latter is used after call to readSectionHeaderTable() without null check.
Comment 2 Alexander Simon 2016-08-22 14:31:24 UTC
I still need a binary that throws the NPE.

Hope that problem was fixed in change sets:
http://hg.netbeans.org/cnd-main/rev/16c1d1283d8b
http://hg.netbeans.org/cnd-main/rev/ace1ad3b1331

Please verify the fix on your binary
Comment 3 Quality Engineering 2016-08-23 01:55:31 UTC
Integrated into 'main-silver', will be available in build *201608230002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/ace1ad3b1331
User: Alexander Simon <alexvsimon@netbeans.org>
Log: fixed Bug #267339 NPE in ElfReader.<init>
Comment 4 Quality Engineering 2016-08-24 01:56:09 UTC
Integrated into 'main-silver', will be available in build *201608240002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/52871cd8bc67
User: Alexander Simon <alexvsimon@netbeans.org>
Log: better fix for Bug #267339 NPE in ElfReader.<init>