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 204460 - ghost watches
Summary: ghost watches
Status: VERIFIED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 7.1
Hardware: PC Linux
: P2 normal (vote)
Assignee: Egor Ushakov
URL:
Keywords:
Depends on:
Blocks: 206784
  Show dependency tree
 
Reported: 2011-10-31 15:15 UTC by tbrunhoff
Modified: 2012-02-17 09:47 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
gdb log (2.82 KB, application/octet-stream)
2011-10-31 15:15 UTC, tbrunhoff
Details
gdb log (4.43 KB, application/octet-stream)
2011-12-14 04:10 UTC, tbrunhoff
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tbrunhoff 2011-10-31 15:15:05 UTC
Created attachment 112604 [details]
gdb log

This morning both the ide and gdb were very confused. I don't know what led up to this, so I started by:
 - remove all breakpoints
 - exit ide
 - rm -rf ~/.netbeans/dev/var/cache
 - rebuild binaries
 - restart ide
 - run debugger

There are a number of things wrong. First is that if I disable or delete breakpoints, they come back when I run. Second is that there are two errors in the gdb log that are unreported in the ide:
 - 12^error,msg="mi_cmd_var_create: unable to create variable object"
 - ~"../../gdb/thread.c:614: internal-error: ...

gdb log attached. It seems that the ide should at least try to report errors from gdb so that the user is not stuck scratching his head. Also, is there a mismatch between gdb and the ide? Is that why gdb is getting an internal error? Note that if I run gdb by hand on this binary, set breakpoints, and run, gdb works just fine.

Product Version: NetBeans IDE Dev (Build 201110200600)
Java: 1.6.0_23; Java HotSpot(TM) Client VM 19.0-b09
System: Linux version 2.6.35.13-92.fc14.x86_64 running on i386; UTF-8; en_US (nb)
User directory: /home/toddb/.netbeans/dev
Cache directory: /home/toddb/.netbeans/dev/var/cache
Comment 1 tbrunhoff 2011-10-31 15:38:23 UTC
removing ~/.netbeans and installing the version below seems to work.

Shouldn't the ide have some internal diagnostics to notice when things are going wacky?

Product Version: NetBeans IDE Dev (Build 201110300600)
Java: 1.6.0_23; Java HotSpot(TM) Client VM 19.0-b09
System: Linux version 2.6.35.13-92.fc14.x86_64 running on i386; UTF-8; en_US (nb)
User directory: /home/toddb/.netbeans/dev
Cache directory: /home/toddb/.netbeans/dev/var/cache
Comment 2 Egor Ushakov 2011-10-31 16:01:58 UTC
Todd, it looks like watches are the case, next time try to delete all watches first.
Probably gdb doesn't survive when we try to create watches and start program at the same time. Diagnostics with the feedback in the IDE also needed for sure.
Comment 3 tbrunhoff 2011-10-31 16:11:34 UTC
> next time try to delete all watches first.

I did not think of the watches. Good idea.
Comment 4 tbrunhoff 2011-12-14 04:06:48 UTC
I am back in a debugger-induced fog. At one point, I added a watch for a global/static class instance. The next time I started the debugger it simply hangs and all I can do is stop.  The gdb log show that it is clearly not happy. See attached.
Comment 5 tbrunhoff 2011-12-14 04:10:09 UTC
Created attachment 114120 [details]
gdb log

Note: the type="Debugger" in the log is the type of global/static instance.  At the time I added it, I was able to read the variable.  After restarting, gdb no longer works *and* I cannot delete the watch!!
Comment 6 tbrunhoff 2011-12-14 04:15:34 UTC
I can delete the watch from the watch window when the debugger is not running, and as long as the debugger is not running no watches appear. However, the watch that I deleted returns every time I (try) to start the debugger.
Comment 7 tbrunhoff 2011-12-14 18:02:11 UTC
Removing ~/.netbeans/dev/var/cache finally removes the watch. Looks like some persistent data is kept there that should be synchronized with the UI.
Comment 8 Egor Ushakov 2011-12-29 13:36:00 UTC
I can reproduce "ghost" watches issue but after IDE restart they disappear, will fix anyway
Comment 9 Egor Ushakov 2011-12-29 13:42:41 UTC
steps to reproduce:
- create a number of watches
- restart the IDE
- delete some of watches
- start debugging
All watches appear in the debug session (including deleted)
Comment 10 Egor Ushakov 2011-12-29 13:59:09 UTC
"ghost" watches issue fixed in:
http://hg.netbeans.org/cnd-main/rev/e43820c176f1
Comment 11 Egor Ushakov 2011-12-29 14:03:29 UTC
I've create bug 206784 about watches causing gdb to fail
Comment 12 Quality Engineering 2011-12-30 15:42:42 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/e43820c176f1
User: Egor Ushakov <gorrus@netbeans.org>
Log: fixed #204460 (gdb confused)
Comment 13 soldatov 2012-01-12 14:50:58 UTC
verified in NetBeans IDE Dev (Build 201201110601)
Comment 14 Egor Ushakov 2012-01-17 09:30:53 UTC
integrated into release71_fixes:
http://hg.netbeans.org/releases/rev/703ec9f9668a
Comment 15 soldatov 2012-02-17 08:32:14 UTC
verified in NetBeans IDE 7.1 (Build 201112071828)
Comment 16 soldatov 2012-02-17 09:47:13 UTC
Verified in NetBeans 7.1 with updates from 201202141941