Odd stacktrace: Access Violation in object.TypeInfo_Interface.getHash

Fra via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Sep 7 04:46:47 PDT 2015


On Monday, 7 September 2015 at 11:04:20 UTC, Nicholas Wilson 
wrote:
> On Monday, 7 September 2015 at 08:55:31 UTC, Fra wrote:
>> I encountered a runtime error in my code and all I can get 
>> (even in debug mode) is the following stacktrace:
>>
>> object.Error@(0): Access Violation
>> ----------------
>> 0x0051C308 in const(nothrow @trusted uint 
>> function(const(void*))) object.TypeInfo_Interface.getHash
>> 0x0058D2C0 in D6engine5world5world5World6__vtblZ
>> Error executing command run: Program exited with code 1
>>
>> No other information is provided.
>> Anyone ever experienced anything similar? That __vtblZ part of 
>> the symbol name scares me a bit, TBH.
>> The codebase is big, so will take me some time to reduce it to 
>> a simple example, even if I were to use dustmite, but I was 
>> hoping that someone faced this error message before and could 
>> give me a pointer on what to look for.
>
> __vtbl indicates an entry in a virtual function table
> object.Error@(0): the '0' the is the address that failed.
>
> you attempted to get the hash of a null object ( of type 
> engine.world.world.World )
>
> It does seem a bit odd that no other info is provided  stack 
> traces are usually quite a bit longer than that  ...
Truely so.
Besides, I managed to track down the exact instruction that 
triggers the whole thing:

   SomeClass[SomeInterface] myAA;
   [... lots of code ...]
   SomeInterface element = null;
   [... more lots of code ...]
   if (element !in myAA) return;

where myAA is a standard Associative array and SomeClass also 
inherits from the SomeInterface.
I'm still trying to get provide a "working" example. I am using 
an old compiler (2.66.1), but I could not find any corresponding 
bug on issues.dlang.org, neither open nor resolved.


More information about the Digitalmars-d-learn mailing list