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 82160 - Action "Stop Build/Run" does not notify AntLoggers
Summary: Action "Stop Build/Run" does not notify AntLoggers
Alias: None
Product: projects
Classification: Unclassified
Component: Ant (show other bugs)
Version: 6.x
Hardware: PC Linux
: P2 blocker (vote)
Assignee: Jesse Glick
Depends on:
Blocks: 81623
  Show dependency tree
Reported: 2006-08-08 13:48 UTC by Marian Petras
Modified: 2006-10-23 16:39 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description Marian Petras 2006-08-08 13:48:36 UTC
When an Ant build is stopped using action "Stop Build/Run", the attached
AntLogger objects are not notified of a finished build

Possible causes have been drawn by Jesse Glick in his comment to issue #82082.

This bug seems to be 100% reproducible on my system (NetBeans 6.0 dev. build
060807, JDK 1.6.0-b94, Fedora Core 4 Linux, Intel PC 32-bit).
Comment 1 Jesse Glick 2006-08-08 17:24:23 UTC
I will try to reproduce.
Comment 2 Jesse Glick 2006-08-10 23:35:17 UTC
Reproduced and easily fixed. Stop Build/Run was setting the stop flag in
NbBuildLogger. When ThreadDeath was thrown, it was caught in BridgeImpl as
expected. Then projectFinished was called. But this called checkForStop(), which
then stopped the thread (again!) before notifying listeners. Need to proceed
with the projectFinished method, and also turn off the stop flag as it will
interfere with Ant cleanup code.

Also improving the standard logger to properly print "BUILD STOPPED" when that
is what happened (i.e. do not treat it as a build failure).

Issue #81623 seems to be fixed by this, so please verify and close that if you want.

Checking in src/org/apache/tools/ant/module/run/;
new revision: 1.30; previous revision: 1.29
Checking in src/org/apache/tools/ant/module/run/;
new revision: 1.9; previous revision: 1.8
Checking in src-bridge/org/apache/tools/ant/module/bridge/impl/;
new revision: 1.27; previous revision: 1.26
Comment 3 Marian Petras 2006-08-11 15:38:53 UTC
Verified in a custom build 060811.

The fix solves also issue #81623, indeed.