Recent Posts

Pages: [1] 2 3 4 5 6 ... 10
1
Using Code::Blocks / Re: Codeblocks 25.03 crashes when I use Hex editor
« Last post by blauzahn on Today at 08:07:51 pm »
Maybe some low hanging fruit before trying to "reproduce" UB: cppcheck reports e.g. several uninitialized variables etc. The results are in its attached report.

The HexEditor plugin looks like it predates C++-11. I just gave it a quick glance. I do not use the plugin myself.

2
AFAIK the code for the Hex Editor has not changed between releases. To fix this we need a way to reproduce, random crashes are hard to fix; I have not been able to reproduce the issue in my system.

You can post a ticket, of course.
3
Using Code::Blocks / Re: Codeblocks 25.03 crashes when I use Hex editor
« Last post by AntonyF on Today at 11:06:07 am »
I ran some tests with the portable version of CodeBlocks 20.03 and the Hex Editor works perfectly.

I exported the Hex Editor from version 20.03 and tried to import it into version 25.03, but obviously it didn't work.

I gather that the problem is inherent in version 25.03. Searching the Internet, I saw that other users have the same problem.

Do you know if it is possible to report this problem?

Maybe someone will be able to solve it.

4
Using Code::Blocks / Re: Codeblocks 25.03 crashes when I use Hex editor
« Last post by AntonyF on Yesterday at 11:41:12 pm »
Hi Miguel,
It's not a question of size. The same exe file opens occasionally, and when it works, I can open four or five at the same time without any problems. They are small test programs of varying sizes, but in the range of 60-120 Kbytes.
Then I close and reopen CodeBlocks or restart the PC, and it no longer opens the same files that it used to open without any problems, causing CodeBlocks to crash.
5
I've generalized my version of the *_wx33_64.cbp files to the form used in src/CodeBlocks_wx33_64.cbp where in the project wide compiler options begin with
Code
			<Add option="-Wall" />
<Add option="-m64" />
<Add option="$(#CB_RELEASE_TYPE)" />
with one caveat. I removed the option
Code
			<Add option="$(#CB_CPP_STD)" />
from all the target compiler option lists and moved it into the Project compiler list so that I now use the combination:
Code
			<Add option="-Wall" />
<Add option="-m64" />
<Add option="$(#CB_CPP_STD)" />
<Add option="$(#CB_RELEASE_TYPE)" />
Doing it this way allows one to define CB_CPP_STD as "-std=gnu17 -std=gnu++20". This works when using a variant of CompilerMINGW as it uses the specifications CFlags and CPPFlags in
Code
src\plugins\compilergcc\resources\compilers\options_common_sort.xml
to determine what is inappropriate for C or C++ compilations.

The current lists therein are sufficient for distinguishing where it is
appropriate to use "-std=gnu17" versus "-std=gnu++20".

Nonetheless, these CFlags and CPPFlags specs could use a minor update. Seems both gcc and clang support the new CFlags, but of the as yet future C++ standard, g++ uses std=c++26 -std=gnu++26 where clang++ uses -std=c++2c -std=gnu++2c
Code
diff -r 332d682e3f78 -r ad163b81827c src/plugins/compilergcc/resources/compilers/options_common_sort.xml
--- a/src/plugins/compilergcc/resources/compilers/options_common_sort.xml       Sat Aug 16 07:44:16 2025 -0700
+++ b/src/plugins/compilergcc/resources/compilers/options_common_sort.xml       Sat Aug 16 07:47:40 2025 -0700
@@ -3,10 +3,10 @@
 <CodeBlocks_compiler_options>
     <Sort CFlags="-std=c89 -std=gnu89 -std=c90 -std=gnu90 -std=iso9899:1990 -std=iso9899:1994
                   -std=c99 -std=gnu99 -std=iso9899:1999 -std=c11 -std=gnu11 -std=iso9899:2011
-                  -std=c17 -std=iso9899:2017"/>
+                  -std=c17 -std=gnu17 -std=iso9899:2017 -std=c23 -std=gnu23 -std=c2y -std=gnu2y" />
     <Sort CPPFlags="-std=c++98 -std=gnu++98 -std=c++03 -std=gnu++03 -std=c++11 -std=gnu++11
                     -std=c++14 -std=gnu++14 -std=c++17 -std=gnu++17 -std=c++20 -std=gnu++20
-                    -std=c++23 -std=gnu++23  std=c++26 -std=gnu++26
+                    -std=c++23 -std=gnu++23  std=c++26 -std=gnu++26 -std=c++2c -std=gnu++2c
                     -static-libstdc++ -shared-libstdc++ -fpermissive -fdeduce-init-list -fcheck-new -fstrict-enums
                     -Weffc++ -Wctor-dtor-privacy -Wdelete-non-virtual-dtor -Wliteral-suffix -Wc++11-compat -Wnoexcept
                     -Wnon-virtual-dtor -Wreorder -Wstrict-null-sentinel -Wno-non-template-friend -Wnon-template-friend
6
The C::B wiki only briefly mentions that Visual C++ 2003 - 2010 are still supported, but are no longer available from their original publishers. Are there plans to add support for newer versions?

I have used it with newer MSVC compilers for a long time, currently using MSVC2022.  I don't use the C::B debugger on Windows, instead I launch the MSVC debugger via the Tools menu as shown in the attachment.
7
Using Code::Blocks / Re: Codeblocks 25.03 crashes when I use Hex editor
« Last post by Miguel Gimenez on Yesterday at 06:58:44 pm »
Size of the exe?
8
Using Code::Blocks / Codeblocks 25.03 crashes when I use Hex editor
« Last post by AntonyF on Yesterday at 11:25:03 am »
Hello to all users and administrators, this is my first post.

I have recently started learning C++ and was trying out the new IDE when I noticed that if I try to open an exe file with the internal Hex editor in Codeblocks, 9 times out of 10 it crashes.

I have the same problem on two PCs, a desktop and a laptop, both running Windows 10 2021 LTSC.

Otherwise, it seems to work fine, although my use is very basic, so I can't be sure.

Thanks for your help, and have a nice day.
9
Try it and see; but, C::B likely cannot debug using MSVC debugger.

Tim S.
10
Help / Re: Code::Blocks errors
« Last post by Miguel Gimenez on August 19, 2025, 04:20:50 pm »
Spam reported to moderator.
Pages: [1] 2 3 4 5 6 ... 10