Author Topic: CodeBlocks crashed when opening source file  (Read 8771 times)

Offline Grit Clef

  • Multiple posting newcomer
  • *
  • Posts: 107
  • Where there is a will, there is a way.
CodeBlocks crashed when opening source file
« on: August 31, 2023, 12:25:14 pm »
To CB developer:
       I'm using CB 13311. Today I created a wxWidgets Project with CB's dialog-based dafault code. I modified some of the static text, and saved that .wxs file. After that, I opened the xxxMiain.cpp, then my computer became very slow, and, CB crashed seconds later. The .rpt file is attached, and I hope it can give you some information to improve this IDE.
-Windows 7, 32-bit
-CodeBlocks r13542, gcc 14.2.0, debug version

Online stahta01

  • Lives here!
  • ****
  • Posts: 7678
    • My Best Post
Re: CodeBlocks crashed when opening source file
« Reply #1 on: August 31, 2023, 01:42:56 pm »
Most recent crash from OP rar file

Summary of unusual things in crash
Access Violation in module clangd_client.dll
libmcfgthread-1.dll   1.5.0.0
Windows 6.1.7601.24384

Code
Error occurred on Thursday, August 31, 2023 at 18:12:10.

codeblocks.exe caused an Access Violation at location 5792B58C in module clangd_client.dll Reading from location 20202030.

Registers:
eax=20202030 ebx=06407158 ecx=20202030 edx=0c93f270 esi=063f7b38 edi=77877250
eip=5792b58c esp=0c93f110 ebp=0c93f338 iopl=0         nv up ei pl nz na pe nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00010202

AddrPC   Params
5792B58C 02231D70 064148C8 064071E0  clangd_client.dll!0x1b58c
57929D2E 02231D70 064148C8 FFFFFFFF  clangd_client.dll!0x19d2e
5792A6C6 02231D70 064148C8 57ACFC52  clangd_client.dll!0x1a6c6
57927D12 00000000 00000000 00000000  clangd_client.dll!0x17d12
57926E0E 00000021 063F7B30 00000000  clangd_client.dll!0x16e0e
50280F84 063F7B30 063F1E20 06325148  wxmsw32u_gcc_custom.dll!wxThreadInternal::DoThreadStart+0x5d4
50281023 06325148 00000000 00000000  wxmsw32u_gcc_custom.dll!wxThreadInternal::WinThreadStart+0x43
7762A53A 063F7B30 774680E7 00000000  msvcrt.dll!__getptd_noexit+0x62
77631287 0C93FBA4 7727EF6C 06325148  msvcrt.dll!_callthreadstartex+0x1b
77631328 06325148 0C93FBE4 77893618  msvcrt.dll!_threadstartex+0x5f
7727EF6C 06325148 7B58C19E 00000000  kernel32.dll!@BaseThreadInitThunk@12+0xe
77893618 776312E5 06325148 00000000  ntdll.dll!___RtlUserThreadStart@8+0x23
778935EB 776312E5 06325148 00000000  ntdll.dll!__RtlUserThreadStart@8+0x1b

01250000-014CA000 codeblocks.exe 20.3.0.0
77830000-77972000 ntdll.dll    6.1.7601.24384
77230000-77305000 kernel32.dll 6.1.7601.24384
75A20000-75A6B000 KERNELBASE.dll 6.1.7601.24384
51510000-51BD1000 codeblocks.dll
50160000-51504000 wxmsw32u_gcc_custom.dll 3.2.2.1
760B0000-76151000 ADVAPI32.dll 6.1.7601.24384
77620000-776CC000 msvcrt.dll  7.0.7600.16385
77A20000-77A39000 sechost.dll 6.1.7600.16385
762D0000-76372000 RPCRT4.dll  6.1.7601.24384
75110000-752AE000 COMCTL32.dll 6.10.7601.17514
76230000-7627E000 GDI32.dll    6.1.7601.17514
76160000-76229000 USER32.dll  6.1.7601.17514
77980000-7798A000 LPK.dll      6.1.7600.16385
76010000-760AD000 USP10.dll    1.626.7601.17514
75B40000-75B97000 SHLWAPI.dll 6.1.7601.17514
76380000-763FB000 COMDLG32.DLL 6.1.7601.17514
765E0000-7722A000 SHELL32.dll 6.1.7601.17514
779F0000-77A0F000 IMM32.DLL    6.1.7601.17514
77310000-773DC000 MSCTF.dll    6.1.7600.16385
776D0000-7782C000 ole32.dll    6.1.7601.17514
738A0000-738DC000 OLEACC.dll  7.0.0.0
75DE0000-75E6F000 OLEAUT32.dll 6.1.7601.17514
74190000-741D0000 UxTheme.dll 6.1.7600.16385
74870000-74879000 VERSION.dll 6.1.7600.16385
732A0000-732D2000 WINMM.DLL    6.1.7601.17514
74810000-74861000 WINSPOOL.DRV 6.1.7601.17514
77A40000-77A75000 WS2_32.dll  6.1.7601.17514
762B0000-762B6000 NSI.dll      6.1.7600.16385
5FA90000-5FB57000 libgcc_s_dw2-1.dll
70CF0000-70CFE000 libmcfgthread-1.dll 1.5.0.0
58F00000-59159000 libstdc++-6.dll
662F0000-6633B000 exchndl.dll 0.9.11.0
5F9B0000-5FA82000 mgwhelp.dll 0.9.11.0
59230000-593C0000 dbghelp.dll 10.0.18362.1
68110000-68114000 api-ms-win-crt-string-l1-1-0.dll 10.0.10240.16390
70480000-7055C000 ucrtbase.DLL 10.0.10240.16390
68C30000-68C33000 api-ms-win-core-timezone-l1-1-0.dll 10.0.10240.16390
68C20000-68C23000 api-ms-win-core-file-l2-1-0.dll 10.0.10240.16390
68B40000-68B43000 api-ms-win-core-localization-l1-2-0.dll 10.0.10240.16390
6C9E0000-6C9E3000 api-ms-win-core-synch-l1-2-0.dll 10.0.10240.16390
68B00000-68B03000 api-ms-win-core-processthreads-l1-1-1.dll 10.0.10240.16390
682F0000-682F3000 api-ms-win-core-file-l1-2-0.dll 10.0.10240.16390
68090000-68093000 api-ms-win-crt-time-l1-1-0.dll 10.0.10240.16390
680C0000-680C3000 api-ms-win-crt-locale-l1-1-0.dll 10.0.10240.16390
68C40000-68C44000 api-ms-win-crt-runtime-l1-1-0.dll 10.0.10240.16390
6CAC0000-6CAD0000 api-ms-win-crt-private-l1-1-0.dll 10.0.10240.16390
68CC0000-68CE4000 dbgcore.DLL 10.0.18362.1
6C9D0000-6C9D5000 SHFOLDER.DLL 6.1.7600.16385
756B0000-756FC000 apphelp.dll 6.1.7601.17514
632F0000-6337D000 AcLayers.DLL 6.1.7601.17514
75690000-756AB000 SspiCli.dll 6.1.7601.24384
75840000-75857000 USERENV.dll 6.1.7601.17514
75810000-7581B000 profapi.dll 6.1.7600.16385
6F1F0000-6F202000 MPR.dll      6.1.7600.16385
75700000-7570C000 CRYPTBASE.dll 6.1.7601.24384
74FD0000-74FE7000 CRYPTSP.dll 6.1.7601.24382
74D00000-74D3B000 rsaenh.dll  6.1.7600.16385
73E60000-73E73000 dwmapi.dll  6.1.7600.16385
757A0000-757AE000 RpcRtRemote.dll 6.1.7601.17514
76550000-765D3000 CLBCatQ.DLL 2001.12.8530.16385
73B50000-73C80000 WindowsCodecs.dll 6.2.9200.16492
6CE10000-6D007000 YunShellExtV1.dll 7.27.0.5
741D0000-742C5000 PROPSYS.dll 7.0.7601.17514
74000000-74190000 gdiplus.dll 6.1.7601.17514
6C580000-6C5B1000 EhStorShell.dll 6.1.7600.16385
75E70000-7600D000 SETUPAPI.dll 6.1.7601.17514
75B00000-75B27000 CFGMGR32.dll 6.1.7601.17514
75870000-75882000 DEVOBJ.dll  6.1.7600.16385
6C510000-6C57A000 cscui.dll    6.1.7601.17514
6C500000-6C509000 CSCDLL.dll  6.1.7601.17514
6C4F0000-6C4FB000 CSCAPI.dll  6.1.7601.17514
6C480000-6C4F0000 ntshrui.dll 6.1.7601.17514
75600000-75619000 srvcli.dll  6.1.7601.17514
73680000-7368A000 slc.dll      6.1.7600.16385
6C470000-6C476000 IconCodecService.dll 6.1.7600.16385
73A90000-73B24000 msftedit.DLL 5.41.21.2510
65160000-65194000 abbreviations.dll
5F040000-5F0C9000 astyle.dll
65DF0000-65E11000 autosave.dll
65DC0000-65DED000 classwizard.dll
58BE0000-58D6D000 codecompletion.dll
5B9C0000-5BAC5000 compiler.dll
5C6E0000-5C79D000 debugger.dll
65130000-6515C000 defaultmimehandler.dll
63E00000-63E33000 OccurrencesHighlighting.dll
64450000-64477000 openfileslist.dll
5FC50000-5FC99000 projectsimporter.dll
5B3C0000-5B434000 scriptedwizard.dll
5F960000-5F9A7000 todo.dll
67AC0000-67AD3000 xpmanifest.dll
5B460000-5B4BC000 AutoVersioning.dll
5A150000-5A1C2000 BrowseTracker.dll
5F000000-5F040000 byogames.dll
64420000-64442000 cb_koders.dll
673C0000-673D3000 Cccc.dll
57910000-57BC9000 clangd_client.dll
5ADC0000-5AE2E000 codesnippets.dll
631D0000-631FB000 codestat.dll
64A80000-64A93000 copystrings.dll
5FCC0000-5FCEF000 CppCheck.dll
5FC20000-5FC50000 Cscope.dll
5B260000-5B2BC000 devpakupdater.dll
5C6A0000-5C6D8000 DragScroll.dll
5ED10000-5ED35000 EditorConfig.dll
5ECE0000-5ED10000 EditorTweaks.dll
5AD40000-5AD7A000 envvars.dll
57480000-5769A000 Exporter.dll
58E70000-58EF9000 headerfixup.dll
58DD0000-58E6B000 help_plugin.dll
5AE70000-5AE9B000 IncrementalSearch.dll
58B40000-58BD1000 keybinder.dll
5AE40000-5AE65000 MouseSap.dll
5ABC0000-5ABEF000 Profiler.dll
5A110000-5A14F000 ProjectOptionsManipulator.dll
59BB0000-59C0E000 RegExTestbed.dll
5AB90000-5ABBA000 ReopenEditor.dll
63DE0000-63DF2000 rndgen.dll
632D0000-632E6000 SmartIndentCpp.dll
5FCA0000-5FCB2000 SmartIndentFortran.dll
5B440000-5B452000 SmartIndentHDL.dll
6B3F0000-6B3FF000 SmartIndentLua.dll
6ACC0000-6ACCF000 SmartIndentPascal.dll
6A100000-6A10F000 SmartIndentPython.dll
69E50000-69E60000 SmartIndentXML.dll
58940000-58A3B000 SpellChecker.dll
59F20000-59F49000 SymTab.dll
58AA0000-58B32000 ThreadSearch.dll
59170000-591C4000 ToolsPlus.dll
69C00000-69C0E000 wxsmith.dll
77CD0000-77FFA000 wxsmithlib.dll
58860000-588CB000 wxSmithAui.dll
57830000-57905000 wxSmithContribItems.dll
584A0000-58504000 wxchartctrl.dll
59530000-59570000 wxcustombutton.dll
58380000-58402000 wxflatnotebook.dll
59EF0000-59F12000 wximagepanel.dll
58D70000-58DCE000 wxkwic.dll
58430000-58493000 wxled.dll
58A40000-58A9B000 wxmathplot.dll
59200000-59230000 wxspeedbutton.dll
57400000-57471000 DoxyBlocks.dll 1.7.663.8397
50040000-500C3000 FileManager.dll
77B70000-77C15000 HexEditor.dll
77C40000-77CC6000 lib_finder.dll
63630000-6370B000 ProjectExporter.dll 0.6.0.0
6BF90000-6BFE8000 tiptsf.dll  6.1.7600.16385
73800000-73805000 msimg32.dll 6.1.7600.16385
74780000-747A1000 ntmarta.dll 6.1.7600.16385
75D90000-75DD5000 WLDAP32.dll 6.1.7601.17514
6ECA0000-6EE0F000 explorerframe.dll 6.1.7601.17514
73FD0000-73FFF000 DUser.dll    6.1.7600.16385
73F10000-73FC2000 DUI70.dll    6.1.7600.16385
6BFF0000-6C021000 msls31.dll  3.10.349.0
73E30000-73E5F000 xmllite.dll 1.3.1000.0
6D3B0000-6D40C000 StructuredQuery.dll 7.0.7601.17514
75670000-75678000 Secur32.dll 6.1.7601.24384
6C380000-6C3CE000 actxprxy.dll 6.1.7601.17514
66290000-662D9000 ieproxy.dll 11.0.9600.17840
75890000-75894000 api-ms-win-downlevel-shlwapi-l1-1-0.dll 6.2.9200.16492
696B0000-696B4000 api-ms-win-downlevel-shlwapi-l2-1-0.dll 6.2.9200.16492
75B30000-75B35000 api-ms-win-downlevel-advapi32-l1-1-0.dll 6.2.9200.16492
70E70000-70E86000 thumbcache.dll 6.1.7601.17514
77A10000-77A15000 PSAPI.DLL    6.1.7600.16385
6A130000-6A1D0000 SearchFolder.dll 6.1.7601.17514
6C350000-6C37E000 SHDOCVW.dll 6.1.7601.17514
664C0000-67102000 ieframe.DLL 11.0.9600.17840
75A00000-75A04000 api-ms-win-downlevel-user32-l1-1-0.dll 6.2.9200.16492
67AE0000-67AE4000 api-ms-win-downlevel-shell32-l1-1-0.dll 6.2.9200.16492
75A10000-75A14000 api-ms-win-downlevel-version-l1-1-0.dll 6.2.9200.16492
75830000-75833000 api-ms-win-downlevel-normaliz-l1-1-0.dll 6.2.9200.16492
762C0000-762C3000 normaliz.DLL 6.1.7600.16385
773E0000-77612000 iertutil.dll 11.0.9600.17840
74E40000-74E48000 drprov.dll  6.1.7600.16385
75770000-75799000 WINSTA.dll  6.1.7601.17514
70ED0000-70EE4000 ntlanman.dll 6.1.7601.17514
70EB0000-70EC7000 davclnt.dll 6.1.7601.17514
73980000-73988000 DAVHLPR.dll 6.1.7600.16385
6BF80000-6BF89000 LINKINFO.dll 6.1.7600.16385
74CE0000-74CEF000 wkscli.dll  6.1.7601.17514
74C00000-74C09000 netutils.dll 6.1.7601.17514
6B510000-6B6A8000 NetworkExplorer.dll 6.1.7601.17514
6CB10000-6CB99000 PortableDeviceApi.dll 6.1.7601.17514
758A0000-758CF000 WINTRUST.dll 6.1.7601.24382
758D0000-759F2000 CRYPT32.dll 6.1.7601.24382
75820000-7582C000 MSASN1.dll  6.1.7601.17514
6FDE0000-6FE0B000 PortableDeviceTypes.dll 6.1.7600.16385
70280000-702A2000 EhStorAPI.dll 6.1.7601.17514
70680000-7068C000 MSOXEV.DLL  12.0.4518.1014
75BA0000-75D84000 WININET.dll 11.0.9600.17840
76400000-7654A000 urlmon.dll  11.0.9600.17840
75860000-75864000 api-ms-win-downlevel-ole32-l1-1-0.dll 6.2.9200.16492
68300000-6839B000 MSVCR80.dll 8.0.50727.4940
69380000-6940C000 UIAutomationCore.dll 7.0.0.0
75710000-7576F000 SXS.DLL      6.1.7601.17514
6C2B0000-6C2C9000 fms.dll      1.1.6000.16384
6A850000-6A8B7000 symsrv.dll  10.0.18362.1
75330000-75347000 bcrypt.dll  6.1.7601.24384
71780000-71784000 api-ms-win-downlevel-advapi32-l2-1-0.dll 6.2.9200.16492
74F90000-74FCC000 mswsock.dll 6.1.7601.18254
72320000-7233C000 IPHLPAPI.DLL 6.1.7601.17514
72300000-72307000 WINNSI.DLL  6.1.7600.16385
74F80000-74F86000 wship6.dll  6.1.7600.16385
74DF0000-74E34000 DNSAPI.dll  6.1.7601.17514
72260000-7226D000 dhcpcsvc6.DLL 6.1.7600.16385
72210000-72222000 dhcpcsvc.DLL 6.1.7600.16385
6E590000-6E5EA000 netprofm.dll 6.1.7600.16385
73750000-73760000 nlaapi.dll  6.1.7601.17514
74760000-74765000 wshtcpip.dll 6.1.7600.16385
6F3F0000-6F3F6000 rasadhlp.dll 6.1.7600.16385
6CD30000-6CD38000 npmproxy.dll 6.1.7600.16385
721D0000-72208000 fwpuclnt.dll 6.1.7601.17514
74C40000-74C48000 credssp.dll 6.1.7601.24384
74D70000-74DB1000 schannel.DLL 6.1.7601.24384
75350000-75389000 ncrypt.dll  6.1.7601.24384
750A0000-750DD000 bcryptprimitives.dll 6.1.7601.23451
748C0000-748D6000 GPAPI.dll    6.1.7600.16385
71550000-7156D000 cryptnet.dll 6.1.7601.24382
70930000-70936000 SensApi.dll 6.1.7600.16385
6F270000-6F2C8000 WINHTTP.dll 6.1.7601.17514
6F220000-6F26F000 webio.dll    6.1.7601.17514

Windows 6.1.7601.24384
DrMingw 0.9.11

« Last Edit: August 31, 2023, 01:58:42 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2808
Re: CodeBlocks crashed when opening source file
« Reply #2 on: August 31, 2023, 11:10:46 pm »
Does anyone know how to find a source line from a codeblocks crash report like this?

It reports: "codeblocks.exe caused an Access Violation at location 5792B58C in module clangd_client.dll Reading from location 20202030."

How can I find the source line that corresponds to address 5792B58C ?

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2808
Re: CodeBlocks crashed when opening source file
« Reply #3 on: September 01, 2023, 01:44:58 am »
What compiler did you use?
What os?

Offline Grit Clef

  • Multiple posting newcomer
  • *
  • Posts: 107
  • Where there is a will, there is a way.
Re: CodeBlocks crashed when opening source file
« Reply #4 on: September 01, 2023, 11:34:07 am »
GCC 13.1.0, Windows 7 32bit
-Windows 7, 32-bit
-CodeBlocks r13542, gcc 14.2.0, debug version

Online stahta01

  • Lives here!
  • ****
  • Posts: 7678
    • My Best Post
Re: CodeBlocks crashed when opening source file
« Reply #5 on: September 01, 2023, 01:34:42 pm »
GCC 13.1.0, Windows 7 32bit

I think he needs the exact compiler information and did you use the exact same compiler to build both CB and the plugins?

Edit: Oops, I just realized libgcc_s_dw2 is not a threading DLL; but, dwarf version of gcc lib
Code
5FA90000-5FB57000 libgcc_s_dw2-1.dll
70CF0000-70CFE000 libmcfgthread-1.dll 1.5.0.0

Tim S.
« Last Edit: September 01, 2023, 02:18:44 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2808
Re: CodeBlocks crashed when opening source file
« Reply #6 on: September 01, 2023, 05:29:24 pm »
I've now spent nearly 6 hours trying to find a means to associate the clangd_client crash address with a source line.
I've failed with nm.exe, Dependentcies.exe, Addr2line.exe, Addr2lineUI.exe. None report anything usable.

The only action now is to use the devel debugging version of clangd_client in the output32 directory so that the crash report contains the source line.

@Grit Clef
Rename your ouput32 plugin version of clangd_client.dll to clangd_client.dll.bak.

Make sure the clangd_client was compiled with the -g compiler options in order to get debugging info.

Copy the clangd_client.dll from the devel32\share\codeblocks\plugins directory to the output32\share\codeblocks\plugin directory.
Do not run ./update32, because it will strip out the debugging info.

BTW, those directories may have a slightly different name, like devel32_64, output32_64, etc.

Try to recreate the crash.
When it crashes, the .rpt file should contain the source line number of the crash.

Thanks
« Last Edit: September 01, 2023, 05:38:19 pm by Pecan »

Offline Grit Clef

  • Multiple posting newcomer
  • *
  • Posts: 107
  • Where there is a will, there is a way.
Re: CodeBlocks crashed when opening source file
« Reply #7 on: September 02, 2023, 10:36:16 am »
Oops! I replaced the clangd_client dll with the debug version, then started CB. I opened yesterday's project, and CB showed me a dialog to provide a correct clangd position. Strange, because I havn't changed my clangd and all the other things. Then, when I gave CB the original position, it told me that this clangd was incorrect. I clicked Yes, and a MSVC Runtime Error occured(No RPT file). That was related to libstdc++-6.dll. Then CB stopped response. I restarted it, everything returned to normal, but I can't recreate yesterday's crash, either.
-Windows 7, 32-bit
-CodeBlocks r13542, gcc 14.2.0, debug version

Offline Grit Clef

  • Multiple posting newcomer
  • *
  • Posts: 107
  • Where there is a will, there is a way.
Re: CodeBlocks crashed when opening source file
« Reply #8 on: September 02, 2023, 10:44:18 am »
Also, I tried back the release version, now it can't make that problem reappear, either.
-Windows 7, 32-bit
-CodeBlocks r13542, gcc 14.2.0, debug version

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2808
Re: CodeBlocks crashed when opening source file
« Reply #9 on: September 02, 2023, 06:22:25 pm »
Also, I tried back the release version, now it can't make that problem reappear, either.

Ok, but just leave the devel version of clangd_client.dll in your runtime  directory (output32). Maybe the crash will occur some time in the future and we'll catch the source line number in the .rpt file.

If you update CodeBlocks, please remember to hand copy the devel version of clangd_client.dll to your output32 directory after you run ./update32_64(or whichever one you use).

It appears that you're using a compiler different from the one the rest of us use. You might want to go to the nightly forum thread and download the compiler ususally used to compile codeblocks. It has a link for the compiler.
Of course the wxWidgets linked with CodeBlocks both have to be compiled with the same compiler.

https://forums.codeblocks.org/index.php/topic,25516.msg173682.html#msg173682

Thanks for the report and for working to identify this problem.
« Last Edit: September 02, 2023, 06:35:13 pm by Pecan »

Offline Grit Clef

  • Multiple posting newcomer
  • *
  • Posts: 107
  • Where there is a will, there is a way.
Re: CodeBlocks crashed when opening source file
« Reply #10 on: September 03, 2023, 06:01:09 am »
OK, and I do use the compiler from WinLibs, there is the only threading model difference than the one you use.
-Windows 7, 32-bit
-CodeBlocks r13542, gcc 14.2.0, debug version