Author Topic: Code::Blocks Starting Issue (OpenSuse 12.3)  (Read 12912 times)

Offline CudRa

  • Single posting newcomer
  • *
  • Posts: 5
Code::Blocks Starting Issue (OpenSuse 12.3)
« on: June 20, 2013, 03:24:19 pm »
Hello, I'm new here and I have a problem with Code::Blocks under OpenSuse 12.3. (and I'm new to OpenSuse / Linux as well...).

When I try to start Code::Blocks for the first time after a reboot, it works fine. But when I close it and then try to open it again, I just can see a new tab in
the window-bar on the bottom of the screen but nothing happens. I also noticed that if I close Code::Blocks after I started it, it just closes the Window of Code::Blocks
but it doesn't terminate it's process (the process still runs as I can see when I type "top" in the terminal or press CTRL+ESC). I found out that the standard settings ("Enviroment") allows
only one instance of Code::Blocks at the same time so I think thats the reason why I can not start Code::Blocks a second time because the process of the first instance is still running.
I tried do uncheck this option so that more instances are allowed, but Code::Blocks doesn't save my changes and this option is checked again when I startd Code::Blocks again after a reboot.

I tried the steps mentioned in this link: http://forums.codeblocks.org/index.php?topic=8520.0;prev_next=next. When I delete the file "/tmp/Code::Blocks-<your-user-name-here>"
I am able to start Code::Blocks again without to reboot my computer, but then this file is created again and the next try to open the program fails.
I also tried to edit the  file "default.conf" in "~/.codeblocks/" as mention in the link, but I couldn't find the entry "<SINGLE_INSTANCE bool="1" />".

Does someone has the same problems or even a solution for this problem?

(I have OpenSuse 12.3 and Windows 8 installed (paralell) on the same machine. Does that may be a problem?)

Thanks in advance and sorry for my bad english  :) !

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Code::Blocks Starting Issue (OpenSuse 12.3)
« Reply #1 on: June 20, 2013, 03:45:00 pm »
Which version of C::B do you use ?
Can you try to start C::B from a console (just type codeblocks) and look at the output if you try to close C::B and see if there is something relevant ?

Offline briselec

  • Single posting newcomer
  • *
  • Posts: 4
Re: Code::Blocks Starting Issue (OpenSuse 12.3)
« Reply #2 on: June 21, 2013, 09:11:15 am »
I had the same problem on Slackware.  Found disabling the code completion plugin stopped it from happening.
If you run it from a terminal emulator as suggested and wait till the process terminates it should print error messages indicating the cause.
« Last Edit: June 21, 2013, 09:20:00 am by briselec »

Offline CudRa

  • Single posting newcomer
  • *
  • Posts: 5
Re: Code::Blocks Starting Issue (OpenSuse 12.3)
« Reply #3 on: June 22, 2013, 09:28:48 am »
I use Code::Blocks version 12.11.

When I start C::B from the console and then close C::B again, I get the following output on the console:

Code
Initialize EditColourSet .....
Initialize EditColourSet: done.
Loading menubar...
wxSmithContribItems: loaded
SmartIndentPython: loaded
wxSmithAui: loaded
EditorTweaks: loaded
CodeStat: loaded
lib_finder: loaded
SymTab: loaded
SmartIndentHDL: loaded
FileManager: loaded
SmartIndentXML: loaded
Compiler: loaded
HexEditor: loaded
EnvVars: loaded
cbKeyBinder: loaded
EditorConfig: loaded
Valgrind: loaded
SmartIndentFortran: loaded
DoxyBlocks: loaded
HelpPlugin: loaded
ClassWizard: loaded
IncrementalSearch: loaded
FilesExtensionHandler: loaded
SmartIndentLua: loaded
BrowseTracker: loaded
ScriptedWizard: loaded
cbDragScroll: loaded
ReopenEditor: loaded
SmartIndentPascal: loaded
Profiler: loaded
OpenFilesList: loaded
copystrings: loaded
MouseSap: loaded
SmartIndentCpp: loaded
SpellChecker: loaded
Cccc: loaded
NassiShneidermanPlugin: loaded
CodeCompletion: loaded                                                                                                                                                 
CB_Koders: loaded                                                                                                                                                       
CppCheck: loaded                                                                                                                                                       
ToolsPlus: loaded                                                                                                                                                       
HeaderFixup: loaded                                                                                                                                                     
AutoVersioning: loaded                                                                                                                                                 
wxSmith: loaded                                                                                                                                                         
wxSmithMime: loaded
BYOGames: loaded
RegExTestbed: loaded
Abbreviations: loaded
ToDoList: loaded
Exporter: loaded
Autosave: loaded
Cscope: loaded
ThreadSearch: loaded
Debugger: loaded
ProjectsImporter: loaded
CodeSnippets: loaded
AStylePlugin: loaded
wxSmith - Contrib Items plugin activated
SmartIndentPython plugin activated
wxSmith - Aui plugin activated
Editor Tweaks plugin: Building menu
Editor Tweaks plugin: making the menu 14
EditorTweaks plugin activated
Code statistics plugin activated
Library finder plugin activated
Symbol Table Plugin plugin activated
SmartIndentHDL plugin activated
failed to find gam_server
FileManager plugin activated
SmartIndentXML plugin activated
Added compiler "GNU GCC Compiler"
Added compiler "Intel C/C++ Compiler"
Added compiler "SDCC Compiler"
Added compiler "Tiny C Compiler"
Added compiler "GDC D Compiler"
Added compiler "LLVM D Compiler"
Added compiler "Digital Mars D Compiler"
Added compiler "GNU Fortran Compiler"
Added compiler "G95 Fortran Compiler"
Added compiler "GNU ARM GCC Compiler"
Added compiler "GNU AVR GCC Compiler"
Added compiler "GNU GCC Compiler for PowerPC"
Added compiler "GNU GCC Compiler for TriCore"
Compiler plugin activated
HexEditor plugin activated
Environment variables plugin activated
Keyboard shortcuts plugin activated
EditorConfig plugin for Code::Blocks plugin activated
Valgrind plugin activated
SmartIndentFortran plugin activated
DoxyBlocks plugin activated
Help plugin plugin activated
Class wizard plugin activated
IncrementalSearch plugin activated
Files extension handler plugin activated
SmartIndentLua plugin activated
BrowseTracker 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 'Lightfeather project'
Project wizard added for 'Matlab 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 'SDL 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 'ARM Project'
Project wizard added for 'AVR 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 'C/C++ header'
File(s) wizard added for 'Fortran source'
Scripted wizard plugin activated
DragScroll plugin activated
ReopenEditor plugin activated
SmartIndentPascal plugin activated
Code profiler plugin activated
Open files list plugin activated
Copy Strings to clipboard plugin activated
MouseSap plugin activated
SmartIndentCpp plugin activated

(codeblocks:24666): Gtk-WARNING **: gtk_widget_size_allocate(): attempt to allocate widget with width 18 and height -22
Failed to connect to socket /tmp/fam-jonas-
SpellChecker plugin activated
Cccc plugin activated
NassiShneidermanPlugin plugin activated
Code completion plugin activated
Koders query plugin activated
CppCheck plugin activated
ToolsPlus plugin activated
Header Fixup plugin activated
AutoVersioning plugin activated
wxSmith plugin activated
wxSmith - MIME plugin plugin activated
BYO Games plugin activated
Regular expressions testbed plugin activated
Abbreviations plugin activated
Todo List plugin activated
Source Exporter plugin activated
Autosave plugin activated
Cscope plugin activated
ThreadSearch plugin activated
Debugger plugin activated
Foreign projects importer plugin activated
Code snippets plugin activated
Source code formatter (AStyle) plugin activated

(codeblocks:24666): GLib-GObject-WARNING **: invalid uninstantiatable type `<invalid>' in cast to `GtkRadioMenuItem'

(codeblocks:24666): Gtk-CRITICAL **: IA__gtk_radio_menu_item_get_group: assertion `GTK_IS_RADIO_MENU_ITEM (radio_menu_item)' failed

(codeblocks:24666): GLib-GObject-WARNING **: invalid uninstantiatable type `<invalid>' in cast to `GtkRadioMenuItem'

(codeblocks:24666): Gtk-CRITICAL **: IA__gtk_radio_menu_item_get_group: assertion `GTK_IS_RADIO_MENU_ITEM (radio_menu_item)' failed
Loading toolbar...
No active project available.
Initializing plugins...
KeyBinder failed UpdateById on[1017][Cu_t]
KeyBinder failed UpdateById on[1016][_Copy]
KeyBinder failed UpdateById on[1018][_Paste]
Updating class browser...
Class browser updated.
Deinitializing plugins...

(codeblocks:24666): GLib-GObject-WARNING **: invalid uninstantiatable type `(null)' in cast to `GtkRadioMenuItem'

(codeblocks:24666): Gtk-CRITICAL **: IA__gtk_radio_menu_item_get_group: assertion `GTK_IS_RADIO_MENU_ITEM (radio_menu_item)' failed

(codeblocks:24666): GLib-GObject-WARNING **: invalid uninstantiatable type `(null)' in cast to `GtkRadioMenuItem'

(codeblocks:24666): Gtk-CRITICAL **: IA__gtk_radio_menu_item_get_group: assertion `GTK_IS_RADIO_MENU_ITEM (radio_menu_item)' failed

When I start C::B with "sudo codeblocks" in the console, I get the following output:

Code
Error: Unable to initialize gtk, is DISPLAY set properly?
(I use OpenSuse with KDE-Desktop)

But when I start a root shell and then type "codeblocks" to start C::B, it starts correctly (without the error above), I can change any settings and they were really saved. When I then close C::B (with the code completion plugin enabled or not), the process is terminated correctly.

It's a strange behaviour of C::B...

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Code::Blocks Starting Issue (OpenSuse 12.3)
« Reply #4 on: June 22, 2013, 09:55:10 am »
When I start C::B with "sudo codeblocks" in the console, I get the following output:

Code
Error: Unable to initialize gtk, is DISPLAY set properly?
(I use OpenSuse with KDE-Desktop)
That's normal behaviour, it's not allowed to access your display, even not for root.
That's by design and has nothing to do with C::B !

If you type
Code
xhost +
before
Quote
sudo codeblocks
it should work also.
You should forbid display access with
Code
xhost -
after closing C::B for security reasons, even if it is not a real problem on a single user system (In most cases).
But when I start a root shell and then type "codeblocks" to start C::B, it starts correctly (without the error above), I can change any settings and they were really saved. When I then close C::B (with the code completion plugin enabled or not), the process is terminated correctly.

It's a strange behaviour of C::B...
I think it's a strange behaviour of you system, not C:::B.
The output shows nothing real serious, even the GTK-Critcals are normally harmless, they come from a wxWidgets bug, and that's not a C::B issue, as we do not maintain wxWidgets. In most cases it's done by a maintainer-team of the distro you use.
That does not mean, that we do not try to work around such issues, but it's sometimes not easy.
And we have issues and bugs in our sources also, of course.
That's normal for complex software, and we can not avoid it, sorry.

Nevertheless, did you try to remove (or better rename) the whole (hidden) .codeblocks folder in your home-directory, when no instance of C::B is running.
Starting C::B should create it from scratch with default values, all your user settings will be lost, but you can restore some of them with cb_share_config.

Offline CudRa

  • Single posting newcomer
  • *
  • Posts: 5
Re: Code::Blocks Starting Issue (OpenSuse 12.3)
« Reply #5 on: June 22, 2013, 10:43:48 am »
I renamed the folder .codeblocks and started C::B again.
The folder was created again as you mentioned, but unfortunately that didn't helped...

Thank you for the explanations :)
I understand that it may be a problem with my system and
I hope this problem will be fixed eventually.

Offline CudRa

  • Single posting newcomer
  • *
  • Posts: 5
Re: Code::Blocks Starting Issue (OpenSuse 12.3)
« Reply #6 on: June 23, 2013, 11:03:39 pm »
Hey, I found a solution for this problem I think...

I started a root shell and gave me (my user-acc) with the "chmod"-command the read, write and execute-rights for the file "/usr/bin/codeblocks".
If I start C::B now, everything works fine!

Can you tell me if this is a "good" solution, or if this is something like a "workaround" or "hacker-like"? ^^

Now I'm just happy that it works :D

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Code::Blocks Starting Issue (OpenSuse 12.3)
« Reply #7 on: June 23, 2013, 11:23:54 pm »
The executable should have 755 filemask (read-and executable by owner, group and others, writable just by the owner, user and group should be root).
If you need write access on the executable, to run it correctly, your system must be seriously broken.

Offline CudRa

  • Single posting newcomer
  • *
  • Posts: 5
Re: Code::Blocks Starting Issue (OpenSuse 12.3)
« Reply #8 on: June 24, 2013, 12:00:58 am »
Ok, I just changed the settings of the executable exactly as you described it...and it works, too!
I don't know the settings as they were before... Could I reproduce this phenomenon by deinstalling and
then re-install C::B? Or are the x/r/w-permissions for the executable saved even when reinstalling C::B?
I would be interested in knowing how the x/r/w-permissons were set-up before...