Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: runeight on April 13, 2020, 07:32:40 pm

Title: I have never seen this error before
Post by: runeight on April 13, 2020, 07:32:40 pm
I have been working on a moderately complex app. Up until now all went as normal.

I have attached the text of the error in a snippet.

This happens if I execute. When I debug, however, debugger shows no information, but halts execution. The call stack is visible, but not useful.

The code compiles without errors or warnings of any kind. Death occurs on entry to a c++ constructor. That is, the debugger halts at the definition line for the constructor. I cannot step in any farther than that without the error. Debugger shows that the argument to the constructor is accurate and well formed.

The constructor has been in the code for a long time without errors. So, obviously, something else that was changed has affected it.

Any advice?
Title: Re: I have never seen this error before
Post by: oBFusCATed on April 13, 2020, 07:49:44 pm
Enable catching exceptions throwing and fix your program.
This is a bug in your program.
Title: Re: I have never seen this error before
Post by: runeight on April 13, 2020, 09:24:41 pm
Thanks for the reply. Will do.
Title: Re: I have never seen this error before
Post by: runeight on April 14, 2020, 02:29:32 am
I did finally get to the bottom of this. The exception handling was already on and the debugger was catching and stopping. But, the available info was not a help in this case.

After a LOT of digging I discovered that I was setting a string to NULL in a declaration. A fat finger for the iine below it.

Seems like the compiler aught to say something about this, but I'll know what to look for if I ever see that particular message again.
Title: Re: I have never seen this error before
Post by: oBFusCATed on April 14, 2020, 09:07:36 am
There are two modes for catching.
1. catch handler
2. catch the throw statement

If you have the second mode enabled it should tell you which line of the code threw the exception.