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 177399 - AssertionError at org.netbeans.api.javafx.source.ElementHandle.create
Summary: AssertionError at org.netbeans.api.javafx.source.ElementHandle.create
Status: VERIFIED FIXED
Alias: None
Product: javafx
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 6.x
Hardware: All All
: P1 normal (vote)
Assignee: J Bachorik
URL:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2009-11-23 02:42 UTC by Alexandr Scherbatiy
Modified: 2009-11-26 08:17 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 162699


Attachments
stacktrace (2.00 KB, text/plain)
2009-11-23 02:43 UTC, Alexandr Scherbatiy
Details
stacktrace (2.00 KB, text/plain)
2009-11-23 02:54 UTC, Alexandr Scherbatiy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandr Scherbatiy 2009-11-23 02:42:57 UTC
Build: NetBeans IDE Dev (Build 200911220201)
VM: Java HotSpot(TM) Client VM, 14.1-b02, Java(TM) SE Runtime Environment, 1.6.0_15-b03
OS: Windows XP, 5.1, x86

User Comments:
sunflower: - Create New Project ->Samples-> JavaFX -> Media Box sample
- Open com.sun.javafx.mediabox.Main file
- Go to the 'var mediaBox: MediaBox = MediaBox {' line
- Refactor -> Rename  MediaBox type to MediaBox2
The exception pops up



Stacktrace: 
java.lang.AssertionError
        at org.netbeans.api.javafx.source.ElementHandle.create(ElementHandle.java:352)
        at org.netbeans.modules.javafx.refactoring.impl.scanners.BaseRefactoringScanner.<init>(BaseRefactoringScanner.java:61)
        at org.netbeans.modules.javafx.refactoring.impl.scanners.BaseRefactoringScanner.<init>(BaseRefactoringScanner.java:69)
        at org.netbeans.modules.javafx.refactoring.impl.scanners.RenameScanner.<init>(RenameScanner.java:67)
        at org.netbeans.modules.javafx.refactoring.impl.plugins.RenameRefactoringPlugin$4.run(RenameRefactoringPlugin.java:375)
        at org.netbeans.modules.javafx.refactoring.impl.plugins.RenameRefactoringPlugin$4.run(RenameRefactoringPlugin.java:372)
Comment 1 Alexandr Scherbatiy 2009-11-23 02:43:01 UTC
Created attachment 91506 [details]
stacktrace
Comment 2 Alexandr Scherbatiy 2009-11-23 02:54:04 UTC
Created attachment 91508 [details]
stacktrace
Comment 3 Alexandr Scherbatiy 2009-11-23 03:19:10 UTC
Refactoring the MeadiBox attribute in an object literal throws the same exception:
See the exceptio report: 
http://statistics.netbeans.org/analytics/detail.do?id=162699

Steps to reproduce:
- Create New Project ->Samples-> JavaFX -> Media Box sample
- Open com.sun.javafx.mediabox.Main file
- Go to the 'var mediaBox: MediaBox = MediaBox {' object literal
- Refactor -> Rename the mediaSource attaribute to mediaSource2
The xception pops up
Comment 4 J Bachorik 2009-11-23 04:56:06 UTC
This is a regression caused by the attempt to fix #176901. It will hit the user
whenever trying to rename elements with references in other files.
Therefore, I am escalating this issue to P1 and would like to make it
68_HR_FIX_CANDIDATE.
Comment 5 J Bachorik 2009-11-23 04:58:23 UTC
Actually, the last provided scenario (renaming mediaSource to mediaSource2) is a different issue.
Comment 6 J Bachorik 2009-11-23 06:37:55 UTC
fix delivered http://hg.netbeans.org/javafx/rev/8c0c9d3644fa
Comment 7 Alexandr Scherbatiy 2009-11-24 07:46:29 UTC
verified with custom build with the fixes.

The issue is not reproduced.

However the another issue appeared:

java.lang.IllegalArgumentException: fileObject == null
    at org.netbeans.api.javafx.source.JavaFXSource.forFileObject(JavaFXSource.java:178)
    at org.netbeans.modules.javafx.source.tasklist.FXErrorAnnotator.doProcess(FXErrorAnnotator.java:299)
    at org.netbeans.modules.javafx.source.tasklist.FXErrorAnnotator.access$300(FXErrorAnnotator.java:88)
    at org.netbeans.modules.javafx.source.tasklist.FXErrorAnnotator$3.run(FXErrorAnnotator.java:301)
    at org.netbeans.modules.javafx.source.tasklist.FXErrorAnnotator$3.run(FXErrorAnnotator.java:299)
    at org.netbeans.modules.javafx.source.parsing.LegacyUserTask.run(LegacyUserTask.java:68)
    at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:129)
    at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:113)
    at org.netbeans.modules.parsing.impl.TaskProcessor.runUserTask(TaskProcessor.java:190)
Caused: org.netbeans.modules.parsing.spi.ParseException
    at org.netbeans.modules.parsing.impl.TaskProcessor.runUserTask(TaskProcessor.java:192)
    at org.netbeans.modules.parsing.api.ParserManager.parse(ParserManager.java:99)
    at org.netbeans.api.javafx.source.JavaFXSource.runUserActionTask(JavaFXSource.java:247)
    at org.netbeans.modules.javafx.source.tasklist.FXErrorAnnotator.doProcess(FXErrorAnnotator.java:299)
    at org.netbeans.modules.javafx.source.tasklist.FXErrorAnnotator.access$300(FXErrorAnnotator.java:88)
    at org.netbeans.modules.javafx.source.tasklist.FXErrorAnnotator$3.run(FXErrorAnnotator.java:301)
    at org.netbeans.modules.javafx.source.tasklist.FXErrorAnnotator$3.run(FXErrorAnnotator.java:299)
    at org.netbeans.modules.javafx.source.parsing.LegacyUserTask.run(LegacyUserTask.java:68)
    at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:129)
Comment 8 Alexandr Scherbatiy 2009-11-24 07:51:58 UTC
verified with custom build with the fixes
Comment 9 Karol Harezlak 2009-11-24 08:28:02 UTC
Changeset: http://hg.netbeans.org/javafx/rev/8c0c9d3644fa

Code reviewed.
Comment 10 Lukas Hasik 2009-11-26 08:17:26 UTC
verified in Product Version: NetBeans IDE 6.8 RC1 (Build 200911252200)