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 105517 - Debugger does not close debugger console output stream
Summary: Debugger does not close debugger console output stream
Status: CLOSED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Java (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-03 20:01 UTC by _ tboudreau
Modified: 2010-04-29 09:33 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Screen shot (19.30 KB, image/png)
2007-06-03 20:01 UTC, _ tboudreau
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ tboudreau 2007-06-03 20:01:19 UTC
See the attached screen shot - note the text in the output window and the fact
that the title is still in bold text.

This means that the memory mapped file the output stream for the output window
writes to cannot be unmapped until the NB session ends, and will not be deleted
on close - i.e. it is a de-facto memory leak.
Comment 1 _ tboudreau 2007-06-03 20:01:38 UTC
Created attachment 43163 [details]
Screen shot
Comment 2 Martin Entlicher 2007-06-06 18:58:00 UTC
Well, I can not reproduce this. After the debugger is finished it always reverts
from bold text to normal plain text. Which build do you use?
I do call close() on the standard OutputWrite, but not on the error OutputWriter
of the InputOutput. So perhaps this is the problem... I have build from 070512
so perhaps it's a problem in newer builds?
Comment 3 _ tboudreau 2007-06-07 07:25:51 UTC
When in doubt, close both.  The output window keeps a count - if you never used
stderr, you don't need to close it, same for stdout;  if you used both you
should close both to be safe.

But I think your problem is failure modes - are you sure all cases where a
debugged process can stop unexpectedly will cause the stream to be closed? In
normal operation it seems to work - it's when the remote process dies somehow
that it stays open.  There is probably some corner case that allows that to happen.
Comment 4 Martin Entlicher 2007-06-11 13:45:05 UTC
This was likely some race-condition, because "User program finished" was printed
out successfully. This should fix the problem:

/cvs/debuggerjpda/ui/src/org/netbeans/modules/debugger/jpda/ui/IOManager.java,v
 <--  IOManager.java
new revision: 1.22; previous revision: 1.21
Comment 5 Quality Engineering 2010-04-29 09:33:31 UTC
Verified ... and Closing all issues resolved into NetBeans 6.7 and earlier.