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 236019 - NullPointerException at org.netbeans.modules.javascript2.editor.model.impl.ModelUtils.resolveAssignments
Summary: NullPointerException at org.netbeans.modules.javascript2.editor.model.impl.Mo...
Status: VERIFIED FIXED
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.4
Hardware: All All
: P2 normal (vote)
Assignee: Petr Pisl
URL:
Keywords: 7.4_HR_FIX
Depends on:
Blocks:
 
Reported: 2013-09-16 11:24 UTC by Vladimir Riha
Modified: 2013-09-26 11:33 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 203901


Attachments
stacktrace (2.53 KB, text/plain)
2013-09-16 11:24 UTC, Vladimir Riha
Details
sample file (872 bytes, text/plain)
2013-09-16 11:25 UTC, Vladimir Riha
Details
stacktrace (2.53 KB, text/plain)
2013-09-16 11:36 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-09-16 11:24:17 UTC
Build: NetBeans IDE 7.4 RC1 (Build 201309152201)
VM: Java HotSpot(TM) Client VM, 25.0-b49, Java(TM) SE Runtime Environment, 1.8.0-ea-b107
OS: Linux

User Comments:
vriha: happened when editing HTML with KnockoutJS inside




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.javascript2.editor.model.impl.ModelUtils.resolveAssignments(ModelUtils.java:1085)
   at org.netbeans.modules.javascript2.editor.model.impl.ModelUtils.resolveAssignments(ModelUtils.java:1078)
   at org.netbeans.modules.javascript2.editor.model.impl.ModelUtils.resolveTypeFromExpression(ModelUtils.java:788)
   at org.netbeans.modules.javascript2.editor.model.impl.ModelUtils.resolveTypes(ModelUtils.java:1020)
   at org.netbeans.modules.javascript2.editor.JsCompletionItem$Factory.create(JsCompletionItem.java:532)
   at org.netbeans.modules.javascript2.editor.JsCodeCompletion.complete(JsCodeCompletion.java:213)
Comment 1 Vladimir Riha 2013-09-16 11:24:18 UTC
Created attachment 140119 [details]
stacktrace
Comment 2 Vladimir Riha 2013-09-16 11:25:28 UTC
Created attachment 140120 [details]
sample file

To reproduce, invoke cc on line 19 after text: and make sure to have full type resolution for JS completion unchecked
Comment 3 Vladimir Riha 2013-09-16 11:36:03 UTC
Created attachment 140121 [details]
stacktrace

invoking cc in HTML with Knockout
Comment 4 Vladimir Riha 2013-09-16 11:51:17 UTC
Please evaluate for possibly HR_FIX. I think more duplicates will be coming wrt issue 233815
Comment 5 Petr Pisl 2013-09-16 12:35:26 UTC
The fix is not hard:). Will me available during a while.
Comment 6 Petr Pisl 2013-09-16 12:53:02 UTC
I have fixed it in web-main: http://hg.netbeans.org/web-main/rev/d739b503f7ff
Comment 7 Vladimir Riha 2013-09-16 12:55:15 UTC
Thanks for quick fix, I'll test it in first web-main build.
Comment 8 Petr Pisl 2013-09-16 18:29:49 UTC
Let me know the result. Then I will integrated it into the releases immediately.
Comment 9 Vladimir Riha 2013-09-16 19:51:23 UTC
Cannot reproduce, verified in web-main


Product Version: NetBeans IDE Dev (Build web-main-11616-on-20130916)
Java: 1.7.0_11; Java HotSpot(TM) 64-Bit Server VM 23.6-b04
Runtime: Java(TM) SE Runtime Environment 1.7.0_11-b21
System: Linux version 3.8.0-23-generic running on amd64; UTF-8; en_US (nb)
Comment 10 Petr Pisl 2013-09-17 06:54:27 UTC
Transplanted to the releases: http://hg.netbeans.org/releases/rev/e9a708928327
Comment 11 Vladimir Riha 2013-09-26 11:33:48 UTC
Verified

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