Author Topic: Crash when adding a vector to watch  (Read 3285 times)

Offline effemmeffe

  • Multiple posting newcomer
  • *
  • Posts: 18
Crash when adding a vector to watch
« on: January 21, 2016, 09:46:55 am »
C::B 15.12 rev 10596
SDK version 1.29.0
wx2.8.12 (Windows, Unicode) - 32 bit
Windows 10 Pro 64 bit

I define a locale vector in a function:
char buffer_data[SIZE_BUFFER];
where SIZE_BUFFER is 16384

If I try to watch size_buffer C::B freezes and I can't do anything but force it to close with task manager.

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Crash when adding a vector to watch
« Reply #1 on: January 21, 2016, 03:07:30 pm »
the gdb<-> c::b interface is slow, so if you list 16384 this will be a problem.
I don't think this will change soon, but there are some workarounds:
For all you have to disable the "watch locals" options in the debugger settings
1) Don't show all elements: add your "buffer_data" manually, but limit the count
2) Show only the address and look for it in the memory view (this will also be slow, but i think it will be faster than the tree ctrl view)
3) Implement a logging interface in your program and output it through the logging interface (best way for 16384 would be to write them to a file)

greetings

[Edit:] See also this bug: http://sourceforge.net/p/codeblocks/tickets/272/
« Last Edit: January 21, 2016, 07:05:37 pm by BlueHazzard »

Offline effemmeffe

  • Multiple posting newcomer
  • *
  • Posts: 18
Re: Crash when adding a vector to watch
« Reply #2 on: January 22, 2016, 11:38:20 am »
I thought it could be a problem of time, so I waited even a full night, but it doesn't change: C::B freezes and  I can only kill it.
I also tried the memory view workaround, but the result was the same.
I'll try to remove the locals, but I'm not confident it will work.
Is there some other debugger I can use to replace gdb and hope to have more performance?
Thanks.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Crash when adding a vector to watch
« Reply #3 on: January 22, 2016, 08:01:22 pm »
Nope. Hopefully in the future will switch to using the gdb/mi protocol and we will have better performance and also we will support lldb.
(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 effemmeffe

  • Multiple posting newcomer
  • *
  • Posts: 18
Re: Crash when adding a vector to watch
« Reply #4 on: January 22, 2016, 10:26:50 pm »
Ok, thanks.

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Crash when adding a vector to watch
« Reply #5 on: January 22, 2016, 11:27:45 pm »
I'll try to remove the locals, but I'm not confident it will work.
You should do this as first, because else c::b will always evaluate your local size_buffer and so block....

Offline effemmeffe

  • Multiple posting newcomer
  • *
  • Posts: 18
Re: Crash when adding a vector to watch
« Reply #6 on: January 25, 2016, 09:30:19 am »
Removed the locals, it still freezes.
The watch window is shown, it freezes when I click on the watch window title bar to move it around the screen.
Don't know if this helps or if someone care about that, I reported just in case.
I'll use some workaround to get the results I need, thanks.