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.
The nature of this IZ is CR 6635960. Reproducible on SXDE. D-Light uses cnd native executor and it looks more like NativeExecutor synchronization problem than D-Light itself Scenario: - Run sun studio - Push 'Tools|D-Light Tool' menu item - Click on 'Instruments' button - Drag-and-Drop 'Clock profiler' icon from 'Instruments' window into 'D-Light Tool' tab - Close 'Instruments' window - Click on 'Select Target...' button. Select 'Run Executable' - Press on 'Ok' button in 'Select Executable' window - Click on button with red circle several times with a small pause or event without any pause ==> A lot of warnings appears ("Problem writing to output file") and solaris machine works very slowly (I cannot stop IDE I can kill 'java' process in external terminal only) And I see such test in messages.log file: Caused: java.nio.channels.ClosedChannelException at sun.nio.ch.FileChannelImpl.ensureOpen(FileChannelImpl.java:89) at sun.nio.ch.FileChannelImpl.force(FileChannelImpl.java:350) at org.netbeans.core.output2.FileMapStorage.flush(FileMapStorage.java:351) [catch] at org.netbeans.core.output2.OutWriter.flush(OutWriter.java:419) at java.io.PrintWriter.flush(PrintWriter.java:270) at org.netbeans.modules.cnd.execution.NativeExecution$OutputReaderThread.run(NativeExecution.java:210) ALL [null]: Problem writing to output file SEVERE [global] msg Caused: java.nio.channels.ClosedChannelException at sun.nio.ch.FileChannelImpl.ensureOpen(FileChannelImpl.java:89) at sun.nio.ch.FileChannelImpl.force(FileChannelImpl.java:350) at org.netbeans.core.output2.FileMapStorage.flush(FileMapStorage.java:351) [catch] at org.netbeans.core.output2.OutWriter.flush(OutWriter.java:419) at java.io.PrintWriter.flush(PrintWriter.java:270) at org.netbeans.modules.cnd.execution.NativeExecution$OutputReaderThread.run(NativeExecution.java:210) ALL [null]: Problem writing to output file SEVERE [global] msg Caused: java.nio.channels.ClosedChannelException at sun.nio.ch.FileChannelImpl.ensureOpen(FileChannelImpl.java:89) at sun.nio.ch.FileChannelImpl.force(FileChannelImpl.java:350) at org.netbeans.core.output2.FileMapStorage.flush(FileMapStorage.java:351) [catch] at org.netbeans.core.output2.OutWriter.flush(OutWriter.java:419) at java.io.PrintWriter.flush(PrintWriter.java:270) at org.netbeans.modules.cnd.execution.NativeExecution$OutputReaderThread.run(NativeExecution.java:210) ALL [null]: Problem writing to output file java.util.logging.ErrorManager: 1 java.io.InterruptedIOException at java.io.FileOutputStream.writeBytes(Native Method) at java.io.FileOutputStream.write(FileOutputStream.java:260) at sun.nio.cs.StreamEncoder$CharsetSE.writeBytes(StreamEncoder.java:336) at sun.nio.cs.StreamEncoder$CharsetSE.implWrite(StreamEncoder.java:395) at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:136) at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:146) at java.io.OutputStreamWriter.write(OutputStreamWriter.java:204) at java.io.Writer.write(Writer.java:126) at java.util.logging.StreamHandler.publish(StreamHandler.java:192) at org.netbeans.core.startup.TopLogging$NonClose.publish(TopLogging.java:381) at java.util.logging.Logger.log(Logger.java:452) at java.util.logging.Logger.doLog(Logger.java:474) at java.util.logging.Logger.log(Logger.java:563) at org.openide.util.Exceptions.printStackTrace(Exceptions.java:175) at org.netbeans.core.output2.OutWriter.handleException(OutWriter.java:227) at org.netbeans.core.output2.OutWriter.flush(OutWriter.java:424) at java.io.PrintWriter.flush(PrintWriter.java:270) at org.netbeans.modules.cnd.execution.NativeExecution$OutputReaderThread.run(NativeExecution.java:210)
Fixed. If NativeExecutor was called without specifying an IO tab, it would find an available tab with same name risking finding a IO window with a still running process. Changed the code so it would always create a new tab if no tab specified. This is the right thing to do because there is no way for NativeExecutor to know what the intent is with the tab. The logic can be controlled in the user's code by specifying the IO tab in the call to execute(): IOTab tab; tab = IOProvider.getDefault().getIO(tabName, true); // Gets a new tab nativeExecutor.execute(tab); ... ... if (!done) tab = IOProvider.getDefault().getIO(tabName, true); // Gets a new tab nativeExecutor.execute(tab);
changeset: 69550:9cfd3821cfa6 user: Thomas Preisler <thp@netbeans.org> date: Sun Feb 24 16:05:34 2008 -0800 summary: 123307 NativeExecutor cannot effort multiple start/stop action