What to do with InvalidMemoryOperationError

Joakim via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Jan 23 02:13:42 PST 2015


On Wednesday, 21 January 2015 at 12:00:47 UTC, Nordlöw wrote:
> My executable throws as
>
>     core.exception.InvalidMemoryOperationError@(0)
>
> when compiled with DMD git master.
>
> I get no stack trace in GDB.
>
> What to do?

InvalidMemoryOperationError generally means that you are 
performing certain disallowed memory operations during a full 
garbage collection, such as allocating while the gc is running.  
This usually happens when you call a function that allocates in a 
destructor, which will trigger this error as the destructor is 
run by the gc.

It appears that the gc issues mentioned above can also trigger 
it.  If you're running off git head, maybe you can apply that PR 
2794 and see if it helps.  Otherwise, maybe you've hit some other 
gc issue somewhere.


More information about the Digitalmars-d-learn mailing list