D.gnu - Crash when iterating over files with foreach and std.file.dirEntries
- Jeremy DeHaan (8/8) Nov 15 2015 I'm wondering if anyone has experienced a crash when using
- Johannes Pfau (5/14) Nov 16 2015 I think somebody already reported this. The windows builds are
- Jeremy DeHaan (4/18) Nov 16 2015 Should I file an issue in the bugzilla just in case? And if it
- Vincent R (4/7) Nov 16 2015 yes you should and please post the code you have used because I
- Jeremy DeHaan (4/12) Nov 16 2015 Absolutely. I'm going to spend some time narrowing this down and
- Jeremy DeHaan (26/40) Nov 17 2015 After minimizing my code, I am now wondering if it has something
- Jeremy DeHaan (2/2) Nov 17 2015 Just to reiterate, this happens with 32 bit gdc only. The 64 bit
I'm wondering if anyone has experienced a crash when using dirEntries to iterate over files. This is for the Windows 32 bits build of gdc from the gdc downloads page and it happens for both the 5.2.0 and 4.9.3 gcc versions (I haven't tried any others). It works correctly for the 64 bit builds though. I'm wondering if this is a known issue (I couldn't find anything) or if I should get a minimal example going. Crash seems to happen when exiting a foreach loop.
Nov 15 2015
Am Mon, 16 Nov 2015 03:08:39 +0000 schrieb Jeremy DeHaan <dehaan.jeremiah gmail.com>:I'm wondering if anyone has experienced a crash when using dirEntries to iterate over files. This is for the Windows 32 bits build of gdc from the gdc downloads page and it happens for both the 5.2.0 and 4.9.3 gcc versions (I haven't tried any others). It works correctly for the 64 bit builds though. I'm wondering if this is a known issue (I couldn't find anything) or if I should get a minimal example going. Crash seems to happen when exiting a foreach loop.I think somebody already reported this. The windows builds are unsupported right now and there are likely many similar issues. I hope we'll have stable MinGW builds at the end of this year.
Nov 16 2015
On Monday, 16 November 2015 at 09:31:22 UTC, Johannes Pfau wrote:Am Mon, 16 Nov 2015 03:08:39 +0000 schrieb Jeremy DeHaan <dehaan.jeremiah gmail.com>:Should I file an issue in the bugzilla just in case? And if it makes you feel better, this is the first issue I've encountered with the MinGW builds.I'm wondering if anyone has experienced a crash when using dirEntries to iterate over files. This is for the Windows 32 bits build of gdc from the gdc downloads page and it happens for both the 5.2.0 and 4.9.3 gcc versions (I haven't tried any others). It works correctly for the 64 bit builds though. I'm wondering if this is a known issue (I couldn't find anything) or if I should get a minimal example going. Crash seems to happen when exiting a foreach loop.I think somebody already reported this. The windows builds are unsupported right now and there are likely many similar issues. I hope we'll have stable MinGW builds at the end of this year.
Nov 16 2015
On Monday, 16 November 2015 at 15:34:13 UTC, Jeremy DeHaan wrote:Should I file an issue in the bugzilla just in case? And if it makes you feel better, this is the first issue I've encountered with the MinGW builds.yes you should and please post the code you have used because I would be curious to reproduce it myself. Thanks
Nov 16 2015
On Monday, 16 November 2015 at 22:47:27 UTC, Vincent R wrote:On Monday, 16 November 2015 at 15:34:13 UTC, Jeremy DeHaan wrote:Absolutely. I'm going to spend some time narrowing this down and making sure I know what exactly is causing it before I post any code though.Should I file an issue in the bugzilla just in case? And if it makes you feel better, this is the first issue I've encountered with the MinGW builds.yes you should and please post the code you have used because I would be curious to reproduce it myself. Thanks
Nov 16 2015
On Tuesday, 17 November 2015 at 05:25:27 UTC, Jeremy DeHaan wrote:On Monday, 16 November 2015 at 22:47:27 UTC, Vincent R wrote:After minimizing my code, I am now wondering if it has something to do with ranges in general or if it is related to just dirEntries. This will cause a crash: module test; import std.stdio; import std.file; void main(string[] args) { writeln("Testing"); auto directoryEntries = dirEntries("C:\\", SpanMode.shallow); writeln("fails?"); }//crash on exiting the scope And if we try to do something with the range we get a crash earlier. module test; import std.stdio; import std.file; import std.array; void main(string[] args) { writeln("Testing"); auto directoryEntries = array(dirEntries("C:\\", SpanMode.shallow)); //crash here writeln("fails?");//never printed }On Monday, 16 November 2015 at 15:34:13 UTC, Jeremy DeHaan wrote:Absolutely. I'm going to spend some time narrowing this down and making sure I know what exactly is causing it before I post any code though.Should I file an issue in the bugzilla just in case? And if it makes you feel better, this is the first issue I've encountered with the MinGW builds.yes you should and please post the code you have used because I would be curious to reproduce it myself. Thanks
Nov 17 2015
Just to reiterate, this happens with 32 bit gdc only. The 64 bit gdc works correctly for this.
Nov 17 2015