Glenn wrote:
> OK, I've looked up this message but am not finding how to get rid of
> it: "Cannot evaluate expression because a thread is stopped at a point
> where garbage collection is impossible, possibly because the code is
> optimized"
>
> I'm trying to debug, and it's rather difficult when I can't find the
> values of expressions because of whatever is causing this message.
>
> Is there anyone that can tell me what I can do to get rid of it? How
> do I un-optimize the code, perhaps?
>
> Any help appreciate, ty 
>
> Glenn
When compiling in debug mode, the compiler adds extra nop (no operation)
instructions in the code, so that there is an instruction in the code
for every possible break point. When compiling in release mode, these
extra instructions are not included, and some instructions may be
reorganised so that the final code does not exactly represent the flow
of the source code. If you stop the execution at a point in the code
that can not be matched to a position in the source code, you get this
error.
If you want the final code to exactly match the source code, you have to
compile it in debug mode. You should be aware, though, that some
operations are significantly slower in debug mode. Handling an exception
for example takes something like 100 times longer in debug mode.
--
Göran Andersson
_____
http://www.guffa.com