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 238258 - NullPointerException at org.netbeans.modules.html.angular.editor.AngularJsCodeCompletion.findHtmlContext
Summary: NullPointerException at org.netbeans.modules.html.angular.editor.AngularJsCod...
Status: VERIFIED FIXED
Alias: None
Product: web
Classification: Unclassified
Component: AngularJS (show other bugs)
Version: 8.0
Hardware: All All
: P2 normal (vote)
Assignee: Marek Fukala
URL:
Keywords: TEST
Depends on:
Blocks:
 
Reported: 2013-11-12 08:51 UTC by Vladimir Riha
Modified: 2013-11-13 10:01 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 205183


Attachments
stacktrace (2.35 KB, text/plain)
2013-11-12 08:51 UTC, Vladimir Riha
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Riha 2013-11-12 08:51:36 UTC
Build: NetBeans IDE Dev (Build 201311120002)
VM: Java HotSpot(TM) Client VM, 24.45-b08, Java(TM) SE Runtime Environment, 1.7.0_45-b18
OS: Linux

User Comments:
vriha: Invoking cc for data-bind (knockout)




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.html.angular.editor.AngularJsCodeCompletion.findHtmlContext(AngularJsCodeCompletion.java:139)
   at org.netbeans.modules.html.angular.editor.AngularJsCodeCompletion.findHtmlContext(AngularJsCodeCompletion.java:133)
   at org.netbeans.modules.html.angular.editor.AngularJsCodeCompletion.complete(AngularJsCodeCompletion.java:102)
   at org.netbeans.modules.javascript2.editor.JsCodeCompletion.complete(JsCodeCompletion.java:215)
   at org.netbeans.modules.csl.editor.completion.GsfCompletionProvider$JavaCompletionQuery.addCodeCompletionItems(GsfCompletionProvider.java:604)
   at org.netbeans.modules.csl.editor.completion.GsfCompletionProvider$JavaCompletionQuery.resolveCompletion(GsfCompletionProvider.java:591)
Comment 1 Vladimir Riha 2013-11-12 08:51:37 UTC
Created attachment 142079 [details]
stacktrace
Comment 2 Vladimir Riha 2013-11-12 08:57:14 UTC
To reproduce, please try:
 - create a new HTML5 sample KnockoutJS must play games
 - in opened html file, paste

<div data-bind="text: "></div>

 at the end of line 6
 - invoke cc after "text: |"

=> NPE

This causes functional tests for Knockout to fail constantly, see [1], test case is 

org.netbeans.modules.html.knockout.cc.CompletionTest.testBindingForEachRoot 





[1] http://test4u.cz.oracle.com/me/my-views/view/my%20trunk/job/HTML.KnockoutJS-trunk/
Comment 3 Vladimir Riha 2013-11-12 09:08:23 UTC
(In reply to Vladimir Riha from comment #2)
> test case is 
> 
> org.netbeans.modules.html.knockout.cc.CompletionTest.testBindingForEachRoot 
> 

ant -f html.knockout test-qa-functional -Dtest.class=org.netbeans.modules.html.knockout.cc.CompletionTest
Comment 4 Petr Pisl 2013-11-12 16:34:26 UTC
The exception should be fixed now in web-main.
Comment 5 Vladimir Riha 2013-11-13 10:01:44 UTC
Thanks, verified. Tests are back to normal as well.

Product Version: NetBeans IDE Dev (Build 201311130002)
Java: 1.7.0_45; Java HotSpot(TM) Client VM 24.45-b08
Runtime: Java(TM) SE Runtime Environment 1.7.0_45-b18
System: Linux version 3.2.0-48-generic-pae running on i386; UTF-8; en_US (nb)