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.

Bug 142505 - Debugging often fails 1st try
Summary: Debugging often fails 1st try
Status: RESOLVED DUPLICATE of bug 141604
Alias: None
Product: cnd
Classification: Unclassified
Component: Remote (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: _ gordonp
URL:
Keywords:
Depends on: 142949
Blocks:
  Show dependency tree
 
Reported: 2008-08-01 01:15 UTC by _ gordonp
Modified: 2008-08-07 19:20 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ gordonp 2008-08-01 01:15:12 UTC
On Linux and Solaris I'm seeing the debugger fail the 1st time I press the Debug
button. If I Finish the session and press Debug again, it usually works (I've seen
it take 2-3 failures before running, but usually its just one).

If I run with a gdb console window then I see my gdb commands echoed, but never
any responses. If I do a ps from the command line, I see that gdb is actually
running. I can even set a breakpoint in GdbProxyEngine's GdbReader thread and
verify that input is coming from gdb (only a prompt, though).
Comment 1 Egor Ushakov 2008-08-01 11:08:31 UTC
please attach gdb log
Comment 2 _ gordonp 2008-08-01 19:40:31 UTC
Egor, here is the log. The interesting thing (at least to me:-) is that this is a log
of what GdbProxyEngine has sent to gdb. It doesn't indicate that gdb received them. In
related debugging I've verified we do read a line from gdb (a single "(gdb)" prompt).
I'm guessing this is some kind of I/O problem and that the commands we've sent to gdb
never got there.

Anyway, here is the log:
> Debugger Command: [/usr/local/bin/gdb, --nw, --silent, --interpreter=mi]
> Env[0]: []
> workingDirectory: /home/gordonp/NetBeansProjects/Arguments_1/
> ================================================
> 100-gdb-version
> 101-environment-directory  "/home/gordonp/NetBeansProjects/Arguments_1/"
> 102-gdb-show language
> 103-gdb-set print repeat 10
> 104-file-exec-and-symbols /home/gordonp/NetBeansProjects/Arguments_1/dist/Debug/args
> 105-gdb-set environment LD_PRELOAD=/home/gordonp/.netbeans/6.5/cnd2/lib/GdbHelper-SunOS-sparc.so
> 106-break-insert -t main
> 107-data-list-register-names 
> 108-exec-run "arg 1" "arg 2" "arg 3" "arg 4"
> 109info proc

This is what shoes until I press Finish, and then the following gets sent and logged:
> 110-gdb-exit 

I haven't seen this problem on Windows
Comment 3 Egor Ushakov 2008-08-04 11:02:08 UTC
I'm unable to reproduce it, you are using output window as a terminal, may that be the reason?
Comment 4 Egor Ushakov 2008-08-04 11:04:24 UTC
can you reproduce it with a regular terminal?
Comment 5 _ gordonp 2008-08-04 16:10:19 UTC
> can you reproduce it with a regular terminal?

Yes. The problem has nothing to do with the terminal. The "toGdb" field in GdbProxyEngine
isn't getting set up correctly and gdb is receiving no input from the IDE. I can read a
single "(gdb)" response from gdb, but get no responses to the command I send to gdb.

I'm planning to delay the creation of the toGdb field and see if its opened before JSch
has completed the connection. I'm also going to try a more recent version of JSch and
see if that fixes the problem (our JSch is fairly old...).
Comment 6 _ gordonp 2008-08-05 18:47:15 UTC
Changing from STARTED back to NEW, since I'm blocked by 142949 (although I plan on pushing
hard for a quick resolution to that issue).
Comment 7 _ gordonp 2008-08-07 19:20:20 UTC

*** This issue has been marked as a duplicate of 141604 ***