Thread overview
LDC asserts cause win32 exception
Apr 19
kinke
April 19
using an assert and LDC causes a wierd unknown exception in windows using latest ldc's. In dmd the asserts simply error and show the message but in ldc they give a kernel error and no way to know what has gone wrong.
April 19
On Wednesday, 19 April 2017 at 16:10:47 UTC, Mike B Johnson wrote:
> using an assert and LDC causes a wierd unknown exception in windows using latest ldc's. In dmd the asserts simply error and show the message but in ldc they give a kernel error and no way to know what has gone wrong.

More details please (target architecture, LDC version, Visual Studio/WinSDK version, 'kernel error'...). Wrt. 'no way to know what has gone wrong': attaching a debugger may be enlightening. ;)
With LDC 1.2, we now generate a backtrace for each exception, so I'm guessing that's causing your problems, but without further details, I can only speculate.
April 19
On Wednesday, 19 April 2017 at 16:24:41 UTC, kinke wrote:
> On Wednesday, 19 April 2017 at 16:10:47 UTC, Mike B Johnson wrote:
>> using an assert and LDC causes a wierd unknown exception in windows using latest ldc's. In dmd the asserts simply error and show the message but in ldc they give a kernel error and no way to know what has gone wrong.
>
> More details please (target architecture, LDC version, Visual Studio/WinSDK version, 'kernel error'...). Wrt. 'no way to know what has gone wrong': attaching a debugger may be enlightening. ;)
> With LDC 1.2, we now generate a backtrace for each exception, so I'm guessing that's causing your problems, but without further details, I can only speculate.


Windows, latest ldc x86 as I said(whatever is on the d/l page). I tried multiple versions.

I did attach a debugger. As I said, it happened on an assert. Instead of telling me the assert error(e.g., assert("This is an error");) it gives a kernel error(unhandled win32 exception or whatever). DMD gives the assert error correctly on the same code. Either ldc is crashing in the assert or it simply isn't asserting it correctly.