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 247756 - Terminal disappears without any warnings
Summary: Terminal disappears without any warnings
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Terminalemulator (show other bugs)
Version: 8.0.1
Hardware: PC Solaris
: P3 normal (vote)
Assignee: ilia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-07 09:32 UTC by soldatov
Modified: 2015-07-23 10:17 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 soldatov 2014-10-07 09:32:13 UTC
If connection has been lost (or folder doesn't exist), then terminal disappears without any warnings.

Scenario 1:
- Start VirtualBox
- Start IDE
- Add remote host to NetBeans
- Open remote host in built-in IDE terminal
- Finish VirtualBox
==> Terminal disappears without any warnings

Scenario 2:
- Open Services tab
- Call context on "C/C++ Build Hosts|user@host:port" node
- Select "Open Terminal|Remote Mirror of Local Files"
==> if remote folder doesn't exist, then terminal appears and disappears for a second
Comment 1 ilia 2015-04-29 10:55:31 UTC
It seems there is no way to distinguish in postExecution() if 
1) the Terminal was destroyed by user (hitting a close button), or 
2) by termination of the underlying process.

Some info can be gained from NativeProcessListener (in case of (2) we get PROP_CONNECTION event at first). But is postExecution called before we can get such info.
Comment 2 ilia 2015-04-29 10:56:16 UTC
* But postExecution()
Comment 3 ilia 2015-05-05 13:19:36 UTC
Fixing in:
  http://hg.netbeans.org/cnd-main/rev/2f8fca039e34

The reason of the disappearing in the 2-nd scenario:
pty.c (line 189) returns error code 127 and exits if it couldn't chdir to the folder which doesn't exist.
I added some logging to warn user about this situation.

And it seems there is no reason to have "Open Terminal|Remote Mirror of Local Files" in all remote modes except the autocopying.
Comment 4 ilia 2015-05-05 14:50:51 UTC
Fix for scenario 2:
  http://hg.netbeans.org/cnd-main/rev/8f6c8ca63da6
Comment 5 Quality Engineering 2015-05-06 02:55:17 UTC
Integrated into 'main-silver', will be available in build *201505060001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/2f8fca039e34
User: Ilia Gromov <ilia@netbeans.org>
Log: Fixing Bug #247756 - Terminal disappears without any warnings
Comment 6 ilia 2015-07-23 10:17:27 UTC
Scenario 2 was fixed as a bug.
Scenario 1 is an enhancement, filing a separate issue. https://netbeans.org/bugzilla/show_bug.cgi?id=253678