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 157454 - AssertionError: class org.netbeans.modules.php.editor.parser.astnodes.ReflectionVariable
Summary: AssertionError: class org.netbeans.modules.php.editor.parser.astnodes.Reflect...
Status: VERIFIED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker with 4 votes (vote)
Assignee: Tomasz Slota
URL: http://statistics.netbeans.org/except...
Keywords:
: 157661 157887 158572 158584 159109 161808 164136 166286 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-01-26 15:55 UTC by markdavidphipps
Modified: 2009-06-01 09:30 UTC (History)
14 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 145541


Attachments
stacktrace (6.67 KB, text/plain)
2009-01-26 15:55 UTC, markdavidphipps
Details

Note You need to log in before you can comment on or make changes to this bug.
Description markdavidphipps 2009-01-26 15:55:05 UTC
Build: NetBeans IDE Dev (Build 2009-01-26_12-37-36)
VM: Java HotSpot(TM) Server VM, 10.0-b23, Java(TM) SE Runtime Environment, 1.6.0_07-b06
OS: Windows XP, 5.1, x86

User Comments:
markdavidphipps: moving about a file

GUEST: loading new site from existing directory

GUEST: Open project

markdavidphipps: moving about a file



Stacktrace: 
java.lang.AssertionError: class org.netbeans.modules.php.editor.parser.astnodes.ReflectionVariable
        at org.netbeans.modules.php.editor.CodeUtils.extractVariableName(CodeUtils.java:145)
        at org.netbeans.modules.php.editor.model.impl.ModelVisitor.visit(ModelVisitor.java:333)
        at org.netbeans.modules.php.editor.parser.astnodes.Variable.accept(Variable.java:107)
        at org.netbeans.modules.php.editor.parser.astnodes.visitors.DefaultVisitor.scan(DefaultVisitor.java:51)
        at org.netbeans.modules.php.editor.model.impl.ModelVisitor.scan(ModelVisitor.java:143)
        at org.netbeans.modules.php.editor.parser.astnodes.visitors.DefaultVisitor.scan(DefaultVisitor.java:58)
Comment 1 markdavidphipps 2009-01-26 15:55:10 UTC
Created attachment 76242 [details]
stacktrace
Comment 2 Exceptions Reporter 2009-01-26 21:09:18 UTC
This issue has already 5 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=145541
Comment 3 Exceptions Reporter 2009-02-05 15:33:51 UTC
This issue has already 50 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=145541
Comment 4 compucoder 2009-02-12 21:37:19 UTC
I have found what causes this error! See the code sample below.

// $db is an ADODB connection - any object causes the failure though

// works
$query="
	update budgets set
	title = ".$db->qstr($this->$titles).",
";

// crashes after save or switching tab - even after -> in some cases :(
$query="
	update budgets set
	title = {$db->qstr($this->$titles)}
";

It looks like the parser is having trouble with this code in a double quoted string: {$db->qstr($this->$titles)}

Hopefully it can get resolved now that the cause is known.

Comment 5 Tomasz Slota 2009-02-15 13:11:42 UTC
reproducible
Comment 6 Tomasz Slota 2009-02-15 13:52:38 UTC
fixed in trunk

http://hg.netbeans.org/main/rev/c413e415740c
Comment 7 Tomasz Slota 2009-02-16 13:19:14 UTC
*** Issue 158584 has been marked as a duplicate of this issue. ***
Comment 8 Tomasz Slota 2009-02-16 13:19:23 UTC
*** Issue 158572 has been marked as a duplicate of this issue. ***
Comment 9 Tomasz Slota 2009-02-16 13:19:42 UTC
*** Issue 157887 has been marked as a duplicate of this issue. ***
Comment 10 Quality Engineering 2009-02-18 10:22:35 UTC
Integrated into 'main-golden', will be available in build *200902180201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/c413e415740c
User: Tomasz Slota <tslota@netbeans.org>
Log: #157454: AssertionError: class org.netbeans.modules.php.editor.parser.astnodes.ReflectionVariable
Comment 11 phpmyforum 2009-03-06 08:18:01 UTC
For me it's still not fixed with Build 200903031401.

See also: http://statistics.netbeans.org/analytics/exception.do?id=171924
Comment 12 Tomasz Slota 2009-03-16 15:04:16 UTC
phpmyforum: this was a little bit different problem reproducible in very different situations. Anyways, I have just replaced the assertion with a debug message 
so nothing similar should occur in the future.

http://hg.netbeans.org/web-main/rev/189779d6167b
Comment 13 Quality Engineering 2009-03-17 08:33:24 UTC
Integrated into 'main-golden', will be available in build *200903170201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/189779d6167b
User: Tomasz Slota <tslota@netbeans.org>
Log: #157454: AssertionError: class org.netbeans.modules.php.editor.parser.astnodes.ReflectionVariable
Comment 14 Tomasz Slota 2009-03-17 14:53:08 UTC
*** Issue 159109 has been marked as a duplicate of this issue. ***
Comment 15 Tomasz Slota 2009-04-03 09:22:47 UTC
*** Issue 161808 has been marked as a duplicate of this issue. ***
Comment 16 rmatous 2009-04-09 17:09:27 UTC
*** Issue 157661 has been marked as a duplicate of this issue. ***
Comment 17 Filip Zamboj 2009-04-20 17:07:15 UTC
verified on 
Product Version: NetBeans IDE 6.7 Beta (Build 200904192254)
Java: 1.6.0_13; Java HotSpot(TM) 64-Bit Server VM 11.3-b02
Comment 18 Tomasz Slota 2009-05-19 09:01:33 UTC
*** Issue 164136 has been marked as a duplicate of this issue. ***
Comment 19 Tomasz Slota 2009-06-01 09:30:37 UTC
*** Issue 166286 has been marked as a duplicate of this issue. ***