Author Topic: Codeblocks crashes on launch  (Read 2414 times)

Offline parmesan_cornball026

  • Single posting newcomer
  • *
  • Posts: 5
Codeblocks crashes on launch
« on: April 14, 2023, 11:23:33 pm »
I recently installed codeblocks on my Ubuntu 20;04 system.  When I've tried to launch it, I get the banner displayed; then immediately I get two other windows that tell me of some error(s).  These windows remain visible for possibly two seconds, then disappear.  I cannot read them that quickly; and one window blocks the other.

I don't know how to fix this.  I have searched on the Internet and here, and have not found anything that seems to fit this issue.

To summarize, when I try to run a newly-installed codeblocks, I get an error message and windows that display for perhaps two seconds, then vanish without a trace.

I have tried launching codeblocks from the command line.  The messages from this are as follows:

Starting Code::Blocks Release 20.03  rev 11997 2020-04-18, 19:47:24 - wx3.0.4 - gcc 9.3.0 (Linux, unicode) - 64 bit
Manager initialized
Initialize EditColourSet .....
Initialize EditColourSet: done.
Loading menubar...
ToDoList: loaded
AStylePlugin: loaded
FilesExtensionHandler: loaded
Valgrind: loaded
EnvVars: loaded
lib_finder: loaded
ReopenEditor: loaded
Debugger: loaded
IncrementalSearch: loaded
ThreadSearch: loaded
copystrings: loaded
Exporter: loaded
SmartIndentHDL: loaded
BrowseTracker: loaded
wxSmithAui: loaded
wxSmithContribItems: loaded
Autosave: loaded
SpellChecker: loaded
SmartIndentLua: loaded
FileManager: loaded
DoxyBlocks: loaded
CodeSnippets: loaded
HexEditor: loaded
SmartIndentPython: loaded
NassiShneidermanPlugin: loaded
ProjectOptionsManipulator: loaded
ProjectsImporter: loaded
OccurrencesHighlighting: loaded
SymTab: loaded
MouseSap: loaded
OpenFilesList: loaded
CodeCompletion: loaded
RegExTestbed: loaded
CB_Koders: loaded
Cscope: loaded
wxSmith: loaded
wxSmithMime: loaded
CodeStat: loaded
Cccc: loaded
SmartIndentPascal: loaded
BYOGames: loaded
EditorTweaks: loaded
SmartIndentFortran: loaded
HelpPlugin: loaded
CppCheck: loaded
ScriptedWizard: loaded
ToolsPlus: loaded
AutoVersioning: loaded
Compiler: loaded
EditorConfig: loaded
HeaderFixup: loaded
rndgen: loaded
Abbreviations: loaded
SmartIndentXML: loaded
cbDragScroll: loaded
cbKeyBinder: loaded
Profiler: loaded
ClassWizard: loaded
SmartIndentCpp: loaded
Todo List plugin activated
Source code formatter (AStyle) plugin activated
Files extension handler plugin activated
Valgrind plugin activated
Environment variables plugin activated
Library finder plugin activated
ReopenEditor plugin activated
Debugger plugin activated
IncrementalSearch plugin activated
ThreadSearch plugin activated
Copy Strings to clipboard plugin activated
Source Exporter plugin activated
SmartIndentHDL plugin activated
BrowseTracker plugin activated
wxSmith - Aui plugin activated
wxSmith - Contrib Items plugin activated
Autosave plugin activated
Detected dict path: /usr/share/hunspell
Detected thes path: /usr/share/mythes
Selected dictionary: en_US
Found dictionary: en_US
Loading image: '/usr/share/codeblocks/SpellChecker/16x16/en_US.png' succeeded!
SpellChecker plugin activated
SmartIndentLua plugin activated
FileManager plugin activated
DoxyBlocks plugin activated
Code snippets plugin activated
HexEditor plugin activated
SmartIndentPython plugin activated
NassiShneidermanPlugin plugin activated
Project options manipulator plugin activated
Foreign projects importer plugin activated
OccurrencesHighlighting plugin activated
Symbol Table Plugin plugin activated
MouseSap plugin activated
Open files list plugin activated
Code completion plugin activated
Regular expressions testbed plugin activated
Koders query plugin activated
Cscope plugin activated
wxSmith plugin activated
wxSmith - MIME plugin plugin activated
Code statistics plugin activated
Cccc plugin activated
SmartIndentPascal plugin activated
BYO Games plugin activated
Editor Tweaks plugin: Building menu
Editor Tweaks plugin: making the menu 15
Editor Tweaks plugin: Folding menu
EditorTweaks plugin activated
SmartIndentFortran plugin activated
Help plugin plugin activated
CppCheck 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) pro
(codeblocks:277762): Gtk-CRITICAL **: 16:12:08.937: gtk_tree_model_iter_nth_child: assertion 'n >= 0' failed


In the /tmp directory I have an xml file named codeblocks.xml, which I have renamed codeblocks.txt, and which I attach:

I would be grateful for any information that can help me solve this problem, or that could direct me to more information about the issue.

Thank you.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Codeblocks crashes on launch
« Reply #1 on: April 14, 2023, 11:41:02 pm »
The tail end of the file the OP attached. Looks like a crash caused by the DoxyBlocks plugin.

Tim S.

Code
  <stack>
    <frame level="0"/>
    <frame level="1"/>
    <frame level="2"/>
    <frame level="3" function="DoxyBlocks::OnUpdateUI(wxUpdateUIEvent&amp;)" offset="0000002a"/>
    <frame level="4" function="wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&amp;, wxEvtHandler*, wxEvent&amp;)" offset="00000071"/>
    <frame level="5" function="wxEventHashTable::HandleEvent(wxEvent&amp;, wxEvtHandler*)" offset="000000a3"/>
    <frame level="6" function="wxEvtHandler::TryHereOnly(wxEvent&amp;)" offset="00000050"/>
    <frame level="7" function="wxEvtHandler::DoTryChain(wxEvent&amp;)" offset="00000043"/>
    <frame level="8" function="wxEvtHandler::ProcessEvent(wxEvent&amp;)" offset="00000081"/>
    <frame level="9" function="wxMenuBase::UpdateUI(wxEvtHandler*)" offset="00000105"/>
    <frame level="10" function="wxMenuBarBase::UpdateMenus()" offset="0000003d"/>
    <frame level="11" function="wxFrameBase::OnInternalIdle()" offset="0000000d"/>
    <frame level="12" function="wxWindowBase::SendIdleEvents(wxIdleEvent&amp;)" offset="00000017"/>
    <frame level="13" function="wxFrame::SendIdleEvents(wxIdleEvent&amp;)" offset="00000013"/>
    <frame level="14" function="wxAppBase::ProcessIdle()" offset="0000009d"/>
    <frame level="15" function="wxApp::DoIdle()" offset="000000a5"/>
    <frame level="16"/>
    <frame level="17" function="g_main_context_dispatch" offset="0000014e"/>
    <frame level="18"/>
    <frame level="19" function="g_main_loop_run" offset="00000083"/>
    <frame level="20" function="gtk_main" offset="0000007d"/>
    <frame level="21" function="wxGUIEventLoop::DoRun()" offset="00000025"/>
    <frame level="22" function="wxEventLoopBase::Run()" offset="00000031"/>
    <frame level="23" function="wxDialog::ShowModal()" offset="00000192"/>
    <frame level="24" function="CompilerFactory::LoadSettings()" offset="00000516"/>
    <frame level="25" function="CompilerGCC::OnAttach()" offset="0000119a"/>
    <frame level="26" function="cbPlugin::Attach()" offset="0000009b"/>
    <frame level="27" function="PluginManager::AttachPlugin(cbPlugin*, bool)" offset="00000031"/>
    <frame level="28" function="PluginManager::LoadAllPlugins()" offset="00000449"/>
    <frame level="29"/>
    <frame level="30"/>
    <frame level="31"/>
    <frame level="32"/>
    <frame level="33" function="wxEntry(int&amp;, wchar_t**)" offset="000000aa"/>
    <frame level="34"/>
    <frame level="35" function="__libc_start_main" offset="000000f3"/>
    <frame level="36"/>
  </stack>
</report>
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 stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Codeblocks crashes on launch
« Reply #2 on: April 14, 2023, 11:51:26 pm »
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 stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Codeblocks crashes on launch
« Reply #3 on: April 15, 2023, 12:07:07 am »
I think Linux store the default config in
Code
Folder: .config/codeblocks
File: default.conf
Value: <DOXYBLOCKS bool="1" />

If you change the value of DOXYBLOCKS to 0 it should disable the plugin .

Tim S.
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 parmesan_cornball026

  • Single posting newcomer
  • *
  • Posts: 5
Re: Codeblocks crashes on launch
« Reply #4 on: April 15, 2023, 01:11:12 am »
Thank you for your reply.  It at least gives me something to work with, and I appreciate that.

There was no default.conf in the /config/codeblocks directlry, so I created one and set the DOXYBLOCKS value to 0.  This at least gave me a new error message.  The new complaint was that some root directory was missing (I'll have to dig around a bit).  But I'm hopeful that I'll be able to create a reasonable default.conf file that will let my poor codeblocks finally run.

Thanks for your help.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Codeblocks crashes on launch
« Reply #5 on: April 15, 2023, 01:40:03 am »
Thank you for your reply.  It at least gives me something to work with, and I appreciate that.

There was no default.conf in the /config/codeblocks directlry, so I created one and set the DOXYBLOCKS value to 0.  This at least gave me a new error message.  The new complaint was that some root directory was missing (I'll have to dig around a bit).  But I'm hopeful that I'll be able to create a reasonable default.conf file that will let my poor codeblocks finally run.

Thanks for your help.

You need to find the correct file and edit it!
Note: Sometimes Linux hides files that start with an period ".".
I would try looking in your home folder.

https://unix.stackexchange.com/questions/33943/what-config-refers-to-and-how-to-put-files-there

Tim S.
« Last Edit: April 15, 2023, 01:47:37 am 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 parmesan_cornball026

  • Single posting newcomer
  • *
  • Posts: 5
Re: Codeblocks crashes on launch
« Reply #6 on: April 15, 2023, 03:03:41 am »
Yes, I found the directory ~/.config/codeblocks.  I suppose in a perfect world this directory would contain default.conf, but in my case it did not.  Evidently whatever crashed codeblocks happened before codeblocks was able to create its default.conf file.

I will try to track down what should be in this file, and put it in by hand.  Eventually I have hopes that I might get codeblocks working properly.

I appreciate your comments.  Thank you.

Offline parmesan_cornball026

  • Single posting newcomer
  • *
  • Posts: 5
Re: Codeblocks crashes on launch
« Reply #7 on: April 15, 2023, 03:37:01 am »
Update:  I found an example of a default.conf file for codeblocks.  I was able to tweak that.  That allowed codeblocks to run, and I was able to configure codeblocks using the program itself.

I greatly appreciate the help you have give me.  Thank you.