digitalmars.D.learn - conv parse imported file bug?
- Lemonfiend (39/39) Jul 16 2012 [DMD32 D Compiler v2.059]
- Lemonfiend (12/51) Jul 16 2012 Blast, minor edit mistake..
- Jonathan M Davis (4/6) Jul 16 2012 The commit date for the fix is after the release of 2.059, so presumably...
- Lemonfiend (4/12) Jul 16 2012 Ack.. I should have checked the date.. (never used bugzilla
[DMD32 D Compiler v2.059] Hello, I was rewriting some code so some large data array was a separate data file, and got an abnormal program termination, with the error: C:\D\dmd2\windows\bin\..\..\src\phobos\std\conv.d(2704): Error: function std.conv.parse!(float[],string).parse compiler error, parameter 's', bugzilla 2962? Assertion failure: '0' on line 717 in file 'glue.c' I made a small testcase, and it didn't occur again. So I made the testcase slightly bigger, by moving the parse function to a separate module, and it occurred again. According to the bugzilla referenced in the error this was fixed; perhaps not? -- main.d --------------- module tuttmp.main; import std.stdio; import tuttmp.file; import tuttmp.parser; void main() { writeln(fileString); parseImport(); } -- parser.d --------------- module tuttmp.parser; import std.conv; import std.stdio; public void parseImport() { writeln(fileString); auto fileArray = parse!(float[])(fileString); writeln(fileArray); } -- file.d --------------- module tuttmp.file; public string fileString = import("file.data"); -- file.data --------------- [1,2,3]
Jul 16 2012
On Monday, 16 July 2012 at 17:02:52 UTC, Lemonfiend wrote:[DMD32 D Compiler v2.059] Hello, I was rewriting some code so some large data array was a separate data file, and got an abnormal program termination, with the error: C:\D\dmd2\windows\bin\..\..\src\phobos\std\conv.d(2704): Error: function std.conv.parse!(float[],string).parse compiler error, parameter 's', bugzilla 2962? Assertion failure: '0' on line 717 in file 'glue.c' I made a small testcase, and it didn't occur again. So I made the testcase slightly bigger, by moving the parse function to a separate module, and it occurred again. According to the bugzilla referenced in the error this was fixed; perhaps not? -- main.d --------------- module tuttmp.main; import std.stdio; import tuttmp.file; import tuttmp.parser; void main() { writeln(fileString); parseImport(); } -- parser.d --------------- module tuttmp.parser; import std.conv; import std.stdio; public void parseImport() { writeln(fileString); auto fileArray = parse!(float[])(fileString); writeln(fileArray); } -- file.d --------------- module tuttmp.file; public string fileString = import("file.data"); -- file.data --------------- [1,2,3]Blast, minor edit mistake.. parser.d is supposed to be module tuttmp.parser; import std.conv; import std.stdio; import tuttmp.file; public void parseImport() { auto fileArray = parse!(float[])(fileString); writeln(fileArray); }
Jul 16 2012
On Monday, July 16, 2012 19:02:48 Lemonfiend wrote:According to the bugzilla referenced in the error this was fixed; perhaps not?The commit date for the fix is after the release of 2.059, so presumably, it works just fine with git master. - Jonathan M Davis
Jul 16 2012
On Monday, 16 July 2012 at 19:46:21 UTC, Jonathan M Davis wrote:On Monday, July 16, 2012 19:02:48 Lemonfiend wrote:Ack.. I should have checked the date.. (never used bugzilla before) Thanks :)According to the bugzilla referenced in the error this was fixed; perhaps not?The commit date for the fix is after the release of 2.059, so presumably, it works just fine with git master. - Jonathan M Davis
Jul 16 2012