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 176381

Summary: Code formatting blocks IDE
Product: javafx Reporter: Alexandr Scherbatiy <sunflower>
Component: EditorAssignee: Anton Chechel <manowar>
Status: VERIFIED FIXED    
Severity: normal    
Priority: P1    
Version: 6.x   
Hardware: PC   
OS: Windows XP   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 173487    
Attachments: IDE log file
IDE Thread Dump

Description Alexandr Scherbatiy 2009-11-10 05:08:17 UTC
Product Version         = NetBeans IDE Dev (Build 200911091156) (#fa9887b26708)
  Operating System        = Windows XP version 5.1 running on x86
  Java; VM; Vendor        = 1.6.0_15; Java HotSpot(TM) Client VM 14.1-b02; Sun Microsystems Inc.


Steps to reproduce:

- Copy the code to the editor:
--------------------------------------------------------------------
class D{
    var a:D;
}


class B extends D{
     override var a = D{};
}
--------------------------------------------------------------------

- Format the code
The IDE is blocked


There NPE in the IDE log file:

java.lang.NullPointerException
	at org.netbeans.modules.javafx.editor.format.JFXReformatTask$Pretty.visitVariable(JFXReformatTask.java:978)
	at org.netbeans.modules.javafx.editor.format.JFXReformatTask$Pretty.visitVariable(JFXReformatTask.java:464)
	at com.sun.tools.javafx.tree.JFXVarBase.accept(JFXVarBase.java:53)
	at com.sun.javafx.api.tree.JavaFXTreePathScanner.scan(JavaFXTreePathScanner.java:63)
	at org.netbeans.modules.javafx.editor.format.JFXReformatTask$Pretty.scan(JFXReformatTask.java:618)
	at org.netbeans.modules.javafx.editor.format.JFXReformatTask$Pretty.processClassMembers(JFXReformatTask.java:842)
	at org.netbeans.modules.javafx.editor.format.JFXReformatTask$Pretty.visitClassDeclaration(JFXReformatTask.java:805)
	at org.netbeans.modules.javafx.editor.format.JFXReformatTask$Pretty.visitClassDeclaration(JFXReformatTask.java:464)
	at com.sun.tools.javafx.tree.JFXClassDeclaration.accept(JFXClassDeclaration.java:149)
Comment 1 Alexandr Scherbatiy 2009-11-10 05:09:30 UTC
Created attachment 90698 [details]
IDE log file
Comment 2 Alexandr Scherbatiy 2009-11-10 05:10:02 UTC
Created attachment 90699 [details]
IDE Thread Dump
Comment 3 Anton Chechel 2009-11-13 03:58:10 UTC
*** Bug 176239 has been marked as a duplicate of this bug. ***
Comment 4 Anton Chechel 2009-11-13 09:44:24 UTC
NPE was fixed
and according to log (issue #176239) there is no deadlock.

It waits in runOffEDT() and editorPane wants to redraw itself and waits to readLock of document. User must wait till the end of reformatting process. After 6.8 editor guys will improve it.
Comment 5 Alexandr Scherbatiy 2009-11-19 05:20:45 UTC
verified in Build 200911190201