One way to handle this, would be to turn on ASAN (address sanitizer) temporarily. https://johanengelen.github.io/ldc/2017/12/25/LDC-and-AddressSanitizer.html If you have debug info, it'll output a lot of helpful information when an error occurs.