The TraceHandler that is built into the core runtime is not being called on Access Violation errors. Try this piece of sourcecode: import std.stdio; import core.runtime; Throwable.TraceInfo TraceHandler1(void* ptr){ writefln("TraceHandler1"); return null; } Throwable.TraceInfo TraceHandler2(void* ptr){ writefln("TraceHandler2"); return null; } void main(string[] argv){ Runtime.traceHandler(&TraceHandler1); try { int[] array = new int[20]; array[20] = 0; } catch(Error e){ } Runtime.traceHandler(&TraceHandler2); int* ptr = null; *ptr = 0; } TraceHandler2 is never being called. I tested this with dmd 2.046, 2.048 and 2.049.
Fixed in https://github.com/D-Programming-Language/druntime/pull/368