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 234644

Summary: recent changes in editor breaks C/C++ files editing
Product: editor Reporter: Vladimir Voskresensky <vv159170>
Component: Painting & PrintingAssignee: Miloslav Metelka <mmetelka>
Status: RESOLVED FIXED    
Severity: normal CC: issues, rodrigorsantos
Priority: P1 Keywords: REGRESSION
Version: 7.4   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: Deadlock upon editing an opened file in cnd

Description Vladimir Voskresensky 2013-08-20 12:51:09 UTC
Mila,

Looks like after this change 
http://hg.netbeans.org/main-silver/rev/128de1eb603d

threading was changed and modifed is called non in EDT anymore.

C++ files are no more editable...
To reproduce:
Open IDE with CND
try to modify C++ file
=> Dialog will be shown and threads are deadlocked

AWT shows dialog:
    - locked <0xc7b99ef8> (a org.openide.windows.CloneableOpenSupport$Listener)
    at org.openide.text.CloneableEditorSupport$DocFilter.checkModificationAllowed(CloneableEditorSupport.java:2329)
and
"org.netbeans.api.progress.ProgressUtils"
    at org.openide.text.DocumentOpenClose.getDocument(DocumentOpenClose.java:155)
    - waiting to lock <0xc7b99ef8> (a org.openide.windows.CloneableOpenSupport$Listener)
    at org.openide.text.CloneableEditorSupport.getDocument(CloneableEditorSupport.java:584)

Btw, if you press cancel in dialog => file is left in "modified' state =>
org.openide.text.CloneableEditorSupport$DocFilter.checkModificationAllowed
does not handle "Cancel" correctly or modified state is not handled correctly when "Cancel" was pressed.
Comment 1 Miloslav Metelka 2013-08-20 15:37:36 UTC
Created attachment 138931 [details]
Deadlock upon editing an opened file in cnd
Comment 2 Miloslav Metelka 2013-08-20 21:48:37 UTC
Hi Vladimir,
 the problem should be fixed. Thanks for the report.

http://hg.netbeans.org/jet-main/rev/65e2ecb7ed51
Comment 3 Miloslav Metelka 2013-08-22 09:39:14 UTC
*** Bug 234750 has been marked as a duplicate of this bug. ***