Author Topic: Code::Blocks Version 20.03 Crashes When Run On Linux?  (Read 9740 times)

Offline JeZxLee

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: Code::Blocks Version 20.03 Crashes When Run On Linux?
« Reply #15 on: April 29, 2020, 10:31:32 pm »
Also what happens if you try this patch:
Code
diff --git a/src/plugins/contrib/DoxyBlocks/DoxyBlocks.cpp b/src/plugins/contrib/DoxyBlocks/DoxyBlocks.cpp
index 84c14fdf4..ee20512f4 100644
--- a/src/plugins/contrib/DoxyBlocks/DoxyBlocks.cpp
+++ b/src/plugins/contrib/DoxyBlocks/DoxyBlocks.cpp
@@ -101,8 +101,8 @@ END_EVENT_TABLE()

 // constructor
 DoxyBlocks::DoxyBlocks() :
-    m_pToolbar(0l),
-    m_DoxyBlocksLog(0l),
+    m_pToolbar(nullptr),
+    m_DoxyBlocksLog(nullptr),
     m_LogPageIndex(0),
     m_bAutoVersioning(false)
 {
@@ -234,8 +234,10 @@ void DoxyBlocks::OnEditorClose(CodeBlocksEvent& WXUNUSED(event))
  */
 void DoxyBlocks::OnUpdateUI(wxUpdateUIEvent& WXUNUSED(event))
 {
-    if(Manager::Get()->GetProjectManager()->GetProjects()->GetCount() == 0){
-        m_pToolbar->Enable(false);
+    if (Manager::Get()->GetProjectManager()->GetProjects()->GetCount() == 0)
+    {
+        if (m_pToolbar)
+            m_pToolbar->Enable(false);
         wxMenuBar *menuBar =  Manager::Get()->GetAppFrame()->GetMenuBar();
         menuBar->FindItem(ID_MENU_DOXYWIZARD)->Enable(false);
         menuBar->FindItem(ID_MENU_EXTRACTPROJECT)->Enable(false);
@@ -264,14 +266,15 @@ void DoxyBlocks::OnRelease(bool /*appShutDown*/)
             Manager::Get()->ProcessEvent(evt);
         }
     }
-    m_DoxyBlocksLog = 0;
+    m_DoxyBlocksLog = nullptr;
 }

-cbConfigurationPanel *DoxyBlocks::GetConfigurationPanel(wxWindow *parent)
+cbConfigurationPanel* DoxyBlocks::GetConfigurationPanel(wxWindow *parent)
 {
     //create and display the configuration dialog for your plugin
-    if(!IsAttached()){
-        return 0;
+    if (!IsAttached())
+    {
+        return nullptr;
     }

     // Get the version string before instantiating the panel so that it is recorded before
@@ -346,7 +349,7 @@ cbConfigurationPanel *DoxyBlocks::GetConfigurationPanel(wxWindow *parent)

 cbConfigurationPanel* DoxyBlocks::GetProjectConfigurationPanel(wxWindow* /*parent*/, cbProject* /*project*/)
 {
-    return 0;
+    return nullptr;
 }

 void DoxyBlocks::OnConfigure(wxCommandEvent & WXUNUSED(event))
Hi,

I can try the patch if you show me how to use it in terminal

Jesse

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Code::Blocks Version 20.03 Crashes When Run On Linux?
« Reply #16 on: April 29, 2020, 10:52:29 pm »
You have to build from source or if you're using a package you'll have to rebuild the package and modify the spec file to include the patch.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline JeZxLee

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: Code::Blocks Version 20.03 Crashes When Run On Linux?
« Reply #17 on: April 29, 2020, 11:20:10 pm »
Don't know how to do that unfortunately...

My Linux is a rolling release distro.
Will Code::Blocks be updated soon?

Thanks!

Jesse

Offline JeZxLee

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: Code::Blocks Version 20.03 Crashes When Run On Linux?
« Reply #18 on: April 29, 2020, 11:39:14 pm »
If you don't know how to build and still want to get past this problem, you can find the libDoxyBlocks.so and rename it to something else or delete it.

On my system it is in
Code
/usr/lib64/codeblocks/plugins/libDoxyBlocks.so
Hi,

Above actually works.

What is "DoxyBlocks"?
Just wondering if I need that or not.

Thanks!

Jesse

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
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 oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Code::Blocks Version 20.03 Crashes When Run On Linux?
« Reply #20 on: May 01, 2020, 08:12:17 pm »
Fixed in trunk. I'll make a commit in the release branch, too.

@JeZxLee: You can report this to your package provider, so he/she can rebuild the package with the included patch.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

arroadie

  • Guest
Re: Code::Blocks Version 20.03 Crashes When Run On Linux?
« Reply #21 on: June 19, 2020, 05:33:38 am »
FYI
was also having a segfault when starting codeblocks (on a fresh install).

notes:
- It only happened when I ran the app with my user (it was launching fine with root)
- After moving the file mentioned above out of lib it launched

details:

Thread 1 "codeblocks" received signal SIGSEGV, Segmentation fault.
0x00007fffe01cc208 in DoxyBlocks::OnUpdateUI(wxUpdateUIEvent&) () from /usr/lib/codeblocks/plugins/libDoxyBlocks.so

Code
(gdb) run 
Starting program: /usr/bin/codeblocks
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
20:24:53: Warning: Mismatch between the program and library build versions detected.
The library used 3.0 (wchar_t,compiler with C++ ABI 1013,wx containers,compatible with 2.8),
and your program used 3.0 (wchar_t,compiler with C++ ABI 1014,wx containers,compatible with 2.8).
[New Thread 0x7ffff4497700 (LWP 4074)]
[New Thread 0x7ffff3c96700 (LWP 4075)]
[New Thread 0x7ffff30d1700 (LWP 4077)]
[New Thread 0x7ffff28d0700 (LWP 4078)]
Starting Code::Blocks Release 20.03  rev 11997 May 27 2020, 10:54:33 - wx3.0.5 - gcc 10.1.0 (Linux, unicode) - 64 bit
Manager initialized
Initialize EditColourSet .....
[New Thread 0x7ffff0827700 (LWP 4079)]
[New Thread 0x7fffe24e8700 (LWP 4080)]
[New Thread 0x7fffe1ce7700 (LWP 4081)]
Initialize EditColourSet: done.
Loading menubar...
CodeSnippets: loaded
SmartIndentCpp: loaded
ProjectsImporter: loaded
Cccc: loaded
EnvVars: loaded
[Detaching after vfork from child process 4082]
[Detaching after vfork from child process 4084]
[Detaching after vfork from child process 4086]
[Detaching after vfork from child process 4088]
[Detaching after vfork from child process 4090]
[Detaching after vfork from child process 4094]
[Detaching after vfork from child process 4098]
[Detaching after vfork from child process 4102]
wxSmith: loaded
wxSmithMime: loaded
AStylePlugin: loaded
ToDoList: loaded
CB_Koders: loaded
EditorConfig: loaded
BrowseTracker: loaded
HelpPlugin: loaded
BYOGames: loaded
SmartIndentFortran: loaded
Debugger: loaded
wxSmithAui: loaded
lib_finder: loaded
Valgrind: loaded
EditorTweaks: loaded
ScriptedWizard: loaded
SpellChecker: loaded
OccurrencesHighlighting: loaded
ToolsPlus: loaded
cbDragScroll: loaded
wxSmithContribItems: loaded
DoxyBlocks: loaded
Abbreviations: loaded
OpenFilesList: loaded
Exporter: loaded
[New Thread 0x7fffcfbbe700 (LWP 4124)]
CodeCompletion: loaded
IncrementalSearch: loaded
AutoVersioning: loaded
SymTab: loaded
Compiler: loaded
SmartIndentLua: loaded
SmartIndentPascal: loaded
Autosave: loaded
HexEditor: loaded
SmartIndentHDL: loaded
CppCheck: loaded
SmartIndentXML: loaded
MouseSap: loaded
FilesExtensionHandler: loaded
SmartIndentPython: loaded
Cscope: loaded
Profiler: loaded
ThreadSearch: loaded
NassiShneidermanPlugin: loaded
copystrings: loaded
CodeStat: loaded
rndgen: loaded
ProjectOptionsManipulator: loaded
ClassWizard: loaded
ReopenEditor: loaded
RegExTestbed: loaded
HeaderFixup: loaded
cbKeyBinder: loaded
Code snippets plugin activated
SmartIndentCpp plugin activated
Foreign projects importer plugin activated
Cccc plugin activated
Environment variables plugin activated
wxSmith plugin activated
wxSmith - MIME plugin plugin activated
Source code formatter (AStyle) plugin activated
Todo List plugin activated
Koders query plugin activated
EditorConfig plugin for Code::Blocks plugin activated
BrowseTracker plugin activated
Help plugin plugin activated
BYO Games plugin activated
SmartIndentFortran plugin activated
Debugger plugin activated
wxSmith - Aui plugin activated
[Detaching after fork from child process 4125]
[Detaching after fork from child process 4126]
Library finder plugin activated
Valgrind plugin activated
Editor Tweaks plugin: Building menu
Editor Tweaks plugin: making the menu 15
Editor Tweaks plugin: Folding menu
EditorTweaks plugin activated
Project wizard added for 'Empty project'
Project wizard added for 'Fortran application'
Project wizard added for 'Fortran library'
Project wizard added for 'Fortran DLL'
Project wizard added for 'Console application'
Project wizard added for 'D application'
Project wizard added for 'FLTK project'
Project wizard added for 'GLFW project'
Project wizard added for 'GLUT project'
Project wizard added for 'GTK+ project'
Project wizard added for 'Irrlicht project'
Project wizard added for 'Java application'
Project wizard added for 'Lightfeather project'
Project wizard added for 'Matlab project'
Project wizard added for 'OpenCV project'
Project wizard added for 'OpenGL project'
Project wizard added for 'Ogre project'
Project wizard added for 'Code::Blocks plugin'
Project wizard added for 'QT4 project'
Project wizard added for 'QT4 (shared) project'
Project wizard added for 'QT5 project'
Project wizard added for 'SDL project'
Project wizard added for 'SDL2 project'
Project wizard added for 'SFML project'
Project wizard added for 'Static library'
Project wizard added for 'Shared library'
Project wizard added for 'wxWidgets project'
Build-target wizard added for 'Console'
Build-target wizard added for 'Static library'
Build-target wizard added for 'wxWidgets'
Project wizard added for 'Arduino Project'
Project wizard added for 'ARM Project'
Project wizard added for 'AVR Project'
Project wizard added for 'MSP430 Project'
Project wizard added for 'TriCore Project'
Project wizard added for 'PowerPC Project'
Project wizard added for 'MCS51 Project'
File(s) wizard added for 'Empty file'
File(s) wizard added for 'C/C++ source'
File(s) wizard added for 'D source'
File(s) wizard added for 'C/C++ header'
File(s) wizard added for 'Fortran source'
File(s) wizard added for 'Java source'
Scripted wizard plugin activated
Loading image: '/usr/share/codeblocks/SpellChecker/24x24/disabled.png' succeeded!
SpellChecker plugin activated
OccurrencesHighlighting plugin activated
ToolsPlus plugin activated
DragScroll plugin activated
wxSmith - Contrib Items plugin activated
DoxyBlocks plugin activated
Abbreviations plugin activated
Open files list plugin activated
Source Exporter plugin activated
Code completion plugin activated
IncrementalSearch plugin activated
AutoVersioning plugin activated
Symbol Table Plugin plugin activated
Added compiler "GNU GCC Compiler"
[Detaching after fork from child process 4127]
[Detaching after fork from child process 4128]
[Detaching after fork from child process 4129]
[Detaching after fork from child process 4130]
[Detaching after fork from child process 4131]
[Detaching after fork from child process 4132]
[Detaching after fork from child process 4133]
[Detaching after fork from child process 4134]
[Detaching after fork from child process 4135]
[Detaching after fork from child process 4136]
Added compiler "Intel C/C++ Compiler"
Added compiler "GDC D Compiler"
[Detaching after fork from child process 4137]
[Detaching after fork from child process 4138]
[Detaching after fork from child process 4139]
Added compiler "GNU Fortran Compiler"
[Detaching after fork from child process 4140]
[Detaching after fork from child process 4141]
[Detaching after fork from child process 4142]
Added compiler "G95 Fortran Compiler"
[Detaching after fork from child process 4143]
[Detaching after fork from child process 4144]
[Detaching after fork from child process 4145]
Added compiler "GNU GCC Compiler for ARM"
[Detaching after fork from child process 4146]
[Detaching after fork from child process 4147]
[Detaching after fork from child process 4148]
[Detaching after fork from child process 4149]
[Detaching after fork from child process 4150]
Added compiler "*No Compiler*"
Added compiler "LLVM Clang Compiler"
[Detaching after fork from child process 4151]
[Detaching after fork from child process 4152]
[Detaching after fork from child process 4153]
[Detaching after fork from child process 4154]
Added compiler "GNU GCC Compiler for TriCore (HighTec)"
[Detaching after fork from child process 4155]
[Detaching after fork from child process 4156]
[Detaching after fork from child process 4157]
[Detaching after fork from child process 4158]
[Detaching after fork from child process 4159]
Added compiler "LLVM D Compiler"
Added compiler "Digital Mars D Compiler"
Added compiler "Small Device C Compiler"
Added compiler "GNU GCC Compiler for Blackfin"
[Detaching after fork from child process 4160]
[Detaching after fork from child process 4161]
[Detaching after fork from child process 4162]
[Detaching after fork from child process 4163]
[Detaching after fork from child process 4164]
Added compiler "GNU GCC Compiler for PowerPC (HighTec)"
[Detaching after fork from child process 4165]
[Detaching after fork from child process 4166]
[Detaching after fork from child process 4167]
[Detaching after fork from child process 4168]
[Detaching after fork from child process 4169]
Added compiler "GNU GCC Compiler for Android"
[Detaching after fork from child process 4170]
[Detaching after fork from child process 4171]
[Detaching after fork from child process 4172]
[Detaching after fork from child process 4173]
[Detaching after fork from child process 4174]
Added compiler "GNU GCC Compiler for AVR"
[Detaching after fork from child process 4175]
[Detaching after fork from child process 4176]
[Detaching after fork from child process 4177]
[Detaching after fork from child process 4178]
[Detaching after fork from child process 4179]
Added compiler "PGI Fortran Compiler"
Added compiler "GNU GCC Compiler for ZPU"
[Detaching after fork from child process 4180]
[Detaching after fork from child process 4181]
[Detaching after fork from child process 4182]
[Detaching after fork from child process 4183]
[Detaching after fork from child process 4184]
Added compiler "GNU GCC Compiler for LM8"
[Detaching after fork from child process 4185]
[Detaching after fork from child process 4186]
[Detaching after fork from child process 4187]
[Detaching after fork from child process 4188]
[Detaching after fork from child process 4189]
Added compiler "GNU GCC Compiler for MSP430 (HighTec)"
[Detaching after fork from child process 4190]
[Detaching after fork from child process 4191]
[Detaching after fork from child process 4192]
[Detaching after fork from child process 4193]
[Detaching after fork from child process 4194]
Added compiler "GNU GCC Compiler for PowerPC EABI"
Added compiler "GNU GCC Compiler for LM32"
[Detaching after fork from child process 4195]
[Detaching after fork from child process 4196]
[Detaching after fork from child process 4197]
[Detaching after fork from child process 4198]
[Detaching after fork from child process 4199]
Added compiler "Tiny C Compiler"
Master path of compiler ID "gcc" is empty -> triggers auto-detection.
Master path of compiler ID "icc" is empty -> triggers auto-detection.
Master path of compiler ID "sdcc" is empty -> triggers auto-detection.
Master path of compiler ID "tcc" is empty -> triggers auto-detection.
Master path of compiler ID "clang" is empty -> triggers auto-detection.
Master path of compiler ID "arm-elf-gcc" is empty -> triggers auto-detection.
Master path of compiler ID "bfin-elf-gcc" is empty -> triggers auto-detection.
Master path of compiler ID "android-gcc" is empty -> triggers auto-detection.
Master path of compiler ID "avr-gcc" is empty -> triggers auto-detection.
Master path of compiler ID "zpu-gcc" is empty -> triggers auto-detection.
Master path of compiler ID "lm8-gcc" is empty -> triggers auto-detection.
Master path of compiler ID "lm32-gcc" is empty -> triggers auto-detection.
Master path of compiler ID "msp430-gcc" is empty -> triggers auto-detection.
Master path of compiler ID "tricore-gcc" is empty -> triggers auto-detection.
Master path of compiler ID "ppc-gcc" is empty -> triggers auto-detection.
Master path of compiler ID "powerpc-eabi" is empty -> triggers auto-detection.
Master path of compiler ID "gdc" is empty -> triggers auto-detection.
Master path of compiler ID "ldc" is empty -> triggers auto-detection.
Master path of compiler ID "dmd" is empty -> triggers auto-detection.
Master path of compiler ID "gfortran" is empty -> triggers auto-detection.
Master path of compiler ID "g95" is empty -> triggers auto-detection.
Master path of compiler ID "pgifortran" is empty -> triggers auto-detection.
Master path of compiler ID "null" is empty -> triggers auto-detection.
[New Thread 0x7fffcf086700 (LWP 4200)]

Thread 1 "codeblocks" received signal SIGSEGV, Segmentation fault.
0x00007fffe01cc208 in DoxyBlocks::OnUpdateUI(wxUpdateUIEvent&) () from /usr/lib/codeblocks/plugins/libDoxyBlocks.so

Let me know if you need any info

EDIT [adding some information]

Name             : Code::Blocks
Version          : 20.03-r11997
SDK Version      : 2.0.0
Scintilla Version: 3.7.5
Author           : The Code::Blocks Team
E-mail           : info@codeblocks.org
Website          : http://www.codeblocks.org

wxWidgets Library (wxGTK port)
Version 3.0.5 (Unicode: wchar_t, debug level: 1),
compiled at May 10 2020 07:34:55

Runtime version of toolkit used is 3.24.
Compile-time GTK+ version is 3.24.20.

Code
$ neofetch    
                   -`                    thiago@SeaMonkey
                  .o+`                   ----------------
                 `ooo/                   OS: Arch Linux x86_64
                `+oooo:                  Kernel: 5.7.3-arch1-1
               `+oooooo:                 Uptime: 23 mins
               -+oooooo+:                Packages: 1498 (pacman)
             `/:-:++oooo+:               Shell: zsh 5.8
            `/++++/+++++++:              Resolution: 1920x1080, 2560x1080
           `/++++++++++++++:             DE: Plasma
          `/+++ooooooooooooo/`           WM: KWin
         ./ooosssso++osssssso+`          WM Theme: Sweet-Dark-transparent
        .oossssso-````/ossssss+`         Theme: Sweet [Plasma], Breeze [GTK2/3]
       -osssssso.      :ssssssso.        Icons: Sweet-Rainbow [Plasma], Sweet-Rainbow [GTK2/3]
      :osssssss/        osssso+++.       Terminal: urxvt
     /ossssssss/        +ssssooo/-       Terminal Font: Hack
   `/ossssso+/:-        -:/+osssso+-     CPU: AMD Ryzen 7 2700 (16) @ 3.200GHz
  `+sso+:-`                 `.-/+oso:    GPU: NVIDIA GeForce GT 1030
 `++:.                           `-/+/   GPU: NVIDIA GeForce GTX 1070
 .`                                 `/   Memory: 4538MiB /
« Last Edit: June 19, 2020, 05:38:22 am by arroadie »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Code::Blocks Version 20.03 Crashes When Run On Linux?
« Reply #22 on: June 21, 2020, 12:11:15 pm »
This is a known and fixed problem. You'll have to apply the patch from revision 12176. https://sourceforge.net/p/codeblocks/code/12176/
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]