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.
I created a few files from template and was editing them when the IDE locked up. The stack trace shows a deadlock, which appears to have to do with reading javacvs file attributes. One strange thing: The JVM appears to be in the middle of constructing a TopComponent (org.netbeans.modules.cvsclient.commands.DefaultInfoPanel), but I had not performed any action that should cause any such component to be opened - I was simply typing in the editor. Found one Java-level deadlock: ============================= "Java source parsing": waiting to lock monitor 0x15b578 (object 0xe763ef08, a java.awt.Component$AWTTreeLock), which is held by "AWT-EventQueue-0" "AWT-EventQueue-0": waiting to lock monitor 0x15b5b0 (object 0xe602fd90, a org.netbeans.modules.cvsclient.NbJavaCvsFileSystem$JavaCvsAttributes), which is held by "Java source parsing" Java stack information for the threads listed above: =================================================== "Java source parsing": at java.awt.KeyboardFocusManager.clearMostRecentFocusOwner(KeyboardFocusManager.java:1630) - waiting to lock <e763ef08> (a java.awt.Component$AWTTreeLock) at java.awt.Component.setFocusable(Component.java:5652) at sun.reflect.GeneratedMethodAccessor114.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.openide.windows.TopComponent.<init>(TopComponent.java:130) at org.netbeans.modules.cvsclient.commands.DefaultInfoPanel.<init>(DefaultInfoPanel.java:41) at org.netbeans.modules.cvsclient.commands.ErrorLogPanel.<init>(ErrorLogPanel.java:56) at org.netbeans.modules.cvsclient.commands.ErrorLogPanel.<init>(ErrorLogPanel.java:65) at org.netbeans.modules.cvsclient.caching.NbCvsFsCache.addRefreshDisplayers(NbCvsFsCache.java:187) at org.netbeans.modules.javacvs.caching.CvsFsCache.doRefresh(CvsFsCache.java:580) at org.netbeans.modules.javacvs.caching.CvsFsCache.checkDirectoryAutorefresh(CvsFsCache.java:149) at org.netbeans.modules.javacvs.caching.CvsFsCache.getFileStatusOnly(CvsFsCache.java:179) at org.netbeans.modules.javacvs.JavaCvsFileSystem.checkVirtual(JavaCvsFileSystem.java:1745) at org.netbeans.modules.javacvs.JavaCvsFileSystem$InfoImpl.outputStream(JavaCvsFileSystem.java:966) at org.netbeans.modules.cvsclient.NbJavaCvsFileSystem$NbInfoImpl.outputStream(NbJavaCvsFileSystem.java:532) at org.openide.filesystems.DefaultAttributes.saveTable(DefaultAttributes.java:478) at org.openide.filesystems.DefaultAttributes.writeAttribute(DefaultAttributes.java:339) - locked <e602fd90> (a org.netbeans.modules.cvsclient.NbJavaCvsFileSystem$JavaCvsAttributes) at org.netbeans.modules.cvsclient.NbJavaCvsFileSystem$JavaCvsAttributes.writeAttribute(NbJavaCvsFileSystem.java:1780) at org.openide.filesystems.AbstractFileObject.setAttribute(AbstractFileObject.java:287) at org.openide.filesystems.MultiFileObject.setAttribute(MultiFileObject.java:764) at org.openide.filesystems.MultiFileObject.setAttribute(MultiFileObject.java:736) at org.openide.loaders.ConnectionSupport.register(ConnectionSupport.java:121) - locked <eb5c4960> (a org.netbeans.modules.java.codesync.ModelEventAdapter) at org.netbeans.modules.java.codesync.SourceConnectionSupport.registerDependency(SourceConnectionSupport.java:475) at org.netbeans.modules.java.codesync.SourceConnectionSupport.addDependency(SourceConnectionSupport.java:554) at org.netbeans.modules.java.codesync.ClassDependencyImpl.supertypesAdded(ClassDependencyImpl.java:239) at org.netbeans.modules.java.codesync.ClassDependencyImpl.refreshClass(ClassDependencyImpl.java:119) at org.netbeans.modules.java.codesync.SourceConnectionSupport.refreshLinks(SourceConnectionSupport.java:357) at org.netbeans.modules.java.codesync.SourceConnectionSupport.handleStatusChange(SourceConnectionSupport.java:411) at org.netbeans.modules.java.codesync.SourceConnectionSupport.propertyChange(SourceConnectionSupport.java:318) at org.netbeans.modules.java.parser.SourceImplProxy.propertyChange(SourceImplProxy.java:328) at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:252) at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:278) at org.netbeans.modules.java.parser.ParsingSupport.changeStatus(ParsingSupport.java:300) at org.netbeans.modules.java.parser.ParsingSupport$Processor.complete(ParsingSupport.java:691) at org.netbeans.modules.java.parser.ParsingSupport$Processor.run(ParsingSupport.java:617) at org.openide.util.Task.run(Task.java:136) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:313) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:650) "AWT-EventQueue-0": at org.openide.filesystems.DefaultAttributes.readAttribute(DefaultAttributes.java:276) - waiting to lock <e602fd90> (a org.netbeans.modules.cvsclient.NbJavaCvsFileSystem$JavaCvsAttributes) at org.netbeans.modules.cvsclient.NbJavaCvsFileSystem$JavaCvsAttributes.readAttribute(NbJavaCvsFileSystem.java:1694) at org.openide.filesystems.AbstractFileObject.getAttribute(AbstractFileObject.java:264) at org.openide.filesystems.AbstractFileObject.getAttribute(AbstractFileObject.java:259) at org.netbeans.modules.cvsclient.NbJavaCvsFileSystem.getImportantFiles(NbJavaCvsFileSystem.java:1456) at org.netbeans.modules.javacvs.JavaCvsFileSystem$MyStatus.annotateIcon(JavaCvsFileSystem.java:738) at org.netbeans.modules.treefs.TreeFS.annotateIcon(TreeFS.java:336) at org.openide.loaders.DataNode.getOpenedIcon(DataNode.java:187) at org.openide.nodes.FilterNode.getOpenedIcon(FilterNode.java:402) at org.openide.explorer.view.NodeRenderer$Tree.getTreeCellRendererComponent(NodeRenderer.java:253) at org.openide.explorer.view.NodeRenderer.getTreeCellRendererComponent(NodeRenderer.java:101) at javax.swing.plaf.basic.BasicTreeUI.paintRow(BasicTreeUI.java:1375) at javax.swing.plaf.basic.BasicTreeUI.paint(BasicTreeUI.java:1171) at javax.swing.plaf.metal.MetalTreeUI.paint(MetalTreeUI.java:143) at javax.swing.plaf.ComponentUI.update(ComponentUI.java:142) at javax.swing.JComponent.paintComponent(JComponent.java:541) at javax.swing.JComponent.paint(JComponent.java:808) at org.openide.explorer.view.TreeView$ExplorerTree.paint(TreeView.java:1340) at javax.swing.JComponent.paintChildren(JComponent.java:647) - locked <e763ef08> (a java.awt.Component$AWTTreeLock) at javax.swing.JComponent.paint(JComponent.java:817) at javax.swing.JViewport.paint(JViewport.java:707) at javax.swing.JComponent.paintChildren(JComponent.java:647) - locked <e763ef08> (a java.awt.Component$AWTTreeLock) at javax.swing.JComponent.paint(JComponent.java:817) at javax.swing.JComponent.paintChildren(JComponent.java:647) - locked <e763ef08> (a java.awt.Component$AWTTreeLock) at javax.swing.JComponent.paint(JComponent.java:817) at javax.swing.JComponent.paintChildren(JComponent.java:647) - locked <e763ef08> (a java.awt.Component$AWTTreeLock) at javax.swing.JComponent.paint(JComponent.java:817) at org.netbeans.core.windows.frames.CloseButtonTabbedPane.paint(CloseButtonTabbedPane.java:209) at javax.swing.JComponent.paintChildren(JComponent.java:647) - locked <e763ef08> (a java.awt.Component$AWTTreeLock) at javax.swing.JComponent.paint(JComponent.java:817) at javax.swing.JComponent.paintChildren(JComponent.java:647) - locked <e763ef08> (a java.awt.Component$AWTTreeLock) at javax.swing.JComponent.paint(JComponent.java:817) at javax.swing.JComponent.paintChildren(JComponent.java:647) - locked <e763ef08> (a java.awt.Component$AWTTreeLock) at javax.swing.JComponent.paint(JComponent.java:817) at javax.swing.JLayeredPane.paint(JLayeredPane.java:552) at javax.swing.JComponent.paintChildren(JComponent.java:647) - locked <e763ef08> (a java.awt.Component$AWTTreeLock) at javax.swing.JComponent.paint(JComponent.java:817) at javax.swing.JComponent.paintChildren(JComponent.java:647) - locked <e763ef08> (a java.awt.Component$AWTTreeLock) at javax.swing.JComponent.paint(JComponent.java:817) at javax.swing.JComponent.paintWithOffscreenBuffer(JComponent.java:4771) at javax.swing.JComponent.paintDoubleBuffered(JComponent.java:4724) at javax.swing.JComponent._paintImmediately(JComponent.java:4668) at javax.swing.JComponent.paintImmediately(JComponent.java:4477) at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:410) at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:117) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178) at java.awt.EventQueue.dispatchEvent(EventQueue.java:448) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136) at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
Created attachment 8809 [details] log file - some exceptions, but don't think they're relevant
Well, there are two problematic parts: 1) Disk is accessed from AWT (file's attributes). This is because of a hack, that was introduced for Transparent Persistence module from Forte edition. The TP does not seem to be a part of S1S, so the hack can be probably removed. I'm afraid that there is no other solution to this problem. 2) Refresh can be triggered just because someone wants a file input stream and it waits till the refresh is finished. This should not be hard to fix (I hope, that I do not break anything when I remove the status request from org.netbeans.modules.javacvs.JavaCvsFileSystem.checkVirtual(JavaCvsFileSystem.java:1745), Milos if you're reading this please tell me your opinion. The TopComponent is being opened because the refresh started in 2) has failed and it wanted to open error log. Unfortunately the AWT thread was locked so the component can never be opened.
The exceptions in the ide.log does not seem to be caused by VCS modules.
i'm reading the bug reports however don't remember much from the code anymore, sorry. the check there might to do with the neverending problems with virtual files, i recall I was quite desperate at that time to get it working. nowadays I think I could handle the virtual files in a much better way. just a brainstorming suggestion though. if the file is not physically present, just change/adjust it's extension to javacvs_hidden for example and have a special loader for that extension. no more hassle with the preffered loaded stuff, trying to refresh things. a simple fileobject move that should trigger all the changes naturally. when it becomes locally available change the extension back to the original.
Milos, it's a cool idea to change the extension! The file would look like deleted for other existing DataObjects which would solve compilation and other problems (like Trasparent Persistence revert problem). We would only have to translate the name for VCS actions, which should not be a problem. We'll see how new data systems will work, it will be quite different and maybe it will solve the problem. Now to the problem with JavaCvsFileSystem.checkVirtual(): I'll remove the check for the file status. I can not imagine a local or unknown file being virtual, because after it's not present on disk it'll disappear. So I hope, that when I return simply !file.exists() it will work (I do it this way in VcsFileSystem).
yup, should probably work. to the extension idea, you'll probably need to include the original extension in the name of the fileobjects something like TestPanel#form.javacvs_hidden and Test#java.javacvs_hidden..
It's fixed in the main trunk: /cvs/javacvs/src/org/netbeans/modules/javacvs/JavaCvsFileSystem.java,v <-- JavaCvsFileSystem.java new revision: 1.89; previous revision: 1.88 The deadlok should not happen, problem 1) will be solved if it would be possible to break issue #11589.
How it is it has version 4.0 dev ?? It should be 3.5 probably, but this bug is probably in 3.4.x as well. => setting version to 3.4.
See issue #30754 for the problem concerning virtual files.
Verified in NetBeans 3.5.1 build #200307092351. If you Tim encounter this again, don't hesitate to reopen the bug. Adding appropriate keywords at the same time.