473,473 Members | 1,755 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Cannot evaluate expression... optimized?

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
Apr 24 '07 #1
4 23170
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
Apr 24 '07 #2
On Tue, 24 Apr 2007 18:27:30 +0200, Göran Andersson <gu***@guffa.com>
wrote:
>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.
Thank you for the reply...

I'm usually just using F5 or F6 to compile/debug.

What should I be doing differently to ensure that I'm compiling in
debug mode?

Thanks again
Apr 24 '07 #3
Glenn wrote:
On Tue, 24 Apr 2007 18:27:30 +0200, Göran Andersson <gu***@guffa.com>
wrote:
>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.

Thank you for the reply...

I'm usually just using F5 or F6 to compile/debug.

What should I be doing differently to ensure that I'm compiling in
debug mode?

Thanks again
In the Build menu you will find Configuration Manager, that you can use
to select and edit the build configurations.

If you customize your toolbar, you can add the Solution Configurations
dropdown. It lets you see what the active setting is, and easily switch
between them.

--
Göran Andersson
_____
http://www.guffa.com
Apr 24 '07 #4
On Tue, 24 Apr 2007 23:33:05 +0200, Göran Andersson <gu***@guffa.com>
wrote:
>Glenn wrote:
>On Tue, 24 Apr 2007 18:27:30 +0200, Göran Andersson <gu***@guffa.com>
wrote:
>>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.

Thank you for the reply...

I'm usually just using F5 or F6 to compile/debug.

What should I be doing differently to ensure that I'm compiling in
debug mode?

Thanks again

In the Build menu you will find Configuration Manager, that you can use
to select and edit the build configurations.

If you customize your toolbar, you can add the Solution Configurations
dropdown. It lets you see what the active setting is, and easily switch
between them.
OK, in the express version, it's not under Build... I had to go to
Solution Explorer, then open Properties. I found the check box for
"optimize code", so going to try that.

Thanks,
Glenn
Apr 25 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Charlie | last post by:
I have the first part of the project done but I'm having difficulty deciding how to add an evaluate function to this program. The program asks the user to enter a function in infix notation and...
1
by: David Laub | last post by:
I have no problems running the following dynamic XPath evaluator form MSXSL: <msxsl:script implements-prefix="dyn" language="jscript"> evaluate(context, expression) { return...
3
by: Coco | last post by:
Hi! Does c# has any class method that will be able to evaluate a given string e.g ((True && False) || (True && True)) and return the result in boolean for this case is true Thanks!
13
by: Zeng | last post by:
Hello, Please help!!! I've been stuck on this issue for months. I just wonder if there is a way to programmatically evaluate expression strings such as ( ( 3 + 5 ) / 2 ) > 4 --> this...
2
by: steevehetu18 | last post by:
Hi, I'm doing a algorithm to calcule Earliest Start et Latest Start for a Graph with Nodes and Arcs. (like a PERT diagram) . Unfortunatly, i receive a wierd exception message for a specific...
0
by: Rick Little | last post by:
While stepping through code, I've started getting this message when tying to see the value of most variables. Cannot evaluate expression because a thread is stopped at a point where garbage...
0
by: Ajit Goel | last post by:
Hi; My project file property is set to use "Visual Studio Development Server". I am able to debug and see the corresponding values when I mouseover but as soon as I change to the project file...
2
by: tbh | last post by:
in an error path in an aspx script under DotNet 2, IIS6, Win2003 Server I get the following error (which I don't understand) on Respone.End(): {Unable to evaluate expression because the code is...
1
by: John A Grandy | last post by:
I am trying to track down a mysterious null reference exception that occurs on making a call to a method in a assembly referenced by my project ( i.e. flow-of-control never arrives at the code...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.