sigmatec_pk
asked on
Thread exception Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack
Im facing a problem- Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack.
Im working on Windows Application .net VS 2008.( im not using Response.Redirect). I got error when the code that is in thread is completed and call myThread.Abort() method. Any idea t solve the problem?
Im working on Windows Application .net VS 2008.( im not using Response.Redirect). I got error when the code that is in thread is completed and call myThread.Abort() method. Any idea t solve the problem?
Also, please note that your thread may be terminated before you call thread.abort.
ASKER
@daryal::
thanks for repy. No, im not using any third party dll or unmanaged code. I ve debugged code it executed fine, on thread Completion method when i abort the thread myThread.Abort it goes to catch block.
thanks for repy. No, im not using any third party dll or unmanaged code. I ve debugged code it executed fine, on thread Completion method when i abort the thread myThread.Abort it goes to catch block.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
@daryal:
is it not necessary to abort the started thread?
is it not necessary to abort the started thread?
As far as I know, if the thread completes, there is no need to abort it.
In fact, aborting a thread is usable in a few cases and it is done on a purpose, not for every thread.
In fact, aborting a thread is usable in a few cases and it is done on a purpose, not for every thread.
are you using a third party tool or dll or unmanaged code (like c) somewhere?
If this is the case, then I think the problem can be related with the unmanaged code.