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've seen the PIO window exactly once in all the times I've run the debugger on Solaris. Some testing showed that it failed because of code in my .cshrc (my login shell is bash, not csh). The PIO window should not be so fragile that a valid shell startup file can cause a failure. I consider this a showstopper for our next gdb-lite milestone release.
The root of the problem was in slow and unstable start of /bin/gnome-terminal on Solaris, which was defined as default external terminal. We decided to disable it for milestone 2, which leaves us with 2 supported external terminals on Solaris: /usr/bin/xterm and /usr/dt/bin/dtterm. This solution significantly improved the performance of "Start Debugging" process: On Linux it takes 2.6 (first run) - 1.1 seconds (next run) On Solaris it takes 2.4 (first run) - 1.4 seconds (next run) Platform: intel-Linux Host: sside-linux ----------- First run startDebugging: ----------- Step "Open External Terminal" Time: 1767 mls Step "Start gdb and load program" Time: 863 mls Total time: 2630 milliseconds ----------- Second run startDebugging: ---------- Step "Open External Terminal" Time: 1121 mls Step "Start gdb and load program" Time: 34 mls Total time: 1155 milliseconds ----------- Third run startDebugging: ---------- Step "Open External Terminal" Time: 1106 mls Step "Start gdb and load program" Time: 23 mls Total time: 1129 milliseconds Platform: intel-S2 Host: acadia ----------- First run startDebugging: ----------- Step "Open External Terminal" Time: 2311 mls Step "Start gdb and load program" Time: 92 mls Total time: 2403 milliseconds ----------- Second run startDebugging: ---------- Step "Open External Terminal" Time: 1359 mls Step "Start gdb and load program" Time: 37 mls Total time: 1396 milliseconds ----------- Third run startDebugging: ---------- Step "Open External Terminal" Time: 1389 mls Step "Start gdb and load program" Time: 41 mls Total time: 1430 milliseconds But there is a long delay between click on "Debug Main Project" button and the beginning of GdbProxy.startDebugging() function. Sometimes it takes about 10 seconds. The fix is integrated in cnd-nb50-dev release. ------------ Contextual Diffs ----------------- Tag: cnd-nb50-dev User: NikMolchanov Date: 2006/07/31 15:30:36 Modified: cnd/gdb/src/org/netbeans/modules/cnd/debugger/gdb/GdbProxyCL.java Log: IZ 80510 *Gdb-lite* Program I/O window - improved performance on Solaris (now window appears in less than 1 second) IZ 80531 Program I/O Window not reliable enough - temporary removed support for gnome-terminal on Solaris (it is slow and unstable) File Changes: Directory: /cnd/gdb/src/org/netbeans/modules/cnd/debugger/gdb/ ============================================================== File [changed]: GdbProxyCL.java Url: http://cnd.netbeans.org/source/browse/cnd/gdb/src/org/netbeans/modules/cnd/debugger/gdb/GdbProxyCL.java?r1=1.1.2.42&r2=1.1.2.43 Delta lines: +15 -33 --------------------- --- GdbProxyCL.java 29 Jul 2006 01:36:51 -0000 1.1.2.42 +++ GdbProxyCL.java 31 Jul 2006 22:30:34 -0000 1.1.2.43 @@ -19,11 +19,11 @@ package org.netbeans.modules.cnd.debugger.gdb; +import java.io.File; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import java.util.Vector; -import javax.swing.SwingUtilities; import org.openide.DialogDisplayer; import org.openide.NotifyDescriptor; @@ -788,7 +788,7 @@ //String shScript = "trap \"i=0;\" 1 2 3 4 5 6 7 8 9 10 12 13 14 15; while [ true ]; do sleep 10; done;"; // NOI18N String shScript = "while [ true ]; do sleep 10; done;"; // NOI18N String term = null; - String termBinary = xterm; + String termBinary = null; String termDisplay = null; String termOptions = " -title \"Debugging\" "; // NOI18N termOptions += " -background blue "; // NOI18N @@ -1002,10 +1002,6 @@ return term; } if (OSName.startsWith("SunOS")) { // NOI18N - dir = DIR_TMP; - fn = "loop" + SessionID + ".sh"; // NOI18N - fnl = "loop" + SessionID + ".log"; // NOI18N - timeout = 1000; cmd = "rm -f " + fn; // NOI18N gdbProxy.gdbProxyML.executeExternalCommand(cmd, dir, timeout); cmd = "rm -f " + fnl; // NOI18N @@ -1014,11 +1010,8 @@ gdbProxy.gdbProxyML.executeExternalCommand(cmd, dir, timeout); cmd = "echo 'echo $$ >> " + fnl + "' >> " + fn; // NOI18N gdbProxy.gdbProxyML.executeExternalCommand(cmd, dir, timeout); - // cmd = "echo 'while [ true ]; do sleep 10; done' >> " + fn; // NOI18N cmd = "echo '" + shScript + "' >> " + fn; // NOI18N gdbProxy.gdbProxyML.executeExternalCommand(cmd, dir, timeout); - //cmd = "echo 'exit 0' >> " + fn; // NOI18N - //gdbProxy.gdbProxyML.executeExternalCommand(cmd, dir, timeout); // Check if there is a gnome-terminal // The code below is not good. It is using /bin/which, // which is slow. Better to check if file exists: @@ -1027,6 +1020,7 @@ // /usr/dt/bin/dtterm //timeout = 100; // IZ 80510 Problem 6: /bin/gnome-terminal does not start in some cases + /* IZ 80531 Program I/O Window not reliable enough if ((xterm != null) && (xterm.equals("gnome-terminal"))) { termBinary = null; cmd = "which gnome-terminal"; // NOI18N @@ -1049,40 +1043,28 @@ System.err.println("ERROR: GdbProxyCL.openExternalProgramIOWindow() cannot find gnome-terminal\n"); // DEBUG } } + **/ // Check if there is xterm if (termBinary == null) { - cmd = "which xterm"; // NOI18N - reply=gdbProxy.gdbProxyML.executeExternalCommand(cmd, dir, timeout); - if (reply != null) { - if (reply.startsWith("/")) { // NOI18N - if (reply.endsWith("\n")) { // NOI18N - int l = reply.length(); - termBinary=reply.substring(0, l-1); - } else { - termBinary = reply; - } - System.out.println("GdbProxyCL.openExternalProgramIOWindow() xterm\n"+reply); // DEBUG + if ((xterm == null) || (xterm.endsWith("xterm"))) { // NOI18N + termBinary = "/usr/openwin/bin/xterm"; // NOI18N + File f = new File(termBinary); + if (!f.exists()) { + System.err.println("ERROR: GdbProxyCL.openExternalProgramIOWindow() /usr/openwin/bin/xterm does not exist\n"); // DEBUG + termBinary = null; } } } // Check if there is dtterm if (termBinary == null) { - cmd = "which dtterm"; // NOI18N - reply=gdbProxy.gdbProxyML.executeExternalCommand(cmd, dir, timeout); - if (reply != null) { - if (reply.startsWith("/")) { // NOI18N - if (reply.endsWith("\n")) { // NOI18N - int l = reply.length(); - termBinary=reply.substring(0, l-1); - } else { - termBinary = reply; - } - System.out.println("GdbProxyCL.openExternalProgramIOWindow() dtterm\n"+reply); // DEBUG - } + termBinary = "/usr/dt/bin/dtterm"; // NOI18N + File f = new File(termBinary); + if (!f.exists()) { + System.err.println("ERROR: GdbProxyCL.openExternalProgramIOWindow() /usr/dt/bin/dtterm does not exist\n"); // DEBUG + termBinary = null; } } if (termBinary == null) return null; - // cmd = "/usr/dt/bin/dtterm"; // NOI18N cmd = termBinary; cmd += termOptions; cmd += " /bin/sh " + fn + " &"; // NOI18N