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 215648 - NullPointerException at org.netbeans.modules.javascript2.editor.model.impl.ModelUtils.getGlobalObject
Summary: NullPointerException at org.netbeans.modules.javascript2.editor.model.impl.Mo...
Status: RESOLVED FIXED
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.2
Hardware: All All
: P2 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-17 18:02 UTC by rozwell
Modified: 2012-07-25 11:24 UTC (History)
17 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 190822


Attachments
stacktrace (4.61 KB, text/plain)
2012-07-17 18:02 UTC, rozwell
Details
stacktrace (4.61 KB, text/plain)
2012-07-17 23:02 UTC, David Konecny
Details
stacktrace (4.72 KB, text/plain)
2012-07-18 06:11 UTC, Vladimir Riha
Details
stacktrace (4.61 KB, text/plain)
2012-07-18 08:14 UTC, Alexander Simon
Details
stacktrace (4.61 KB, text/plain)
2012-07-18 08:17 UTC, Alexander Simon
Details
stacktrace (4.61 KB, text/plain)
2012-07-18 09:44 UTC, Petr Jiricka
Details
stacktrace (1.90 KB, text/plain)
2012-07-18 11:53 UTC, Martin Fousek
Details
stacktrace (4.61 KB, text/plain)
2012-07-18 18:38 UTC, augcampos
Details
stacktrace (4.72 KB, text/plain)
2012-07-25 11:24 UTC, Vladimir Riha
Details

Note You need to log in before you can comment on or make changes to this bug.
Description rozwell 2012-07-17 18:02:43 UTC
Build: NetBeans IDE Dev (Build 2012-07-17_09-03-28 )
VM: OpenJDK 64-Bit Server VM, 22.0-b10, OpenJDK Runtime Environment, 1.7.0_03-b147
OS: Linux

User Comments:
rozwell: scanning projects

rozwell: scanning projects

rozwell: scanning projects

rozwell: scanning projects

rozwell: scanning projects

rozwell: scanning projects




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.javascript2.editor.model.impl.ModelUtils.getGlobalObject(ModelUtils.java:146)
   at org.netbeans.modules.javascript2.editor.model.impl.JsObjectImpl.resolveTypes(JsObjectImpl.java:326)
   at org.netbeans.modules.javascript2.editor.model.impl.JsFunctionImpl.resolveTypes(JsFunctionImpl.java:186)
   at org.netbeans.modules.javascript2.editor.model.Model.resolveLocalTypes(Model.java:121)
   at org.netbeans.modules.javascript2.editor.model.Model.getModelVisitor(Model.java:89)
   at org.netbeans.modules.javascript2.editor.model.Model.getGlobalObject(Model.java:97)
Comment 1 rozwell 2012-07-17 18:02:48 UTC
Created attachment 122114 [details]
stacktrace
Comment 2 David Konecny 2012-07-17 23:02:10 UTC
Created attachment 122125 [details]
stacktrace

I  just restarted IDE
Comment 3 Vladimir Riha 2012-07-18 06:11:07 UTC
Created attachment 122135 [details]
stacktrace

starting IDE with a fresh new userdir for the first time
Comment 4 Exceptions Reporter 2012-07-18 07:50:07 UTC
This bug already has 10 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=190822
Comment 5 soldatov 2012-07-18 08:13:09 UTC
a lot of automatic tests fails with this exception (no any javascript files in project).

WARNING [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]
java.lang.NullPointerException
	at org.netbeans.modules.javascript2.editor.model.impl.ModelUtils.getGlobalObject(ModelUtils.java:146)
	at org.netbeans.modules.javascript2.editor.model.impl.JsObjectImpl.resolveTypes(JsObjectImpl.java:326)
	at org.netbeans.modules.javascript2.editor.model.impl.JsFunctionImpl.resolveTypes(JsFunctionImpl.java:186)
	at org.netbeans.modules.javascript2.editor.model.Model.resolveLocalTypes(Model.java:121)
	at org.netbeans.modules.javascript2.editor.model.Model.getModelVisitor(Model.java:89)
	at org.netbeans.modules.javascript2.editor.model.Model.getGlobalObject(Model.java:97)
	at org.netbeans.modules.javascript2.editor.index.JsIndexer.index(JsIndexer.java:92)
	at org.netbeans.modules.parsing.spi.indexing.Indexable$MyAccessor$3.run(Indexable.java:216)
	at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater.runIndexer(RepositoryUpdater.java:259)
	at org.netbeans.modules.parsing.spi.indexing.Indexable$MyAccessor.index(Indexable.java:214)
[catch] at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work$3.run(RepositoryUpdater.java:2803)
	at org.netbeans.modules.parsing.impl.TaskProcessor.callUserTask(TaskProcessor.java:583)
Comment 6 Alexander Simon 2012-07-18 08:14:07 UTC
Created attachment 122140 [details]
stacktrace
Comment 7 Alexander Simon 2012-07-18 08:17:07 UTC
Created attachment 122141 [details]
stacktrace
Comment 8 igor_nikiforov 2012-07-18 09:33:47 UTC
This bug could become blocker for OSS IDE development process, as it breaks our automatic test and, as result, integration with the rest of Studio bits.

Leaving it P2 for now, but I will have to make it P1 if it won't be fixed by the middle of the next week.
Comment 9 Petr Jiricka 2012-07-18 09:44:07 UTC
Created attachment 122148 [details]
stacktrace

Switched to LiveHTML tab.
Comment 10 Exceptions Reporter 2012-07-18 09:53:07 UTC
This bug already has 20 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=190822
Comment 11 Martin Fousek 2012-07-18 11:53:07 UTC
Created attachment 122152 [details]
stacktrace

- just freshly opened IDE
Comment 12 Petr Pisl 2012-07-18 13:59:59 UTC
It looks like a regression from Monday.
Comment 13 Petr Pisl 2012-07-18 17:05:44 UTC
I pushed a "hotfix" for this issue: http://hg.netbeans.org/web-main/rev/e153d60626a2

The root of problem is that some assignments are added to a virtual function that wrap whole js source. This wrap function doesn't have a parent and it can not have an assignment. Unfortunately the assignments are added to this function for long time, but after fixing issue #227490 (was fixed yesterday) this was uncovered. The proper fix should be fixing the place where the assignments are added to the wrap function. I'm working on this, but it requires a small rewrite of ModelVisitor.
Comment 14 augcampos 2012-07-18 18:38:08 UTC
Created attachment 122174 [details]
stacktrace
Comment 15 Quality Engineering 2012-07-19 03:30:11 UTC
Integrated into 'main-golden', will be available in build *201207190002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/e153d60626a2
User: Petr Pisl <ppisl@netbeans.org>
Log: #215648 - NullPointerException at org.netbeans.modules.javascript2.editor.model.impl.ModelUtils.getGlobalObject
Comment 16 Vladimir Riha 2012-07-25 11:24:44 UTC
Created attachment 122350 [details]
stacktrace

started IDE (fresh user dir) and created PHP project