Bug 234221

Summary: run doesn't work with latest 64-bit cygwin (Unable to start pty process)
Product: cnd Reporter: soldatov <soldatov>
Component: executionAssignee: Andrew Krasny <akrasny>
Status: RESOLVED FIXED QA Contact: issues <issues.netbeans.org>
Priority: P2 CC: CdTCzech, filipenevola, thp
Version: 7.4   
Target Milestone: 7.4   
Hardware: PC   
OS: Windows 7 x64   
Whiteboard:
Issue Type: DEFECT Exception Report: DEFECT

Description soldatov 2013-08-10 12:45:39 UTC
Scenario:
- download and install setup-x86_64.exe from http://cygwin.com/
- create project
- run project
==> "Unable to start pty process" in Output tab

P.S. no problems if I use External terminal
Comment 1 soldatov 2013-08-10 13:05:34 UTC
link to forum:
http://forums.netbeans.org/viewtopic.php?t=56124
Comment 2 Daveoh 2013-08-12 14:52:20 UTC
I also have this issue whilst the Run - Console Type is set to Internal Terminal.
Windows 7 64-bit.
CYGWIN_NT-6.1 Daveoh-PC 1.7.23(0.268/5/3) 2013-08-09 10:05 x86_64 Cygwin

I have another issue whilst console type is set to Standard Output, but I presume that should go in a separate bug report.
Comment 3 Andrew Krasny 2013-08-20 15:46:21 UTC
*** Bug 234666 has been marked as a duplicate of this bug. ***
Comment 4 Andrew Krasny 2013-08-27 16:36:15 UTC
OK.. Things appears to be slightly more complicated... 
The fix that I can propose for now will allow to proceed with the execution when bitness of all components (jdk, application to run, cygwin) matches. 

The bottom line is that one should start netbeans64.exe (and have 64-bit java) with cygwin64 and netbeans.exe (and have 32-bit java) with cygwin32.

At the moment cygwin64 still have several problems that makes it impossible to reliably use current approach for execution (mostly unbuffer.dll bitness mismatch. it is used for starting processes in an 'Output Window' and is a hack to deal with buffered output).

It is too late for the current release to try to overcome these problems and, seems there is no real need in this as cygwin may fix their loose ends at some point.


Changesets: http://hg.netbeans.org/cnd-main/rev/2b8a5a621d68
Comment 5 Quality Engineering 2013-08-28 01:12:45 UTC
Integrated into 'main-silver', will be available in build *201308280001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/2b8a5a621d68
User: Andrew Krasny <akrasny@netbeans.org>
Log: Bug #234221 - run doesn't work with latest 64-bit cygwin (Unable to start pty process)

This fix makes it possible to use nb (to run executable) when bitness of jdk/executable/cygwin match.
In case of mismatch user is notified...
Comment 6 Andrew Krasny 2013-09-03 07:18:09 UTC
Some additional info (just for the record) that reflects the current state.

A bitness of jdk/netbeans is important. Possible options are:

1) 32-bit NB and only 32-bit cygwin is installed
2) 32-bit NB and only 64-bit cygwin is installed
3) 32-bit NB and both 32/64-bit cygwin are installed
4) 64-bit NB and only 32-cygwin is installed
5) 64-bit NB and only 64-cygwin is installed
6) 64-bit NB and both 32/64-bit cygwin are installed

Cases 1) and 5) are 'ideal' - in this case everything should work and it is *highly recommended* that bitness of NB/cygwin match. This means that if one tries to use cygwin64 (s)he *should* install 64-bit java and run 64-bit version of NetBeans (netbeans64.exe).

Case 2) is almost nonfunctional. It requires cygwin64/bin to be in %Path%; compilation will work, but run is possible in 'External Terminal' only.

Case 3) NB will detect 32-bit cygwin and will use it by default. IF user tries to add cygwin64 as a toolchain and compile his code in 64-mode, run in 'Output Window' will not work. 32-bit toolchain is OK in this case

Case 4) is almost nonfunctional. It requires cygwin/bin to be in %Path%; compilation will work, but run is possible in 'External Terminal' only.

Case 6) 64-bit compilation/run will work, 32-bit run will fail.
Comment 7 72VanMojick 2013-09-13 08:33:35 UTC
Pay attention in this web, please:

http://single9.net/2011/11/netbeans-7-unable-to-start-pty-process/

You will be able to solve the problem
Comment 8 72VanMojick 2013-09-13 08:41:35 UTC
Please, sure before ,that you have installed the compiler, debugger, make and plugin c/c++.
Maybe you should use External terminal, try it.
Comment 9 soldatov 2013-10-05 07:49:12 UTC
*** Bug 194328 has been marked as a duplicate of this bug. ***
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo