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 207478 - getInputStream invoked in AWT from CloneableEditorSupport$Listener$1.run ->reload
Summary: getInputStream invoked in AWT from CloneableEditorSupport$Listener$1.run ->re...
Status: RESOLVED DUPLICATE of bug 228991
Alias: None
Product: platform
Classification: Unclassified
Component: Text (show other bugs)
Version: 7.2
Hardware: All All
: P3 normal (vote)
Assignee: Miloslav Metelka
URL:
Keywords: PERFORMANCE
: 186084 229719 (view as bug list)
Depends on:
Blocks: 206311
  Show dependency tree
 
Reported: 2012-01-18 17:01 UTC by Petr Cyhelsky
Modified: 2013-08-28 12:06 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 184547


Attachments
stacktrace (2.50 KB, text/plain)
2012-01-18 17:01 UTC, Petr Cyhelsky
Details
stacktrace (2.50 KB, text/plain)
2012-01-25 13:23 UTC, Petr Cyhelsky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Cyhelsky 2012-01-18 17:01:22 UTC
Build: NetBeans IDE Dev (Build 20120118-ab16ccd545a5)
VM: OpenJDK 64-Bit Server VM, 20.0-b11, OpenJDK Runtime Environment, 1.6.0_22-b22
OS: Linux

User Comments:
cyhelsky: refactor| undo eextract superclass




Stacktrace: 
java.lang.IllegalStateException: getInputStream invoked in AWT
   at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FileObj.getInputStream(FileObj.java:219)
   at org.openide.text.DataEditorSupport$Env.inputStream(DataEditorSupport.java:883)
   at org.openide.text.CloneableEditorSupport.loadDocument(CloneableEditorSupport.java:2117)
   at org.openide.text.CloneableEditorSupport.access$2800(CloneableEditorSupport.java:129)
   at org.openide.text.CloneableEditorSupport$Listener.run(CloneableEditorSupport.java:2927)
   at org.openide.text.CloneableEditorSupport$6$1Query.call(CloneableEditorSupport.java:1776)
Comment 1 Petr Cyhelsky 2012-01-18 17:01:25 UTC
Created attachment 115046 [details]
stacktrace
Comment 2 Petr Cyhelsky 2012-01-25 13:23:21 UTC
Created attachment 115228 [details]
stacktrace
Comment 3 Marian Mirilovic 2012-04-16 13:04:16 UTC
Increasing priority to P2 - after discussion with performance team and based on the goal for NB 7.2 (performance improvements) especially for remote filesystems.
Comment 4 Miloslav Metelka 2012-05-22 09:22:47 UTC
The reload occurs in CloneableEditorSupport.reloadDocument() during

  getListener().run();

in the CES.Query.call(). There are additional actions to be performed after actual reload (setting caret etc.)
I may attempt to move the code from reloadDocument() into prepareDocument() where I'll check for DOCUMENT_RELOADING status.
Given the CES code and threading complexity I would rather do it at a begining of 7.3 cycle but I'll try and we can possibly rollback it for 7.2.
Comment 5 David Strupl 2012-06-20 09:22:37 UTC
After discussion with performance team  making it P3 again.
Comment 6 David Strupl 2012-10-11 07:29:20 UTC
*** Bug 186084 has been marked as a duplicate of this bug. ***
Comment 7 Miloslav Metelka 2013-06-05 14:57:53 UTC
*** Bug 229719 has been marked as a duplicate of this bug. ***
Comment 8 Miloslav Metelka 2013-06-05 15:03:16 UTC
The document contents replacement should be done in AWT. I remember we tried it a long ago in RP but there were deadlocks.
What we should attempt is to pre-load the contents of the file being reloaded outside of AWT into a String and then insert it in AWT. I've already implemented a similar approach in saveDocument() for file's saving in the past.
Comment 9 Miloslav Metelka 2013-08-28 12:06:20 UTC
Issue #228991 now reposts document loading during the reload into Document Processing RP thread.

*** This bug has been marked as a duplicate of bug 228991 ***