Bug 160409 - [69cat] java.io.FileNotFoundException: FileObject C:\ws-netbeans\cs454a2\newmain1.c is not valid.
[69cat] java.io.FileNotFoundException: FileObject C:\ws-netbeans\cs454a2\newm...
Status: VERIFIED FIXED
Product: platform
Classification: Unclassified
Component: Text
6.x
All All
: P1 (vote)
: 7.1
Assigned To: Miloslav Metelka
issues@platform
http://statistics.netbeans.org/except...
EXCEPTIONS_REPORT
: 71_HR_FIX
: 186056 (view as bug list)
Depends on:
Blocks: 47515
  Show dependency treegraph
 
Reported: 2009-03-16 21:43 UTC by hoon
Modified: 2012-10-15 08:15 UTC (History)
26 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
stacktrace (1.23 KB, text/plain)
2009-03-16 21:44 UTC, hoon
Details
stacktrace (6.66 KB, text/plain)
2009-04-04 05:35 UTC, nigeleke1957
Details
stacktrace (2.62 KB, text/plain)
2009-05-04 07:17 UTC, nbnathan
Details
stacktrace (6.60 KB, text/plain)
2009-07-01 13:30 UTC, danecek
Details
stacktrace (4.88 KB, text/plain)
2009-08-02 23:43 UTC, Exceptions Reporter
Details
stacktrace (1.11 KB, text/plain)
2010-03-30 12:37 UTC, Peter Nabbefeld
Details
stacktrace (1.11 KB, text/plain)
2010-05-17 13:07 UTC, aldobrucale
Details
stacktrace (1.11 KB, text/plain)
2010-11-04 14:29 UTC, J Bachorik
Details
stacktrace (1.11 KB, text/plain)
2011-01-26 23:37 UTC, Jesse Glick
Details
stacktrace (1.11 KB, text/plain)
2011-04-12 06:42 UTC, Martin Fousek
Details
stacktrace (1.11 KB, text/plain)
2011-06-20 22:50 UTC, David Konecny
Details
stacktrace (2.04 KB, text/plain)
2011-10-19 03:56 UTC, dbell
Details

Note You need to log in before you can comment on or make changes to this bug.
Description hoon 2009-03-16 21:43:52 UTC
Build: NetBeans IDE Dev (Build 200903121546)
VM: Java HotSpot(TM) 64-Bit Server VM, 14.0-b12, Java(TM) SE Runtime Environment, 1.6.0_14-ea-b03
OS: Windows Vista, 6.0, amd64

User Comments:
hoon: Deleted files from "Source Files."



Stacktrace: 
java.io.FileNotFoundException: FileObject C:\ws-netbeans\cs454a2\newmain1.c is not valid.
        at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FileObj.getInputStream(FileObj.java:137)
        at org.openide.text.DataEditorSupport$Env.inputStream(DataEditorSupport.java:689)
        at org.openide.text.CloneableEditorSupport.loadDocument(CloneableEditorSupport.java:2027)
        at org.openide.text.CloneableEditorSupport.access$2800(CloneableEditorSupport.java:120)
        at org.openide.text.CloneableEditorSupport$Listener.run(CloneableEditorSupport.java:2833)
        at org.openide.text.CloneableEditorSupport$2.doRun(CloneableEditorSupport.java:649)
Comment 1 hoon 2009-03-16 21:44:01 UTC
Created attachment 78269 [details]
stacktrace
Comment 2 Jiri Skrivanek 2009-03-17 09:20:04 UTC
It seems CloneableEditorSupport is trying to load not existing file.
Comment 3 mslama 2009-03-19 15:52:24 UTC
It is somehow reproducible? It looks like file was deleted when editor opening was in progress. Normally if editor is
already opened and file is deleted IDE refreshes file system and closes any editors for deleted files.

I tried to improve logging to IDE log so that also caller call stack is logged. Now only inner worker thread call stack
is logged. I need to reproduce this to see who reports this exception. Normal opening only logs this exception at INFO
level to message log. Or if you able to reproduce this please take new dev build with changeset 3861d45fff16. I will
give a note here when build will be available. Then I need part of IDE log with call stack starting with:
INFO [org.openide.text.CloneableEditorSupport]: Outer callstack
Comment 4 nigeleke1957 2009-04-04 05:35:01 UTC
Build: NetBeans IDE Dev (Build 200904011705)
VM: Java HotSpot(TM) 64-Bit Server VM, 11.0-b15, Java(TM) SE Runtime Environment, 1.6.0_10-b33
OS: Linux, 2.6.27-11-generic, amd64

User Comments: 
Deleting module (including source) which had a source file open in an open window.

Stacktrace: 
org.openide.text.CloneableEditorSupport$DelegateIOExc: FileObject /home/nigel/Projects/com.nigeleke/tablemanners/Table Manners/Rich Client UI/build.xml is not valid.
        at org.openide.text.CloneableEditorSupport$Listener.run(CloneableEditorSupport.java:2849)
        at org.openide.util.Task.run(Task.java:249)
        at org.openide.text.CloneableEditorSupport$5$1Query.call(CloneableEditorSupport.java:1606)
        at org.openide.text.CloneableEditorSupport$5.run(CloneableEditorSupport.java:1618)
        at org.netbeans.editor.GuardedDocument.runAtomic(GuardedDocument.java:324)
        at org.openide.text.NbDocument.runAtomic(NbDocument.java:384)
Comment 5 nigeleke1957 2009-04-04 05:35:06 UTC
Created attachment 79430 [details]
stacktrace
Comment 6 mslama 2009-04-07 15:21:25 UTC
I tried to reproduce with deleting project with opened source file (including build.xml) in editor. I tried JavaApp and
DesktopApp but cannot reproduce. It works as expected ie. editors are closed, no reload is performed on already deleted
file. Is there any way how to reproduce it? How often does it happen? I need to know what happens to be able to ignore
reload. If I have no more info I can only cancel reload when file would be invalid already.
Comment 7 nbnathan 2009-05-04 07:16:47 UTC
This issue was originally marked as duplicate of issue 137078, that is already fixed. This issue is still valid, so this seems to be another issue, but it might be related.

Build: NetBeans IDE 6.7 Beta (Build 200904242137)
VM: Java HotSpot(TM) Client VM, 11.3-b02, Java(TM) SE Runtime Environment, 1.6.0_13-b03
OS: Linux, 2.6.28-11-generic, i386

User Comments: 
not sure, was looking in another window

Stacktrace: 
org.openide.text.CloneableEditorSupport$DelegateIOExc: FileObject /home/nathan/code/ticketfly/1.1/apps/inventory/inventory/test/reports/plain/TEST-com.ticketfly.inventory.services.SaleServiceTests.txt is not valid.
        at org.openide.text.CloneableEditorSupport$Listener.run(CloneableEditorSupport.java:2868)
        at org.openide.util.Task.run(Task.java:249)
        at org.openide.text.CloneableEditorSupport$5$1Query.call(CloneableEditorSupport.java:1602)
        at org.openide.text.CloneableEditorSupport$5.run(CloneableEditorSupport.java:1614)
        at org.netbeans.editor.GuardedDocument.runAtomic(GuardedDocument.java:324)
        at org.openide.text.NbDocument.runAtomic(NbDocument.java:384)
Comment 8 nbnathan 2009-05-04 07:17:01 UTC
Created attachment 81447 [details]
stacktrace
Comment 9 danecek 2009-07-01 13:30:51 UTC
Build: NetBeans IDE 6.7 (Build 200906241340)
VM: Java HotSpot(TM) Client VM, 14.0-b16, Java(TM) SE Runtime Environment, 1.6.0_14-b08
OS: Linux, 2.6.27.23-0.1-pae, i386

User Comments: 
deleting project

Stacktrace: 
java.io.FileNotFoundException: FileObject /home/danecek/CppApplication_1/nbproject/project.xml is not valid.
        at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FileObj.getInputStream(FileObj.java:137)
        at org.openide.text.DataEditorSupport$Env.inputStream(DataEditorSupport.java:730)
        at org.openide.text.CloneableEditorSupport.loadDocument(CloneableEditorSupport.java:2036)
        at org.openide.text.CloneableEditorSupport.access$2800(CloneableEditorSupport.java:120)
        at org.openide.text.CloneableEditorSupport$Listener.run(CloneableEditorSupport.java:2872)
        at org.openide.util.Task.run(Task.java:249)
Comment 10 danecek 2009-07-01 13:30:58 UTC
Created attachment 84248 [details]
stacktrace
Comment 11 Exceptions Reporter 2009-07-01 13:31:04 UTC
This issue already has 6 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=147683
Comment 12 Exceptions Reporter 2009-08-02 23:43:48 UTC
Build: NetBeans IDE 6.7 (Build 200906241340)
VM: Java HotSpot(TM) Client VM, 11.3-b02, Java(TM) SE Runtime Environment, 1.6.0_13-b03
OS: Windows Vista, 6.0, x86

User Comments: 
had groovy enabled in a project then disabled it, error occurred.

Stacktrace: 
java.io.FileNotFoundException: FileObject C:\Users\Riz\Documents\NetBeansProjects\AmazonAdvertisingAPI\nbproject\groovy-build.xml is not valid.
        at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FileObj.getInputStream(FileObj.java:137)
        at org.openide.text.DataEditorSupport$Env.inputStream(DataEditorSupport.java:730)
        at org.openide.text.CloneableEditorSupport.loadDocument(CloneableEditorSupport.java:2036)
        at org.openide.text.CloneableEditorSupport.access$2800(CloneableEditorSupport.java:120)
        at org.openide.text.CloneableEditorSupport$Listener.run(CloneableEditorSupport.java:2872)
        at org.openide.util.Task.run(Task.java:249)
Comment 13 Exceptions Reporter 2009-08-02 23:43:53 UTC
Created attachment 85663 [details]
stacktrace
Comment 14 Exceptions Reporter 2009-08-02 23:43:59 UTC
This issue already has 7 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=147683
Comment 15 misterm 2010-03-25 19:26:18 UTC
I deleted the file using the Files view while an editor was open for it.
Comment 16 Peter Nabbefeld 2010-03-30 12:37:43 UTC
Created attachment 96332 [details]
stacktrace

"Close other documents" in editor.
Comment 17 Exceptions Reporter 2010-03-30 12:37:55 UTC
This bug already has 20 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=147683
Comment 18 Peter Nabbefeld 2010-03-30 12:44:00 UTC
When looking at the comments, it seems the FileObject is removed before closing the editor. Probably there're different references to FileObjects (i.e. usually more than one)? If the last existing reference is "weak", there might be a race condition with gc (this might explain the problems reproducing the bug). Just an idea ...
Comment 19 Peter Nabbefeld 2010-03-30 14:11:22 UTC
In my case, this additional trace info might help (seems, as if Navigator'd still holds a reference to the FileObject):

INFO [org.openide.text.CloneableEditorSupport]: Outer callstack
java.lang.Exception
        at org.openide.text.CloneableEditorSupport.openDocumentImpl(CloneableEditorSupport.java:874)
        at org.openide.text.CloneableEditorSupport.openDocumentImpl(CloneableEditorSupport.java:856)
        at org.openide.text.CloneableEditorSupport.openDocumentCheckIOE(CloneableEditorSupport.java:836)
        at org.openide.text.CloneableEditorSupport.openDocument(CloneableEditorSupport.java:818)
        at org.openide.text.DataEditorSupport.openDocument(DataEditorSupport.java:493)
        at org.netbeans.modules.xml.text.navigator.NavigatorContent.navigate(NavigatorContent.java:132)
        at org.netbeans.modules.xml.text.navigator.NavigatorContent$2.run(NavigatorContent.java:291)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
        at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:133)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
[catch] at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

However, looking at some of the stack traces here, they seem to address different problems :-(
Probably I'd file a new bug report.
Comment 20 David Strupl 2010-04-06 20:01:17 UTC
As this is rather rare I am making it P3.
Comment 21 aldobrucale 2010-05-17 13:07:52 UTC
Created attachment 99083 [details]
stacktrace

I have renamed an xml file; a node with the previous name is still in the tree; the exception was thrown when I clicked (or just selected?) the node
Comment 22 J Bachorik 2010-11-04 14:29:20 UTC
Created attachment 102801 [details]
stacktrace

clicking on settings.xml under "Project Files" (~/.m2/settings.xml has been removed meanwhile)
Comment 23 Jesse Glick 2011-01-26 23:37:11 UTC
Created attachment 105385 [details]
stacktrace

Deleted some XML files.
Comment 24 Martin Fousek 2011-04-12 06:42:32 UTC
Created attachment 107662 [details]
stacktrace

100% reproducible test case:
1, I have maven J2SE project
2, added spring to classpath
3, in project properties added something as spring conf. file
4, click OK
5, in any file manager delete created nb-configuration.xml file
6, click into the IDE on the deleted file
-> FileNotFoundException appear

I know, not so common usecase, but would be possible at least to wrap the exception into some dialog or replace it with another notification message.
Comment 25 David Konecny 2011-06-20 22:50:23 UTC
Created attachment 109004 [details]
stacktrace
Comment 26 dbell 2011-10-19 03:56:50 UTC
Created attachment 112202 [details]
stacktrace

Tried to delete a few files at once. One of which was the file in the exception.
Comment 27 dbell 2011-10-19 10:00:50 UTC
This bug has >20 exception reports so increasing priority to P2 based on Bug Priority Guidelines [1].
[1] http://wiki.netbeans.org/BugPriorityGuidelines"
Comment 28 Marian Mirilovic 2011-11-24 10:16:00 UTC
84 duplicates -> P1
Comment 29 Miloslav Metelka 2011-11-30 14:35:08 UTC
Now only a warning message will be shown (not exception) which is IMHO the best solution (at least all we can do for 7.1).
Thanks to Honza L. for the fix recommendation.
http://hg.netbeans.org/jet-main/rev/817e11fb9bf9

I'd like to ask QE for verification.
Comment 30 Miloslav Metelka 2011-11-30 14:44:26 UTC
Integrated into release71:
817e11fb9bf9 transplanted to 05e2ebd7c714
Comment 31 Jesse Glick 2011-11-30 20:47:30 UTC
I had to back this fix out in core-main #fc8d8a2f26c0 as it regressed the test for bug #47515, Deadlock47515Test - legitimately I think, since the introduced code could introduce a deadlock if run against certain file types, such as Ant scripts, which have a nontrivial messageName implementation. Perhaps use a generic message which does not try to call messageName?
Comment 32 Quality Engineering 2011-12-01 07:06:08 UTC
Integrated into 'releases'
Changeset: http://hg.netbeans.org/releases/rev/05e2ebd7c714
User: Miloslav Metelka <mmetelka@netbeans.org>
Log: #160409 - [69cat] java.io.FileNotFoundException: FileObject C:\ws-netbeans\cs454a2\newmain1.c is not valid.
(transplanted from 817e11fb9bf9bd4e554d7f3c9be6d7c9c4919f91)
Comment 33 Jan Lahoda 2011-12-01 09:21:23 UTC
Attempt two:
http://hg.netbeans.org/jet-main/rev/cd84a9552ef2
Comment 34 Quality Engineering 2011-12-01 12:08:18 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/817e11fb9bf9
User: Miloslav Metelka <mmetelka@netbeans.org>
Log: #160409 - [69cat] java.io.FileNotFoundException: FileObject C:\ws-netbeans\cs454a2\newmain1.c is not valid.
Comment 35 Jesse Glick 2011-12-01 14:19:39 UTC
Nice, I did not think of using Document.TitleProperty. Will someone verify and transplant the revised fix?
Comment 36 Jan Lahoda 2011-12-01 15:23:14 UTC
release71:
http://hg.netbeans.org/releases/rev/c12f182e2247
Comment 37 Quality Engineering 2011-12-02 07:55:55 UTC
Integrated into 'releases'
Changeset: http://hg.netbeans.org/releases/rev/c12f182e2247
User: Jan Lahoda <jlahoda@netbeans.org>
Log: #160409: attaching a text to the exception, so that a user-friendly dialog is shown instead of the exception. Using Document.TitleProperty instead of messageName.
Comment 38 Quality Engineering 2011-12-02 16:43:18 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/cd84a9552ef2
User: Jan Lahoda <jlahoda@netbeans.org>
Log: #160409: attaching a text to the exception, so that a user-friendly dialog is shown instead of the exception. Using Document.TitleProperty instead of messageName.
Comment 39 Jiri Prox 2011-12-07 14:20:44 UTC
verified
Comment 40 David Strupl 2012-10-15 08:15:59 UTC
*** Bug 186056 has been marked as a duplicate of this bug. ***


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo