views:

333

answers:

2

In C++Builder, I wrote the following code (in Button1Click handler), When I run in debug mode, I get the "Int3 DbgBreakPoint" (Stack corrupted?). This doesn't happen for AnsiSting (Maybe reference counting).

WideString boshluq;
boshluq=L" ";

Is this normal? What do you suggest me to fix this code?

+1  A: 

Or a debug version of a library getting called with WideStrings? With an explicit int 3; call build in?

Lars Truijens
I tried this code (two lines) in C++Builder 6 and C++Builder 2006. Same result. I don't believe that they both have int3 in their library.
samir105
It could be that they both call the same win32 api function which has it.
Lars Truijens
+1  A: 

WideStrings are pointer referenced variables for Windows WideStrings, maybe the problem is in your windows system library.

I have the same problem with breakpoint in the ntdll.dll, I dont know if it is the same for you.

I solve with this unit http://www.tbosystems.bluehosting.com.br/dbx4/int3.pas (Thanks to Leonel Togniolli), maybe you can check this out and see if can help you out, or try the same code in other windows machine.

Cesar Romero
Yes you are right. It solved my problem. Thanks a lot. And thanks to Leonel Togniolli.
samir105