Author Topic: debug watches issue  (Read 5845 times)

Offline olaf888

  • Single posting newcomer
  • *
  • Posts: 8
debug watches issue
« on: February 20, 2016, 05:57:00 pm »
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

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: debug watches issue
« Reply #1 on: February 20, 2016, 06:23:43 pm »
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!]

Offline olaf888

  • Single posting newcomer
  • *
  • Posts: 8
Re: debug watches issue
« Reply #2 on: February 20, 2016, 08:02:53 pm »

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.



Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: debug watches issue
« Reply #3 on: February 20, 2016, 10:48:15 pm »
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!]

Offline olaf888

  • Single posting newcomer
  • *
  • Posts: 8
Re: debug watches issue
« Reply #4 on: February 21, 2016, 06:24:20 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.

   

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: debug watches issue
« Reply #5 on: February 21, 2016, 06:38:46 pm »
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!]

Offline olaf888

  • Single posting newcomer
  • *
  • Posts: 8
Re: debug watches issue
« Reply #6 on: February 22, 2016, 04:48:57 pm »

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

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: debug watches issue
« Reply #7 on: February 22, 2016, 09:20:52 pm »
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!]

Offline olaf888

  • Single posting newcomer
  • *
  • Posts: 8
Re: debug watches issue
« Reply #8 on: February 22, 2016, 10:40:29 pm »
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.
« Last Edit: February 23, 2016, 12:04:04 am by olaf888 »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: debug watches issue
« Reply #9 on: February 23, 2016, 12:08:01 am »
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!]

Offline olaf888

  • Single posting newcomer
  • *
  • Posts: 8
Re: debug watches issue
« Reply #10 on: February 25, 2016, 10:12:25 am »


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