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 194328

Summary: cannot execute on Win 7: Unable to start pty process
Product: cnd Reporter: Thomas Preisler <thp>
Component: executionAssignee: Andrew Krasny <akrasny>
Status: RESOLVED DUPLICATE    
Severity: normal CC: apepin
Priority: P2    
Version: 7.0   
Hardware: PC   
OS: Other   
Issue Type: DEFECT Exception Reporter:
Attachments: screen shot

Description Thomas Preisler 2011-01-13 21:47:30 UTC
Today I'm getting this when trying to run Welcome on Windows 7:

Unable to start pty process: 
RUN FAILED

It wors fine with the 'Standard Output' output window.
Comment 1 Thomas Preisler 2011-01-13 21:58:46 UTC
INFO [nativeexecution.support.logger]: [26527 ms.] Error occurred: Unable to start pty process: 
java.io.IOException: Unable to start pty process: 
        at org.netbeans.modules.nativeexecution.PtyNativeProcess.create(PtyNativeProcess.java:148)
[catch] at org.netbeans.modules.nativeexecution.AbstractNativeProcess.createAndStart(AbstractNativeProcess.java:152)
        at org.netbeans.modules.nativeexecution.api.NativeProcessBuilder.call(NativeProcessBuilder.java:232)
        at org.netbeans.modules.nativeexecution.api.execution.NativeExecutionService$1.call(NativeExecutionService.java:154)
        at org.netbeans.modules.nativeexecution.api.execution.NativeExecutionService$1.call(NativeExecutionService.java:149)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at org.netbeans.modules.nativeexecution.support.NativeTaskExecutorService$2.run(NativeTaskExecutorService.java:82)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1424)
        at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1968)
Comment 2 Andrew Krasny 2011-01-17 11:53:03 UTC
Thomas, 

please provide some details... 
Is it 64-bit or 32-bit OS? 
What toolchain was used? Do you have msys/cygwin? Versions? Do you use profiling?
can you start pty process outside the IDE (in shell's terminal, cd to netbeans/ide/bin/nativeexecution/Windows-x86/ and run ./pty)? 

Are you getting this error every time you try to start the project, or it's just a single failure?



Alexander, 

are you able to reproduce the problem? (I've just tried on my Win7 distribution and it works)

Thanks, 
=Andrew
Comment 3 Leonid Lenyashin 2011-01-18 16:31:09 UTC
Please reopen when more details provided.
Comment 4 Alexander Pepin 2011-01-18 16:55:17 UTC
I can not reproduce this either.
Comment 5 Thomas Preisler 2011-01-18 17:55:07 UTC
I'm running Win 7 in Virtual Box on my Mac. I believe it is a 32 bit version. I'm using Cygwin and MinGW, and I believe it is happening with both chains (has the tool chain anything to do with running a simple app as Welcome?). I'm using all standard setup so profiler is enabled and it is (was) happening every time I tried to run it (Welcome). Will try again with today's version and see if it is reproducible and re-open if it is.
Comment 6 Thomas Preisler 2011-01-18 22:01:24 UTC
OK, here are the details:

Using Win 7 32 bit version on Virtual Box image on a MAC

Using Cygwin and MinGW and it fails with both tool chains (tool chain probably doesn't matter when running a simple app like Welcome).

It happens every time I run in terminal Window

It works fine in standard output window.

./pty in netbeans/ide/bin/nativeexecution/Windows-x86 doesn't run in my MSys terminal window. See attached screen shot.

./pty does run in my cygwin termina window.

I installed a build and ran it from the desktop icon and it fails too. Not sure how MinGW is involved here.

If I run NetBeans from a MinGW window, it also doesn't work.

I opened the bug again. Please feel free to downgrade or close if you think it is an isolated case.
Comment 7 Thomas Preisler 2011-01-18 22:03:20 UTC
Created attachment 105120 [details]
screen shot
Comment 8 Thomas Preisler 2011-01-18 22:25:09 UTC
Cygwin version:

CYGWIN_NT-6.1 thp-PC 1.5.25(0.156/4/2) 2008-06-12 19:34 i686 Cygwin 

Is this OK? Incompatible? Too old?
Comment 9 Thomas Preisler 2011-01-18 22:54:56 UTC
Upgraded Cygwin to

CYGWIN_NT-6.1 thp-PC 1.7.7(0.230/5/3) 2010-08-31 09:58 i686 Cygwin 

and now it works. So, please feel free to close as 'using unsupported version' is that is the case. Or perhaps pty should be relinked with older Cygwin library to be compatible?
Comment 10 Alexander Pepin 2011-01-19 10:26:27 UTC
Cygwin 1.7.* should be used on Windows 7 instead of 1.5.* which was developed before Windows 7. At the same time users on WinXP/Vista can continue using cygwin 1.5.* (WinXP SP3 is a primary NB 7.0 platform).
Comment 11 Alexander Pepin 2011-01-19 15:42:20 UTC
Closed as CND works fine with cygwin 1.7.7 on both WinXP and Windows 7.
Comment 12 72VanMojick 2013-09-13 08:37:31 UTC
Please look this Web to solve this trouble, please:
http://single9.net/2011/11/netbeans-7-unable-to-start-pty-process/
Comment 13 72VanMojick 2013-09-13 08:40:53 UTC
(In reply to 72VanMojick from comment #12)
> Please look this Web to solve this trouble, please:
> http://single9.net/2011/11/netbeans-7-unable-to-start-pty-process/


Please, sure before ,that you have installed the compiler, debugger, make and plugin c/c++.
Maybe you should use External terminal, try it.
Comment 14 niamtni 2013-10-05 03:57:39 UTC
I'm able to reproduce the defect using a newer version of Cygwin. 

Here's my system config: 

CYGWIN_NT-6.1 srihari-PC 1.7.25(0.270/5/3) 2013-08-31 20:37 x86_64 Cygwin
Product Version: NetBeans IDE 7.3.1 (Build 201306052037)
Java: 1.7.0_25; Java HotSpot(TM) 64-Bit Server VM 23.25-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_25-b17
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)


I'm running the sample Welcome app, and it gives me the following error when i try on internal terminal. 

Unable to start pty process: 
RUN FAILED (exit value -2, total time: 97ms)


When i switch to "Standard terminal", i see the following: 

    729 [main] welcome_1 8732 C:\Users\srihari\Documents\NetBeansProjects\Welcome_1\dist\Debug\Cygwin_4.x-Windows\welcome_1.exe: *** fatal error - error while loading shared libraries: /cygdrive/C/Program Files/NetBeans 7.3.1/ide/bin/nativeexecution/Windows-x86/unbuffer.dll: cannot open shared object file: Exec format error
  30452 [main] welcome_1 8732 open_stackdumpfile: Dumping stack trace to welcome_1.exe.stackdump
RUN FAILED (exit value 256, total time: 1s)


As Thomas observed, this is fine when I run the program on "External Terminal".
Comment 15 soldatov 2013-10-05 07:49:12 UTC

*** This bug has been marked as a duplicate of bug 234221 ***