Author Topic: CB crash today ... but I can continue to use  (Read 1706 times)

Offline ThierryD

  • Multiple posting newcomer
  • *
  • Posts: 98
CB crash today ... but I can continue to use
« on: March 08, 2026, 05:14:45 pm »
Hi,

Just a crash during my use of CB today (in attachment).
My usual config : W11 25H2 64 bit.
My DLL project use "many" (very many ...) compilers C/C++ (free or "personal use only") : try to recompile "glut32" library.
Since crash, during load of my workspace, I must had to attribute an "default" compiler at the high level structure of my project CB (named "glut32") because I use "virtual target" to link all of my "real" target (like usual   ;D)

I add another "strange" behaviour of CB during use of Open WATCOM compiler V2:
   - all compiling steps are succeeded, but
   - final linkage fail od DLL fail because list of object files (many ...) begin with first ","

Here detail of command line of linking generate by CB with use of this compiler :

Code
wlink.exe option quiet system nt_dll  LIBP  C:\watcom\lib386\nt;C:\watcom\lib386 name binOW64\Release\glut32.dll library glut32,glu32,opengl32,advapi32,comdlg32,gdi32,winmm file ,objOW64\Release\lib\glut\glut_8x13.obj,objOW64\Release\lib\glut\glut_9x15.obj,objOW64\Release\lib\glut\glut_bitmap.obj,objOW64\Release\lib\glut\glut_bwidth.obj,objOW64\Release\lib\glut\glut_cindex.obj,objOW64\Release\lib\glut\glut_cmap.obj,objOW64\Release\lib\glut\glut_cursor.obj,objOW64\Release\lib\glut\glut_dials.obj,objOW64\Release\lib\glut\glut_dstr.obj,objOW64\Release\lib\glut\glut_event.obj,objOW64\Release\lib\glut\glut_ext.obj,objOW64\Release\lib\glut\glut_fcb.obj,objOW64\Release\lib\glut\glut_fullscrn.obj,objOW64\Release\lib\glut\glut_gamemode.obj,objOW64\Release\lib\glut\glut_get.obj,objOW64\Release\lib\glut\glut_glxext.obj,objOW64\Release\lib\glut\glut_hel10.obj,objOW64\Release\lib\glut\glut_hel12.obj,objOW64\Release\lib\glut\glut_hel18.obj,objOW64\Release\lib\glut\glut_init.obj,objOW64\Release\lib\glut\glut_input.obj,objOW64\Release\lib\glut\glut_joy.obj,objOW64\Release\lib\glut\glut_key.obj,objOW64\Release\lib\glut\glut_keyctrl.obj,objOW64\Release\lib\glut\glut_keyup.obj,objOW64\Release\lib\glut\glut_mesa.obj,objOW64\Release\lib\glut\glut_modifier.obj,objOW64\Release\lib\glut\glut_mroman.obj,objOW64\Release\lib\glut\glut_overlay.obj,objOW64\Release\lib\glut\glut_roman.obj,objOW64\Release\lib\glut\glut_shapes.obj,objOW64\Release\lib\glut\glut_space.obj,objOW64\Release\lib\glut\glut_stroke.obj,objOW64\Release\lib\glut\glut_swap.obj,objOW64\Release\lib\glut\glut_swidth.obj,objOW64\Release\lib\glut\glut_tablet.obj,objOW64\Release\lib\glut\glut_teapot.obj,objOW64\Release\lib\glut\glut_tr10.obj,objOW64\Release\lib\glut\glut_tr24.obj,objOW64\Release\lib\glut\glut_util.obj,objOW64\Release\lib\glut\glut_vidresize.obj,objOW64\Release\lib\glut\glut_warp.obj,objOW64\Release\lib\glut\glut_win.obj,objOW64\Release\lib\glut\glut_winmisc.obj,objOW64\Release\lib\glut\win32_glx.obj,objOW64\Release\lib\glut\win32_menu.obj,objOW64\Release\lib\glut\win32_util.obj,objOW64\Release\lib\glut\win32_winproc.obj,objOW64\Release\lib\glut\win32_x11.obj
Error! E3033: directive error near 'file'


I correct this command line with suppress simply first "," after option "file".... Possible to correct this ?

Last information about use of CB with this compiler, I select into CB project the generation of "import librray" during linkage, but nothing "option" appear during linkage (proof in prvious code inserted).

Option to add to generate import library with this compiler is "option implib=xxxxxxxx" during step of link (xxxxxxxx = name of "target" import library with dirctories if needed).
Possible to add into CB syntax or not ?

Thank's for all.

Thierry D.


 


Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6191
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: CB crash today ... but I can continue to use
« Reply #1 on: March 11, 2026, 02:06:16 am »
Code
Error occurred on Sunday, March 8, 2026 at 15:29:32.

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

AddrPC           Params
00007FF9CC5D0A9F 000001DD85FC1FC0 000000036CBFE950 00000000FFFFFFFF  compiler.dll!0x50a9f
00007FF9CC5C965B 000001DD85FC1FC0 000001DD877C4DE8 000001DD877C4868  compiler.dll!0x4965b
00007FF9CC5D7C4C 000001DD85FC1FC0 000000036CBFD2D0 0000000080000000  compiler.dll!0x57c4c

From your crash report file, I see it looks like the crash happens in the compiler plugin dll.
But from your description, it is hard to understand what are the steps to reproduce this crash. At which stage it get crashed?

Thanks.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline ThierryD

  • Multiple posting newcomer
  • *
  • Posts: 98
Re: CB crash today ... but I can continue to use
« Reply #2 on: March 11, 2026, 02:28:49 pm »
Ok, I try to remember my previous actions.

Just to be precise, I use sometimes two screens to have more "surface", principal one of my laptop, secondary two in HDMI mode, but sometimes one screen only (other connected to my old fix PC).
Crash arrived on my laptop (much recent) with two screens, and after choose on "real" target to rebuild and try to use (Open WATCOM compiler), I don't know why but CB signal me that virtual target "glut32" has loose his "asociated" compiler. Just "in aparte", I find strange this mandatory association of compiler into CB to "virtual target", if I use this it's because I want run all build describe into "real target". Maybe, because I don't understand real need of this.

I join CB project in attachement (just add extension .txt to permit loading on forum). Dam that CB forum don't permit directly load of CB project ;D
Source file of "glut32" library can be search on this site : https://www.transmissionzero.co.uk/files/software/development/GLUT/

Sorry, I have not exactly the order of my different actions into CB before crash (I'm just an "normal" user of CB that search to success build ... with many manipulations into IDE).

Regards.

PS : Examine properties of Open WATCM targets into CB project, to understand reason of my others remark in first post.

 

Offline ThierryD

  • Multiple posting newcomer
  • *
  • Posts: 98
Re: CB crash today ... but I can continue to use
« Reply #3 on: March 11, 2026, 05:52:31 pm »
Sorry, site indicated before is not for source files of Glut32 library, only runtime version of GLUT and Freeglut with MinGW (32 bit) or MSVC (32 bit).

Source files of "glut32" library can be search on  https://www.opengl.org/resources/libraries/glut/glut37.zip (in directory \lib\glut\*  once unzipped).

Sincerly.

Offline blauzahn

  • Almost regular
  • **
  • Posts: 226
Re: CB crash today ... but I can continue to use
« Reply #4 on: March 11, 2026, 09:24:21 pm »
When compiling cb (svn13805) with scan-build, its log contains a potential "dereferencing null pointer" in the compiler plugin in file compilerOWgenerator.cpp. See attached screen-shot. Not sure, whether it actually is the reason for the current problem.

for scan-build, see: https://clang.llvm.org/docs/analyzer/user-docs/CommandLineUsage.html#scan-build

Cheers.

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1840
Re: CB crash today ... but I can continue to use
« Reply #5 on: Yesterday at 10:24:53 am »
Null pointer dereferencing fixed in r13813, thank you for reporting.

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1840
Re: CB crash today ... but I can continue to use
« Reply #6 on: Yesterday at 07:39:21 pm »
The issue with the leading comma should be fixed in r13823.

Offline blauzahn

  • Almost regular
  • **
  • Posts: 226
Re: CB crash today ... but I can continue to use
« Reply #7 on: Yesterday at 10:27:36 pm »
nice work; Thank you!

remarks:

svn13822:
* devcpploader.cpp:43: possibly dereferencing null pointer of non-owning data member m_pProject; An additional guard clause could return early in that case.
* devcpploader.cpp:48 and :156: Shouldn't the (2nd) pointer arg to Read be a nullptr instead of 0?
* devcpploader.cpp:47, 52, 134: uninitialized local variables used as out args to dev->Read:
  int unitcount,
  int typ,
  bool compile,
  bool compileCpp,
  bool link
 
  We could consider to value initialize them. Read potentially does not assign to them.

* devcpploader.cpp:45: The local variable dev is an owning raw pointer wxFileConfig* without any obvious need. As such, it lacks basic exception safety and could leak. We could consider replacing it with a std::unique_ptr<wxFileConfig> or, even better, just a stack variable wxFileConfig dev.
* devcpploader.h:17: The ctor of DevCppLoader might become explicit.
* devcpploader.h:25: The default ctor might be =deleted instead of defined in private section.

* svn13818: When override is used, we may consider to omit virtual. (see: https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#rh-override)

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5553
Re: CB crash today ... but I can continue to use
« Reply #8 on: Yesterday at 10:31:42 pm »
good suggestions to apply.

Offline blauzahn

  • Almost regular
  • **
  • Posts: 226
Re: CB crash today ... but I can continue to use
« Reply #9 on: Yesterday at 10:32:45 pm »
Hi Lieven. Thank you.

Offline blauzahn

  • Almost regular
  • **
  • Posts: 226
Re: CB crash today ... but I can continue to use
« Reply #10 on: Today at 06:36:31 am »
patch attached

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1840
Re: CB crash today ... but I can continue to use
« Reply #11 on: Today at 10:08:45 am »
Patch applied in r13824, thank you.

NOTE: I have changed tabs to spaces in both files after applying the patch.