News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

debug watches issue

Started by olaf888, February 20, 2016, 05:57:00 PM

Previous topic - Next topic

olaf888

Hi all

codeblocks crushes everytime I want to see a pointer pointing in an
forbidden area. VC 2008 debugger shows "<bad pointer>".


How can I fix this problem ?

Peter

oBFusCATed

Can you reproduce this in a simple example program?
Can you post some version infos like cb version, compiler, debugger, os?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

olaf888


codeblocks 13.12   64 bit version 
windows 7 pro

I must correct the "char *" pointer value does not point to an forbidden area
I tried to simulate the error  in a smaller code example, but cb does not crush then.

It happens when I put extra value into watch window.
In the local watch there are no problems with this value.



oBFusCATed

Does this happen with 16.01?
I'll need a way to reproduce this.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

olaf888

Quote from: oBFusCATed on February 20, 2016, 10:48:15 PM
Does this happen with 16.01?
I'll need a way to reproduce this.
Yes, it does too !
I know what happens. The watch process shows the content as text until a zero stop it, but there is no zero ... never  :D
and then it crushed. I put a zero in it and then no problem.

But I cant repeat this in the smaller example version.  The watch process shows nothing and good no problem no crush.

   

oBFusCATed

Is it really crashing or it is non-responsive and taking 100% cpu (on a single core)?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

olaf888


It is a 100 % no response crash and I have to restart cb.
look here:
https://www.youtube.com/watch?v=xE4Z9Z8GM80

oBFusCATed

I guess you don't make a difference between stuck and crashed.

A crash is when the applications encounters some illegal code and the OS stops it. The effect on windows is that you see the 'Don't send dialog'.
If the application is stuck then it is not responsible, but still working and using 100%. So if you wait long enough it might finish as long as it is not in an infinite loop state.

So, do you see a crash or an stuck application?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

olaf888

#8
codeblocks.exe process do 25 % of quad core work
I can move the window but in the windows nothing works.
until os give me that error window:
"Code::Blocks IDE don't responding"
"Close application"
"wait"

For me it seems that the watch process prints out mybuf content until "0" but there is no.
How can I adjust:  print the first 20 bytes of a pointer like the memory dump ?

Zero is the termination character in ascii text . For example
printf("%s",memory);  prints until a zero stops it or an exception is thrown.

oBFusCATed

Add "set print elements 200" in the initial commands of the debugger.
In the past we've decided to remove the limit, but I guess this has been a wrong decision.
I'll change the default to 200 in the trunk.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

olaf888



"set print elements 200"  worked ! 
YEAH thx.  ;D