D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 9678 - std.file.getcwd crash on Win 64, 0xc0000005
Summary: std.file.getcwd crash on Win 64, 0xc0000005
Status: RESOLVED DUPLICATE of issue 9677
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: x86_64 Windows
: P2 normal
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-09 11:54 UTC by Michael
Modified: 2013-03-10 01:18 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Michael 2013-03-09 11:54:25 UTC
One line sample:

auto currDir = getcwd();


On forum: 
about getcwd - http://forum.dlang.org/thread/pnuxfheeaqwyfjdqwyzw@forum.dlang.org

about dirEntries and absolutePath - http://forum.dlang.org/thread/snegkdvgmutgvxnijjfp@forum.dlang.org

As I assume, all related errors come from bugs in std.utf (or something that used in this module) because:

string cwd()
{
    import core.sys.windows.windows;
    wchar[] ret = new wchar[10240];
    auto n = GetCurrentDirectoryW(to!DWORD(ret.length), ret.ptr);
    return ret[0 .. n].to!string();
}

works good on both Win 32 and Win 64.

Win 8 Pro 64 bit
Dmd 2.062
Visual Studio 2012 Express.
Comment 1 Rainer Schuetze 2013-03-10 01:18:18 UTC

*** This issue has been marked as a duplicate of issue 9677 ***