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 168459 - crash an using new $classname
Summary: crash an using new $classname
Status: RESOLVED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All Linux
: P1 blocker (vote)
Assignee: Tomasz Slota
URL:
Keywords: REGRESSION
: 168136 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-07-13 08:48 UTC by urkman
Modified: 2009-07-23 12:21 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description urkman 2009-07-13 08:48:46 UTC
When I use a variable to create an instance of a class like this:
$t = new $classname;

I get an exception.

This seems to work in 6.7, but throws an exception in the latest build.

Urkman

PS: This is relay a show stopper on our project...
Comment 1 Tomasz Slota 2009-07-13 10:13:01 UTC
Confirmed, the head of the exception is 

java.lang.NullPointerException
	at org.netbeans.modules.php.editor.model.nodes.ASTNodeInfo.toOffsetRange(ASTNodeInfo.java:308)
	at org.netbeans.modules.php.editor.model.nodes.ASTNodeInfo.toOffsetRange(ASTNodeInfo.java:323)
	at org.netbeans.modules.php.editor.model.nodes.ASTNodeInfo.getRange(ASTNodeInfo.java:158)
	at org.netbeans.modules.php.editor.model.impl.OccurenceBuilder.setOccurenceAsCurrent(OccurenceBuilder.java:874)
Comment 2 Tomasz Slota 2009-07-13 11:21:01 UTC
fixed

http://hg.netbeans.org/web-main/rev/c17bdc5bc862
Comment 3 urkman 2009-07-14 08:01:35 UTC
Confirmed as fixed.

Thanks... Great work...

Urkman
Comment 4 Tomasz Slota 2009-07-23 12:21:25 UTC
*** Issue 168136 has been marked as a duplicate of this issue. ***