Code::Blocks Forums

User forums => Help => Topic started by: Bruise_Vein on April 04, 2020, 09:48:57 pm

Title: clicking on debugger crashes codeblocks
Post by: Bruise_Vein on April 04, 2020, 09:48:57 pm
so I uninstalled the last codeblocks version (17.12) and installed the new version (20.03 with the combined MinGW installer).    now when I use codeblocks it runs well and I am able to build and run programs until I hit the 'Debug' button. after hitting debug it displays the following in the debugger log but doesn't start the console or running the program.

DEBUGGER LOG:

Active debugger config: GDB/CDB debugger:Default
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: D:\C++\Code blocks projects\test\
Adding source dir: D:\C++\Code blocks projects\test\
Adding file: D:\C++\Code blocks projects\test\bin\Debug\test.exe
Changing directory to: "D:/C++/Code blocks projects/test/."
Set variable: PATH=.;C:\Program Files\CodeBlocks\MinGW\bin;C:\Program Files\CodeBlocks\MinGW;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client;C:\Program Files\Intel\iCLS Client;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\SourceGear\Common\DiffMerge;C:\Users\Lenovo\AppData\Local\Microsoft\WindowsApps
Starting debugger: C:\Program Files (x86)\CodeBlocks\MinGW\bin\gdb32.exe -nx -fullname -quiet  -args "D:/C++/Code blocks projects/test/bin/Debug/test.exe"
failed




After this message even build and run stops working.  they start working after restarting codeblocks but the same happens after pressing debug.

I tried reinstalling codeblocks but the same happens. Also, I checked and my pc unfortunately doesn't have a restore point set.  PLZ HELP
Title: Re: clicking on debugger crashes codeblocks
Post by: oBFusCATed on April 04, 2020, 09:58:20 pm
Which version are you using exactly (32bit/64bit)?
Can you enable full logging in the debugger settings and then post the log?
Does it work again if you reinstall 17.12?
What OS are you using?
Title: Re: clicking on debugger crashes codeblocks
Post by: Bruise_Vein on April 05, 2020, 12:05:55 am
I m using 64 bits version
OS: Windows
to reinstall 17.12 do I uninstall the 20.03 version or do I just install it in a different directory

FULL DEBUG LOG :

Active debugger config: GDB/CDB debugger:Default
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: D:\C++\Code blocks projects\test\
Adding source dir: D:\C++\Code blocks projects\test\
Adding file: D:\C++\Code blocks projects\test\bin\Debug\test.exe
Changing directory to: "D:/C++/Code blocks projects/test/."
Set variable: PATH=.;C:\Program Files\CodeBlocks\MinGW\bin;C:\Program Files\CodeBlocks\MinGW;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client;C:\Program Files\Intel\iCLS Client;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\SourceGear\Common\DiffMerge;C:\Users\Lenovo\AppData\Local\Microsoft\WindowsApps

[debug]Command-line: C:\Program Files (x86)\CodeBlocks\MinGW\bin\gdb32.exe -nx -fullname -quiet  -args "D:/C++/Code blocks projects/test/bin/Debug/test.exe"
[debug]Working dir : D:\C++\Code blocks projects\test

Starting debugger: C:\Program Files (x86)\CodeBlocks\MinGW\bin\gdb32.exe -nx -fullname -quiet  -args "D:/C++/Code blocks projects/test/bin/Debug/test.exe"
failed
Title: Re: clicking on debugger crashes codeblocks
Post by: oBFusCATed on April 05, 2020, 12:28:50 am
This is not the full log. You have to enable it in the Settings -> Debugger -> Common -> Full (debug) log.
I'm not sure. You can uninstall first to be on the safe side.
Keep in mind that using a 64bit codeblocks to debug 32bit executables doesn't work well at the moment. Or using 32bit gdb to debug 64bit executables.
Title: Re: clicking on debugger crashes codeblocks
Post by: Bruise_Vein on April 05, 2020, 12:33:17 am
yes, I used the same steps to enable the full debug log.



and also a friend of mine suggested me to clear the codeblocks directory in C:\Users\Your user name\AppData\Roaming\CodeBlocks.   
 after doing this codeblocks doesn't crash but clicking on the debugger still does nothing. and here is the new debug log

NEW FULL DEBUG LOG:

Active debugger config: GDB/CDB debugger:Default
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: D:\C++\Code blocks projects\test\
Adding source dir: D:\C++\Code blocks projects\test\
Adding file: D:\C++\Code blocks projects\test\bin\Debug\test.exe
Changing directory to: "D:/C++/Code blocks projects/test/."
Set variable: PATH=.;C:\Program Files\CodeBlocks\MinGW\bin;C:\Program Files\CodeBlocks\MinGW;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client;C:\Program Files\Intel\iCLS Client;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\SourceGear\Common\DiffMerge;C:\Users\Lenovo\AppData\Local\Microsoft\WindowsApps

[debug]Command-line: C:\Program Files\CodeBlocks\MINGW\bin\gdb.exe -nx -fullname -quiet  -args "D:/C++/Code blocks projects/test/bin/Debug/test.exe"
[debug]Working dir : D:\C++\Code blocks projects\test

Starting debugger: C:\Program Files\CodeBlocks\MINGW\bin\gdb.exe -nx -fullname -quiet  -args "D:/C++/Code blocks projects/test/bin/Debug/test.exe"
done

[debug]> set prompt >>>>>>cb_gdb:

Setting breakpoints

[debug]D:/C++/Code: No such file or directory.
[debug](gdb) >>>>>>cb_gdb:
[debug]> show version
[debug]GNU gdb (GDB) 8.1
[debug]Copyright (C) 2018 Free Software Foundation, Inc.
[debug]License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
[debug]This is free software: you are free to change and redistribute it.
[debug]There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
[debug]and "show warranty" for details.
[debug]This GDB was configured as "x86_64-w64-mingw32".
[debug]Type "show configuration" for configuration details.
[debug]For bug reporting instructions, please see:
[debug]<http://www.gnu.org/software/gdb/bugs/>.
[debug]Find the GDB manual and other documentation resources online at:
[debug]<http://www.gnu.org/software/gdb/documentation/>.
[debug]For help, type "help".
[debug]Type "apropos word" to search for commands related to "word".
[debug]>>>>>>cb_gdb:
[debug]> set confirm off

Debugger name and version: GNU gdb (GDB) 8.1

[debug]>>>>>>cb_gdb:
[debug]> set width 0
[debug]>>>>>>cb_gdb:
[debug]> set height 0
[debug]>>>>>>cb_gdb:
[debug]> set breakpoint pending on
[debug]>>>>>>cb_gdb:
[debug]> set print asm-demangle on
[debug]>>>>>>cb_gdb:
[debug]> set unwindonsignal on
[debug]>>>>>>cb_gdb:
[debug]> set print elements 200
[debug]>>>>>>cb_gdb:
[debug]> set new-console on
[debug]>>>>>>cb_gdb:
[debug]> set disassembly-flavor att
[debug]>>>>>>cb_gdb:
[debug]> catch throw
[debug]Catchpoint 1 (throw)
[debug]>>>>>>cb_gdb:
[debug]> directory "D:/C++/Code blocks projects/test/"
[debug]Source directories searched: D:/C++/Code blocks projects/test;$cdir;$cwd
[debug]>>>>>>cb_gdb:
[debug]> break "D:/C++/Code blocks projects/test/main.cpp:19"
[debug]No symbol table is loaded.  Use the "file" command.
[debug]Breakpoint 2 ("D:/C++/Code blocks projects/test/main.cpp:19") pending.
[debug]>>>>>>cb_gdb:
[debug]> run
[debug]No executable specified, use `target exec'.
[debug]Starting program:  blocks projects/test/bin/Debug/test.exe
[debug]>>>>>>cb_gdb:

Starting the debuggee failed: No executable specified, use `target exec'.

[debug]> quit

Debugger finished with status 0
Title: Re: clicking on debugger crashes codeblocks
Post by: stahta01 on April 05, 2020, 12:50:06 am
Code
D:\C++\Code blocks projects\test\

A guess from a debugger newbie, I suggest you use only ASCII and no spaces in your project path!

Tim S.
Title: Re: clicking on debugger crashes codeblocks
Post by: Bruise_Vein on April 05, 2020, 01:02:56 am
Code
D:\C++\Code blocks projects\test\

A guess from a debugger newbie, I suggest you use only ASCII and no spaces in your project path!

Tim S.


it worked, I just removed spaces from my directory name and now it works like my older version of codeblocks.
I m just beginner, 2 months into c++ now and I don't know what happened.

Can u plz explain?
Title: Re: clicking on debugger crashes codeblocks
Post by: oBFusCATed on April 05, 2020, 01:06:26 am
We don't handle spaces well. I'm not sure whose to blame, codeblocks or the tools we use (gdb, gcc). I have to do an investigation, but I cannot find the time. Especially when I don't use windows often :)
Title: Re: clicking on debugger crashes codeblocks
Post by: Bruise_Vein on April 05, 2020, 08:25:01 am
Thank you appreciate the help