Author Topic: CB crashes in debug mode when trying to evaluate  (Read 5670 times)

Offline ValeV

  • Multiple posting newcomer
  • *
  • Posts: 23
CB crashes in debug mode when trying to evaluate
« on: September 22, 2021, 07:55:53 am »
Hi all,

I created a dummy project to show the error, I think the picture says it all. I made a std::vector object, went to debug mode, tried to evaluate sez.size() in watcher, which crashes the application.

I don't know if this is compiler or CB issue, so excuse me if this is the wrong section/forum.

EDIT: I forgot to mention my environment:
-Windows 10 64bit
-CodeBlocks 20.03
-mingw-w64 -> x86_64-posix-seh-rev0, Built by MinGW-W64 project 8.1.0

« Last Edit: September 22, 2021, 08:26:40 am by ValeV »

Offline AndrewCot

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 678
Re: CB crashes in debug mode when trying to evaluate
« Reply #1 on: September 22, 2021, 09:32:34 am »
I would suggest getting a GDB upgrade as the GDB that ships with mingw that is included with C::B 20.03 is known to be buggy, see https://forums.codeblocks.org/index.php?topic=23958.0 or search for other GDB issues.

I would download the latter GDB x64 non python version from the following github repo:
   https://github.com/ssbssa/gdb/releases

There are other places you can get a GDB upgrade, but you will need to search and find them yourself and they may not work with mingw. The one above will be the quickest option.

Another thing is to change the compiler settings to use gdb.exe instead of gdborig.exe

Offline ValeV

  • Multiple posting newcomer
  • *
  • Posts: 23
Re: CB crashes in debug mode when trying to evaluate
« Reply #2 on: September 22, 2021, 10:39:42 am »
Thank you so much! I installed latest gdb (10.2.90) from the link you provided, so far it works with no problems.

I don't know how to change compiler settings to use gdb.exe instead of gdborig.exe, but problem was solved as mentioned above.

Offline AndrewCot

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 678
Re: CB crashes in debug mode when trying to evaluate
« Reply #3 on: September 22, 2021, 10:43:16 am »
Have a read of the codeblocks manual as it has the info in, see section 5.2.3

Offline ValeV

  • Multiple posting newcomer
  • *
  • Posts: 23
Re: CB crashes in debug mode when trying to evaluate
« Reply #4 on: September 22, 2021, 12:15:44 pm »
Yes, under debugger settings I have gdb.exe in executable path.