Author Topic: Codeblocks 25.03 crashes when I use Hex editor  (Read 4076 times)

Offline AntonyF

  • Single posting newcomer
  • *
  • Posts: 7
Codeblocks 25.03 crashes when I use Hex editor
« on: August 20, 2025, 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.

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1770
Re: Codeblocks 25.03 crashes when I use Hex editor
« Reply #1 on: August 20, 2025, 06:58:44 pm »
Size of the exe?

Offline AntonyF

  • Single posting newcomer
  • *
  • Posts: 7
Re: Codeblocks 25.03 crashes when I use Hex editor
« Reply #2 on: August 20, 2025, 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.
« Last Edit: August 21, 2025, 10:57:05 am by AntonyF »

Offline AntonyF

  • Single posting newcomer
  • *
  • Posts: 7
Re: Codeblocks 25.03 crashes when I use Hex editor
« Reply #3 on: August 21, 2025, 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.


Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1770
Re: Codeblocks 25.03 crashes when I use Hex editor
« Reply #4 on: August 21, 2025, 03:03:32 pm »
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.

Offline blauzahn

  • Almost regular
  • **
  • Posts: 200
Re: Codeblocks 25.03 crashes when I use Hex editor
« Reply #5 on: August 21, 2025, 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.


Offline AntonyF

  • Single posting newcomer
  • *
  • Posts: 7
Re: Codeblocks 25.03 crashes when I use Hex editor
« Reply #6 on: August 21, 2025, 11:38:37 pm »
Hello Blauzahn, Hello Miguel,

Thank you for your help.

I can add that I have detected the same issue on a third PC.

So, in total, there are three PCs with the same issue. It should be noted that the three PCs are completely different from each other in terms of hardware.

All PCs have the following things in common:

Operating system:

Windows 10 LTSC 2021

Antivirus:

Eset Internet Security

VPN:

Proton VPN

My first suspicion fell on the antivirus, but I have not yet had confirmation.

As soon as I have some free time, I will run tests on other operating systems, as well as other cross-tests.

I will keep you updated and thank you for everything.


Offline Wkerry

  • Multiple posting newcomer
  • *
  • Posts: 105
Re: Codeblocks 25.03 crashes when I use Hex editor
« Reply #7 on: Today at 05:24:14 am »
This is for 25.03 64bit installer codeblocks-25.03-setup.exe (release #2):

If I load cb_console_runner.exe via the "File->Open with hex editor" it works.
If I load codeblocks.exe via the "File->Open with hex editor"   it crashes and burns.


Offline stahta01

  • Lives here!
  • ****
  • Posts: 7799
    • My Best Post
Re: Codeblocks 25.03 crashes when I use Hex editor
« Reply #8 on: Today at 06:59:55 am »
So, a locked file causes something like the OP issue. The codeblocks exe is likely a locked file.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline AntonyF

  • Single posting newcomer
  • *
  • Posts: 7
Re: Codeblocks 25.03 crashes when I use Hex editor
« Reply #9 on: Today at 11:28:34 am »
This is for 25.03 64bit installer codeblocks-25.03-setup.exe (release #2):

If I load cb_console_runner.exe via the "File->Open with hex editor" it works.
If I load codeblocks.exe via the "File->Open with hex editor"   it crashes and burns.

I would like to replicate the test you did on my PCs using:

cb_console_runner.exe

But I don't understand how you loaded the Hex Editor.
Could you kindly post how to do it?

Thank you in advance for your help.


Offline stahta01

  • Lives here!
  • ****
  • Posts: 7799
    • My Best Post
Re: Codeblocks 25.03 crashes when I use Hex editor
« Reply #10 on: Today at 03:11:40 pm »
He is saying that a problem happened using HexEditor on codeblocks.exe; I saw the problem 2 out of 3 times; the problem took about 1 to 2 minutes to crash

codeblocks.RPT

Code
Error occurred on Saturday, August 23, 2025 at 09:09:07.

codeblocks.exe caused an Access Violation at location 00007FFE3A97C209 in module libHexEditor.dll Reading from location 0000000000000000.

AddrPC           Params
00007FFE3A97C209 000001AFC5F26BA0 000001AFCD2B88A0 0000000000000200  libHexEditor.dll!HexEditPanel::ClampCursorToVisibleArea+0x59  [/usr/src/debug/mingw-w64-codeblocks_dm/build-UCRT64/src/plugins/contrib/HexEditor/../../../../../codeblocks-git/src/plugins/contrib/HexEditor/HexEditPanel.cpp @ 1101]
00007FFE3A97ECB0 0000000000BE01FE 0000000000000200 0000000000000000  libHexEditor.dll!HexEditPanel::OnContentMouseWheel+0x44  [/usr/src/debug/mingw-w64-codeblocks_dm/build-UCRT64/src/plugins/contrib/HexEditor/../../../../../codeblocks-git/src/plugins/contrib/HexEditor/HexEditPanel.cpp @ 759]
00007FFE77F83719 0000000001AC075A 00000000000A0476 0000000001AC075A  wxbase332u_gcc_custom.dll!wxAppConsoleBase::CallEventHandler+0xb9
00007FFE780B22B8 000000622EFFF3D0 00007FFEA238C34F 000000622EFFF450  wxbase332u_gcc_custom.dll!wxEvtHandler::ProcessEventIfMatchesId+0x78
00007FFE780B35BD 0000000000000001 000001AFCCEDF100 000000622EFFF3D8  wxbase332u_gcc_custom.dll!wxEvtHandler::SearchDynamicEventTable+0xad
00007FFE780B3A3B 000000622EFFF450 00007FFE77321E25 000001AC0000075A  wxbase332u_gcc_custom.dll!wxEvtHandler::TryHereOnly+0x2b
00007FFE780B3AEA 000000BE000001FE 00000000000000BE 00000000000001FE  wxbase332u_gcc_custom.dll!wxEvtHandler::ProcessEventLocally+0x2a
00007FFE780B3B91 00000000000001FE 000001AC0000075A 0000000000780000  wxbase332u_gcc_custom.dll!wxEvtHandler::ProcessEvent+0x61
00007FFE780B287A 0000000000780000 000001AFCCEDF100 000000BE000001FE  wxbase332u_gcc_custom.dll!wxEvtHandler::SafelyProcessEvent+0x3a
00007FFE773282D7 0000000002000001 00000000000205DE 00007FFE00000000  wxmsw332u_core_gcc_custom.dll!wxWindow::HandleMouseWheel+0xc7
00007FFE7732CDFF 00000000000A0476 00007FFE77324EF8 0000006200000000  wxmsw332u_core_gcc_custom.dll!wxWindow::MSWHandleMessage+0x72f
00007FFE7732E0BE 0000075A00000001 00007FFE77E8F8DE 0000000000000001  wxmsw332u_core_gcc_custom.dll!wxWindow::MSWWindowProc+0x3e
00007FFEA238EF5C 0000000000000000 00007FFE77324EE0 000000622EDC3800  USER32.dll!CallWindowProcW+0x60c
00007FFEA238E684 00007FFE77324EE0 0000000000000000 000000622EFFFB20  USER32.dll!DispatchMessageW+0x4a4
00007FFEA238BC76 0000000000000009 000001AFC5A94CD0 0000000000000000  USER32.dll!IsDialogMessageW+0x326
00007FFE77323F4B 000000622EFFFB20 00007FFE7810DEA0 000001AFCCF0CDE0  wxmsw332u_core_gcc_custom.dll!wxWindow::MSWSafeIsDialogMessage+0x3b
00007FFE77348288 0000000000000000 0000000000000000 0000000000000000  wxmsw332u_core_gcc_custom.dll!wxGUIEventLoop::PreProcessMessage+0xd8
00007FFE773482F6 000001AFCCD882C0 0000000000000000 00007FFE77907240  wxmsw332u_core_gcc_custom.dll!wxGUIEventLoop::ProcessMessage+0x26
00007FFE773480D6 0000000000000000 0000000000010000 000001AFCCF0CDC0  wxmsw332u_core_gcc_custom.dll!wxGUIEventLoop::Dispatch+0xb6
00007FFE77FB3291 00007FF62734C160 0000000000000000 000001AFCC92E900  wxbase332u_gcc_custom.dll!wxEventLoopManual::ProcessEvents+0x31
00007FFE77FB334E 000001AFC5A20580 00007FFEA119FDE6 0000000000000000  wxbase332u_gcc_custom.dll!wxEventLoopManual::DoRunLoop+0x8e
00007FFE77FB3448 0000000000000000 00007FFE772CB88C 0000000000000000  wxbase332u_gcc_custom.dll!wxEventLoopManual::DoRun+0x38
00007FFE77FB3098 000001AFCCF0CDC0 00007FF627321B01 00007FFEA385C9D0  wxbase332u_gcc_custom.dll!wxEventLoopBase::Run+0x58
00007FFE77F84506 000001AFC5A20580 0000000000000001 000001AFC5A94CD0  wxbase332u_gcc_custom.dll!wxAppConsoleBase::MainLoop+0x66
00007FF627278A82 00007FF6273AB6B8 0000000000000001 000001AFC5A94CD0  codeblocks.exe!CodeBlocksApp::OnRun+0x16  [/usr/src/debug/mingw-w64-codeblocks_dm/build-UCRT64/src/src/../../../codeblocks-git/src/src/app.cpp @ 923]
00007FFE77FF46F0 0000000000000430 0000000000000024 0000000000000001  wxbase332u_gcc_custom.dll!wxEntryReal+0xc0
00007FF627272101 00007FFEA1281270 00007FF627313AF0 0000000000000002  codeblocks.exe!WinMain+0xa  [/usr/src/debug/mingw-w64-codeblocks_dm/build-UCRT64/src/src/../../../codeblocks-git/src/src/app.cpp @ 334]
00007FF6272710C9 0000000000000000 0000000000000000 0000000000000000  codeblocks.exe!__tmainCRTStartup+0xb9  [D:/W/B/src/mingw-w64/mingw-w64-crt/crt/crtexe.c @ 236]
00007FF6272713F6 0000000000000000 0000000000000000 0000000000000000  codeblocks.exe!WinMainCRTStartup+0x16  [D:/W/B/src/mingw-w64/mingw-w64-crt/crt/crtexe.c @ 91]
00007FFEA3837374 0000000000000000 0000000000000000 0000000000000000  KERNEL32.DLL!BaseThreadInitThunk+0x14
00007FFEA399CC91 0000000000000000 0000000000000000 0000000000000000  ntdll.dll!RtlUserThreadStart+0x21
C Programmer working to learn more about C++ and Git.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1770
Re: Codeblocks 25.03 crashes when I use Hex editor
« Reply #11 on: Today at 03:35:13 pm »
Other user attached a RPT indicating a division by zero, looks like there are more than one issue. I will try to fix the issues posted by blauzahn.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7799
    • My Best Post
Re: Codeblocks 25.03 crashes when I use Hex editor
« Reply #12 on: Today at 03:55:11 pm »
Other user attached a RPT indicating a division by zero, looks like there are more than one issue. I will try to fix the issues posted by blauzahn.

Sounds good; because opening codeblocks.exe is something I consider not likely to be done.
C Programmer working to learn more about C++ and Git.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline AntonyF

  • Single posting newcomer
  • *
  • Posts: 7
Re: Codeblocks 25.03 crashes when I use Hex editor
« Reply #13 on: Today at 04:05:11 pm »
He is saying that a problem happened using HexEditor on codeblocks.exe; I saw the problem 2 out of 3 times; the problem took about 1 to 2 minutes to crash

Now I understand, I thought you had used cb_console_runner.exe to launch hex monitor on another .exe file.
Sorry  ;D

Offline AntonyF

  • Single posting newcomer
  • *
  • Posts: 7
Re: Codeblocks 25.03 crashes when I use Hex editor
« Reply #14 on: Today at 04:18:51 pm »
Other user attached a RPT indicating a division by zero, looks like there are more than one issue. I will try to fix the issues posted by blauzahn.

I am glad that an error has been identified so that it can be corrected. I hope I have been of some help in my own small way.

I would like to add that I have performed various tests on different Windows systems

Win 10 Home ( latest version )
Win 11 Home ( latest version )
Win 10 LTSC 2021

with basic installation and without antivirus or other programs installed, only Windows and CodeBlocks, and the problem always occurs on the following 64-bit versions:

codeblocks-25.03mingw-setup.exe
codeblocks-25.03mingw-nosetup.zip

I hope this helps you in some way.

Thank you all for your interest and help.