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.
In build 200204180100 I have noticed too much activite in Automount request processor. I believe that it is caused by JavaLineBreakpoint listening on changes in filesystems. These changes do not need to be done immediatelly, so please use RequestProcessor.getDefault () to invoke them. "Automount" daemon prio=1 tid=0x0x88de118 nid=0x42d9 waiting on monitor [53484000..5348488c] at java.lang.Object.wait(Native Method) at java.lang.Object.wait(Object.java:426) at org.openide.util.Task.waitFinished(Task.java:86) - locked <0x4433b728> (a org.netbeans.modules.java.parser.ParsingSupport$Processor$T) at org.netbeans.modules.java.parser.SourceImplProxy.findModelDelegate(SourceImplProxy.java:292) at org.netbeans.modules.java.parser.SourceImplProxy.safeFindModelDelegate(SourceImplProxy.java:304) at org.netbeans.modules.java.parser.SourceImplProxy.getClasses(SourceImplProxy.java:149) at org.openide.src.SourceElement.getClasses(SourceElement.java:227) at org.openide.src.ClassElement.testFileForName(ClassElement.java:1048) at org.openide.src.ClassElement.forName(ClassElement.java:953) at org.netbeans.modules.debugger.support.util.Utils.getLineSet(Utils.java:453) at org.netbeans.modules.debugger.support.util.Utils.getLine(Utils.java:437) at org.netbeans.modules.debugger.support.java.JavaLineBreakpointEvent.updateLine(JavaLineBreakpointEvent.java:417) - locked <0x44bd8208> (a org.netbeans.modules.debugger.jpda.LineBreakpoint) at org.netbeans.modules.debugger.support.java.JavaLineBreakpointEvent$LineBreakpointUpdater.fileSystemAdded(JavaLineBreakpointEvent.java:596) - locked <0x44bd9708> (a org.netbeans.modules.debugger.support.java.JavaLineBreakpointEvent$LineBreakpointUpdater) at org.openide.filesystems.Repository.fireFileSystem(Repository.java:473) at org.openide.filesystems.Repository.addFileSystem(Repository.java:184) at org.netbeans.core.AutomountSupport.cycleFileSystems(AutomountSupport.java:605) at org.netbeans.core.AutomountSupport.updateFileSystems(AutomountSupport.java:508) - locked <0x44931fa8> (a org.openide.filesystems.Repository) at org.netbeans.core.AutomountSupport.taskFinished(AutomountSupport.java:155) at org.openide.util.Task.notifyFinished(Task.java:123) at org.openide.loaders.FolderInstance.defaultProcessObjects(FolderInstance.java:586) at org.openide.loaders.FolderInstance.access$100(FolderInstance.java:45) at org.openide.loaders.FolderInstance$2.run(FolderInstance.java:456) at org.openide.util.Task.run(Task.java:138) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:599)
You can also merge multiple checks into one done later, because during project switch the number of adds and removes can be very high.
Fixed in the main trunk.
A separate instance of RequestProcessor is used so that tasks (breakpoint updates) are serialized.
Fine, but tell me how I am supposed to verify this? Can you tell me which classes and which version this has been fixed in?
I tested the effect of the change by printing debugging messages (removed before commit). You can verify it by looking over the changes I have made and reading my comments. Changes: cvs diff -r 1.7 -r 1.9 debuggercore/src/org/netbeans/modules/debugger/support/java/BreakpointUpdater.java cvs diff -r 1.22 -r 1.23 debuggercore/src/org/netbeans/modules/debugger/support/java/JavaLineBreakpointEvent.java Comments: In the old version, each BreakpointUpdater was listening on a repository and updating the breakpoint as soon as some filesytems was mounted or unmounted. In the new version, there is just one repository listener. If a BreakpointUpdater wants to be notified of filesystem un/mounts, it must register to the repository listener (class LazyRepositoryListener). LazyRepositoryListener holds a single instance of RequestProcessor (having throughput 1). When a filesystem is un/mounted, the LazyRepositoryListener remembers that the filesystem was un/mounted and schedules a task (with a 500ms delay). The task notifies all registered BreakpointUpdaters of filesystems that were mounted/unmounted since the previous run of the task. Thus, if several filesystems are mounted and/or unmounted quickly (with short delays between un/mounts), each breakpoint is updated only once. I have tested the new behaviour and obtained the following results: - during startup: Each (existing) breakpoint is updated twice (there is a relatively long delay between two series of un/mounts). - during project switch: Each breakpoint is updated just once.
Ok, this is the right way to fix the problem. But please check following code: public final void fileSystemAdded(RepositoryEvent e) { if (addedFS == null) { addedFS = new ArrayList(10); } addedFS.add(e.getFileSystem()); synchronized (registeredUpdaters) { I believe that this is not synchronized correctly, because you can create addedFS twice (the same for removeFS). Otherwise seems ok.
Fixed - manipulation with lists 'addedFS' and 'removedFS' is enclosed in blocks 'synchronized (this)': cvs diff -r 1.9 -r 1.10 debuggercore/src/org/netbeans/modules/debugger/support/java/BreakpointUpdater.java
Resolved for 3.3.x or earlier, no new info since then -> closing.