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.
Summary: | [69cat] java.io.FileNotFoundException: FileObject C:\ws-netbeans\cs454a2\newmain1.c is not valid. | ||
---|---|---|---|
Product: | platform | Reporter: | hoon <hoon> |
Component: | Text | Assignee: | Miloslav Metelka <mmetelka> |
Status: | VERIFIED FIXED | ||
Severity: | blocker | CC: | aldobrucale, ayermolayev, bartvdc, danecek, dbell, dhagberg, dkonecny, dstrupl, epdv, FrantaM, freshapple, jglick, legec, MackSix, marfous, mariemat, mmirilovic, m_potociar, nbnathan, nigeleke1957, rip_pit, sayano, sreder, unr303, yardus, zolta |
Priority: | P1 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
URL: | http://statistics.netbeans.org/exceptions/detail.do?id=147683 | ||
Issue Type: | DEFECT | Exception Reporter: | 147683 |
Bug Depends on: | |||
Bug Blocks: | 47515 | ||
Attachments: |
stacktrace
stacktrace stacktrace stacktrace stacktrace stacktrace stacktrace stacktrace stacktrace stacktrace stacktrace stacktrace |
Description
hoon
2009-03-16 21:43:52 UTC
Created attachment 78269 [details]
stacktrace
It seems CloneableEditorSupport is trying to load not existing file. 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 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) Created attachment 79430 [details]
stacktrace
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. 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) Created attachment 81447 [details]
stacktrace
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) Created attachment 84248 [details]
stacktrace
This issue already has 6 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=147683 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) Created attachment 85663 [details]
stacktrace
This issue already has 7 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=147683 I deleted the file using the Files view while an editor was open for it. Created attachment 96332 [details]
stacktrace
"Close other documents" in editor.
This bug already has 20 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=147683 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 ... 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. As this is rather rare I am making it P3. 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
Created attachment 102801 [details]
stacktrace
clicking on settings.xml under "Project Files" (~/.m2/settings.xml has been removed meanwhile)
Created attachment 105385 [details]
stacktrace
Deleted some XML files.
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.
Created attachment 109004 [details]
stacktrace
Created attachment 112202 [details]
stacktrace
Tried to delete a few files at once. One of which was the file in the exception.
This bug has >20 exception reports so increasing priority to P2 based on Bug Priority Guidelines [1]. [1] http://wiki.netbeans.org/BugPriorityGuidelines" 84 duplicates -> P1 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. Integrated into release71: 817e11fb9bf9 transplanted to 05e2ebd7c714 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? 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) Attempt two: http://hg.netbeans.org/jet-main/rev/cd84a9552ef2 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. Nice, I did not think of using Document.TitleProperty. Will someone verify and transplant the revised fix? 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. 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. verified *** Bug 186056 has been marked as a duplicate of this bug. *** |