| |
| Posted by Christian Köstlin in reply to bearophile | PermalinkReply |
|
Christian Köstlin
Posted in reply to bearophile
| On 2/19/11 22:06 , bearophile wrote:
> Christian K.:
>
>> hi .. i have a small library for combinatorial parsing.
>> when i updated to version 2.052 of dmd (tested on os x) i got an
>> exception from variant.d:279 (target must be non-null).
>
> It may be a bug. Are you able to create a minimal test program that later will be fit for bugzilla?
>
> Bye,
> bearophile
Hi,
unfortunately not ... I looked several minutes at the stacktrace (would it help if I send you the whole project), and could not figure out what the problem was. then I tried to change the program (see the diff) and it worked.
this is the stacktrace of the exception if it helps:
core.exception.AssertError@/Users/gizmo/.homebrew/Cellar/dmdtwo/2.052/src/phobos/std/variant.d(279): target must be non-null
----------------
5 compiler 0x000340b5 onAssertErrorMsg + 73
6 compiler 0x0003dfb2 _d_assert_msg + 26
7 compiler 0x0000ea76 int std.variant.VariantN!(32).VariantN.handler!(astelements.MessageInfo).handler(std.variant.VariantN!(32).VariantN.OpID, ubyte[32]*, void*).bool tryPutting(astelements.MessageInfo*, TypeInfo, void*) + 130
8 compiler 0x0000e75c int std.variant.VariantN!(32).VariantN.handler!(astelements.MessageInfo).handler(std.variant.VariantN!(32).VariantN.OpID, ubyte[32]*, void*) + 200
9 compiler 0x000152a2 std.variant.VariantN!(32).VariantN std.variant.VariantN!(32).VariantN.opAssign!(std.variant.VariantN!(32).VariantN).opAssign(std.variant.VariantN!(32).VariantN) + 78
10 compiler 0x0001613a void std.array.Appender!(std.variant.VariantN!(32).VariantN[]).Appender.put!(std.variant.VariantN!(32).VariantN).put(std.variant.VariantN!(32).VariantN) + 134
11 compiler 0x000161cb void std.array.Appender!(std.variant.VariantN!(32).VariantN[]).Appender.put!(std.variant.VariantN!(32).VariantN[]).put(std.variant.VariantN!(32).VariantN[]) + 115
12 compiler 0x0000aa8a pc.parser.ParseResult!(immutable(char)).ParseResult pc.parser.Parser!(immutable(char)).Parser.Repetition.parse(immutable(char)[]) + 422
13 compiler 0x0000a369 pc.parser.ParseResult!(immutable(char)).ParseResult pc.parser.Parser!(immutable(char)).Parser.parseAll(immutable(char)[]) + 41
14 compiler 0x000026b6 _Dmain + 446
15 compiler 0x0003e343 extern (C) int rt.dmain2.main(int, char**).void runMain() + 23
16 compiler 0x0003e2ca extern (C) int rt.dmain2.main(int, char**).void tryExec(scope void delegate()) + 38
17 compiler 0x0003e38b extern (C) int rt.dmain2.main(int, char**).void runAll() + 59
18 compiler 0x0003e2ca extern (C) int rt.dmain2.main(int, char**).void tryExec(scope void delegate()) + 38
19 compiler 0x0003e25b main + 179
20 compiler 0x000024ed start + 53
21 ??? 0x00000003 0x0 + 3
regarding types:
my debugoutput at the exception showed me, that the appender already has one element of type astelements.PackageInfo and now an array with one element of type astelements.MessageInfo is to be put into the appender. perhaps this can lead to a problem?
messageinfo is a struct declared like:
struct MessageInfo {
string name;
FieldInfo[] fieldInfos;
EnumDefinition[] enums;
MessageInfo[] messages;
string thePackage = "";
...
}
, packageinfo is even simpler:
class PackageInfo {
string fName;
this(string name) {
fName = name;
}
}
thanks in advance
christian
|