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 196251

Summary: Can not run/debug Subprojects sample on Windows
Product: cnd Reporter: Alexander Pepin <apepin>
Component: ProjectAssignee: Alexander Simon <alexvsimon>
Status: VERIFIED FIXED    
Severity: normal CC: gorrus, mmirilovic
Priority: P1    
Version: 7.0   
Hardware: PC   
OS: Windows 7 x64   
Issue Type: DEFECT Exception Reporter:
Attachments: possible fix

Description Alexander Pepin 2011-03-03 18:23:17 UTC
see also bug #184785
Windows 7 x64, cygwin
Steps to reproduce:
- run IDE with a fresh userdir
- create Subroject sample
- run the project
Result: Run fails with the message:
/cygdrive/c/Users/ap153252/Documents/NetBeansProjects/SubProjects_8/main/dist/Debug/Cygwin_4.x-Windows/main.exe:
error while loading shared libraries: ?: cannot open shared object file: No
such file or directory

RUN FAILED (exit value 127, total time: 63ms)
Comment 1 Alexander Pepin 2011-03-03 18:24:58 UTC
mistyped, should be see also bug #194785
Comment 2 Vladimir Voskresensky 2011-03-03 19:17:05 UTC
see also issue #196221
Comment 3 Alexander Simon 2011-03-03 20:34:05 UTC
fixed, change set:
http://hg.netbeans.org/cnd-main?cmd=changeset;node=a2bd1c26d8dc
Comment 4 Alexander Simon 2011-03-04 12:15:55 UTC
wrong fix (fix was for bug #196221)
Comment 5 Alexander Pepin 2011-03-04 14:28:42 UTC
The problem occurs if cygwin is not in PATH. In that case user can run Subprojects using External Terminal or Standard Output but can not debug. Run in Internal Terminal does not work either.
Comment 6 Alexander Simon 2011-03-09 10:41:40 UTC
cygwin/bin should be in path.
See http://netbeans.org/community/releases/69/cpp-setup-instructions.html
Comment 7 Egor Ushakov 2011-03-09 12:38:08 UTC
*** Bug 194785 has been marked as a duplicate of this bug. ***
Comment 8 Andrew Krasny 2011-03-09 14:21:55 UTC
Created attachment 106856 [details]
possible fix
Comment 9 Andrew Krasny 2011-03-09 14:25:01 UTC
Attached is a possible fix for this.
But I still don't like the solution as it introduces different behavior depending on what actions were taken by user. 

I would prefer to force users to add cygwin to %Path% variable or to Windows Registry. 

Perhaps a better solution would be to have some place in Tools->Options to configure non-standard and non-detectable path to cygwin.. But this requires UI changes...
Comment 10 Alexander Pepin 2011-03-10 17:19:04 UTC
After adding cygwin/bin to PATH the bug is still reproducible.
It's reproducible in RC1 build.
Comment 11 Alexander Simon 2011-03-10 19:14:51 UTC
fixed, change set:
http://hg.netbeans.org/cnd-main/rev/d5a0169e3e4b
Comment 12 Alexander Simon 2011-03-10 19:18:12 UTC
QA, please, verify fix
Comment 13 Quality Engineering 2011-03-11 09:39:55 UTC
Integrated into 'main-golden', will be available in build *201103110400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/d5a0169e3e4b
User: Alexander Simon <alexvsimon@netbeans.org>
Log: fixed Bug #196251 Can not run/debug Subprojects sample on Windows
Comment 14 Alexander Pepin 2011-03-11 11:03:59 UTC
The fix is verified in dev build.
Comment 15 Alexander Simon 2011-03-11 11:40:31 UTC
Andrey, please, review fix.
Comment 16 Andrew Krasny 2011-03-11 11:56:45 UTC
The fix is save. It doesn't solve all possible problems that may be introduced by user's input (environment), but it guarantees that we (NB) don't introduce this kind of problems. 

The fix is OK.
Comment 17 Alexander Simon 2011-03-11 21:12:27 UTC
fixed in release70:
http://hg.netbeans.org/releases/rev/eb6d88a57aab
Comment 18 Alexander Pepin 2011-03-17 16:31:23 UTC
verified in RC1 build 20110317