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 175368 - Code Assistance doesn't work on Windows XP under sova's account
Summary: Code Assistance doesn't work on Windows XP under sova's account
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Alexey Vladykin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-24 14:44 UTC by soldatov
Modified: 2009-10-27 11:05 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
screenshot (26.12 KB, image/png)
2009-10-26 08:24 UTC, soldatov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description soldatov 2009-10-24 14:44:09 UTC
I added new account with "'" and started NetBeans. IDE found MinGW and MSYS. MinGW works correctly, but Code Assistance
is broken under Cygwin ('Code Assistance' tab contains __STDC__=1 only).
Comment 1 Thomas Preisler 2009-10-26 04:57:15 UTC
What does 'under sova's account' mean?
Comment 2 soldatov 2009-10-26 08:24:48 UTC
Created attachment 90071 [details]
screenshot
Comment 3 Alexey Vladykin 2009-10-26 14:54:08 UTC
I've reproduced the problem and currently tracking down the reason.
Comment 4 Alexey Vladykin 2009-10-26 15:50:50 UTC
Fixed in http://hg.netbeans.org/cnd-main/rev/c980cb4e401d by switching to NativeProcessBuilder.
Comment 5 Alexander Simon 2009-10-26 21:12:31 UTC
Does not fixed.
executed command does not provide paths and macros
because mingw does not understand
gcc.exe -x c -E -v /dev/null

Please, fix logical error in code:
    private String tmpFile(ExecutionEnvironment execEnv) {
        if (tmpFile == null && execEnv.isLocal() && Utilities.isWindows()) {
            try {
                tmpFile = File.createTempFile("xyz", ".c"); // NOI18N
                tmpFile.deleteOnExit();
                return tmpFile.getAbsolutePath();
            } catch (IOException ioe) {
            }
        }
        return "/dev/null"; // NOI18N
    }
Comment 6 Andrew Krasny 2009-10-26 21:24:55 UTC
But on Windows it will return xyz****.c file.. isn't it?
Comment 7 Alexey Vladykin 2009-10-26 21:41:23 UTC
Oh, I see my mistake. Thank you for the catch.
It'll return xyz***.c only the first time. Next time, when tmpFile != null, it'll return /dev/null.
Comment 8 Alexey Vladykin 2009-10-26 22:44:25 UTC
Fixed: http://hg.netbeans.org/cnd-main/rev/fab67ef50755
Comment 9 Quality Engineering 2009-10-27 11:05:09 UTC
Integrated into 'main-golden', will be available in build *200910270201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/c980cb4e401d
User: Alexey Vladykin <alexey_vladykin@netbeans.org>
Log: #175368 Code Assistance doesn't work on Windows XP under sova's account