Weird behaviour when using -release in dmd

Mikko Aarnos via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Jun 7 09:47:00 PDT 2014


On Friday, 6 June 2014 at 14:21:38 UTC, Rene Zwanenburg wrote:
> Please try compiling with -g (generate debug info). The magic 
> numbers should turn into a stack trace, so you know where the 
> assert is triggered.


This helped quite a bit. The program was hitting an assert(0) 
which I had ruled out since it would be impossible due to the 
structure of the program. After about one hour of searching I 
found out that a small part of the program logic was INSIDE AN 
ASSERT. So when I compiled with -release that part - which 
happened to be critical - was thrown out and this was caused. A 
pretty stupid mistake, if you ask me. Thanks for the help, both 
of you.

-Mikko Aarnos


More information about the Digitalmars-d-learn mailing list