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 269106 - NullPointerException at org.netbeans.modules.javascript2.editor.JsStructureScanner.getEmbededItems
Summary: NullPointerException at org.netbeans.modules.javascript2.editor.JsStructureSc...
Status: RESOLVED FIXED
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: Dev
Hardware: All All
: P2 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-24 17:47 UTC by Petr Pisl
Modified: 2016-11-30 02:54 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 227297


Attachments
stacktrace (2.87 KB, text/plain)
2016-11-24 17:47 UTC, Petr Pisl
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Pisl 2016-11-24 17:47:42 UTC
This issue was reported manually by ppisl.
It already has 1 duplicates 


Build: NetBeans IDE Dev (Build 201609080002)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.31-b07, Java(TM) SE Runtime Environment, 1.8.0_31-b13
OS: Linux

User Comments:
ppisl: Opening a file from V8 test suit with this content:

// Copyright 2016 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

var thrower = { [Symbol.toPrimitive]: () => FAIL };

// Tests that a native conversion function is included in the
// stack trace.
function testTraceNativeConversion(nativeFunc) {
  var nativeFuncName = nativeFunc.name;
  try {
    nativeFunc(thrower);
    assertUnreachable(nativeFuncName);
  } catch (e) {
    assertTrue(e.stack.indexOf(nativeFuncName) >= 0, nativeFuncName);
  }
}
 
// C++ builtins.
testTraceNativeConversion(Math.acos);
testTraceNativeConversion(Math.asin);
testTraceNativeConversion(Math.fround);
testTraceNativeConversion(Math.imul);


function testBuiltinInStackTrace(script, expectedString) {
  try {
    eval(script);
    assertUnreachable(expectedString);
  } catch (e) {
    assertTrue(e.stack.indexOf(expectedString) >= 0, expectedString);
  }
}

//




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.javascript2.editor.JsStructureScanner.getEmbededItems(JsStructureScanner.java:148)
   at org.netbeans.modules.javascript2.editor.JsStructureScanner.getEmbededItems(JsStructureScanner.java:160)
   at org.netbeans.modules.javascript2.editor.JsStructureScanner.scan(JsStructureScanner.java:114)
   at org.netbeans.modules.csl.navigation.ElementScanningTask$1.run(ElementScanningTask.java:174)
   at org.netbeans.modules.parsing.impl.TaskProcessor.callUserTask(TaskProcessor.java:609)
   at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:153)
Comment 1 Petr Pisl 2016-11-24 17:47:44 UTC
Created attachment 163017 [details]
stacktrace
Comment 2 Petr Pisl 2016-11-24 17:49:07 UTC
You can not touch the file without viewing the exception. It's frustrating.
Comment 3 Petr Pisl 2016-11-25 08:07:37 UTC
Fixed in web-main.
http://hg.netbeans.org/web-main/rev/2bb83d625334
Comment 4 Quality Engineering 2016-11-30 02:54:10 UTC
Integrated into 'main-silver', will be available in build *201611300001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/2bb83d625334
User: Petr Pisl <ppisl@netbeans.org>
Log: #269106 - NullPointerException at org.netbeans.modules.javascript2.editor.JsStructureScanner.getEmbededItems