Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 21725 - Stack overflow executing Ant projects w/ slash in name
Stack overflow executing Ant projects w/ slash in name
Product: cnd
Classification: Unclassified
Component: Terminalemulator
PC Linux
: P2 (vote)
: 6.x
Assigned To: akemr
Depends on:
  Show dependency treegraph
Reported: 2002-03-19 18:23 UTC by Jesse Glick
Modified: 2008-12-23 08:28 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT

log file excerpt (73.23 KB, text/plain)
2002-03-19 18:24 UTC, Jesse Glick
Suggested patch (6.14 KB, patch)
2002-03-20 17:29 UTC, Jesse Glick
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2002-03-19 18:23:32 UTC
[dev mar 07] If you attempt to run any target from an Ant project from
within the IDE which has a slash in its name (e.g.
core/javahelp/build.xml named "core/javahelp"), and you are not
reusing output tabs (so that each execution names the tab according to
the project and maybe target), and you are using output tab
redirection, a stack overflow occurs and no output is shown. Reason:
OutputTabTerm.redirOpen did not escape the slash, thus trying to make
a file such as "$nbuser/output/core/javahelp.out"; since only the
directory $nbuser/output/ exists (not the subdir core/),
redirFile.createNewFile() fails with an IOException; printStackTrace
sends this to standard error; Ant execution redirects stderr, so this
goes back to term, causing a loop. Solution: (1) use ErrorManager for
all exception reporting from output tab code, since it does not send
to stderr but straight to the log file, preventing cycles during Ant
execution; (2) redirPrint should check for redirWriter still == null
after calling redirOpen(), which can happen in case of errors, and
ignore (continue printing to GUI); (3) redirOpen should escape the
platform separator character before constructing an output filename.
Comment 1 Jesse Glick 2002-03-19 18:24:17 UTC
Created attachment 5101 [details]
log file excerpt
Comment 2 Jesse Glick 2002-03-19 18:24:48 UTC
I have a patch for which seems to work fine.
Comment 3 Jesse Glick 2002-03-20 17:29:07 UTC
Created attachment 5117 [details]
Suggested patch
Comment 4 Jesse Glick 2002-03-20 17:31:03 UTC
Ales do you think you could commit this patch for me? I am having a 
bit of trouble with updating CVS at the moment (to do a clean build 
& test run), otherwise I would commit it myself. Thanks in advance.
Comment 5 _ ttran 2002-03-21 16:21:50 UTC
suggested patch integrated into cvs trunk
Comment 6 pzajac 2003-09-03 11:44:11 UTC
cannot reproduce -> verified
Comment 7 Quality Engineering 2008-12-23 08:28:38 UTC
moving terminal emulator issues to terminalemulator component.
To see the correct version and target milestone of this issue look at Issue
Activity table.

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo