Author Topic: CodeBlocks crashes after installing HelloWOrld Pluigin  (Read 35450 times)

Offline threeS

  • Multiple posting newcomer
  • *
  • Posts: 36
CodeBlocks crashes after installing HelloWOrld Pluigin
« on: September 06, 2014, 03:07:23 pm »
Good day!

After I checkout codeblocks from svn, I followed the instruction on building codeblocks on the BUILD txt file inside the svn folder. I also following the instruction of building the wxGTK on these site: http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux.
And both of them working so well.
After that i followed these simple tutorial on HelloWorld Plugin
http://wiki.codeblocks.org/index.php?title=Creating_a_simple_%22Hello_World%22_plugin.,
I just copied everything on it to try if I can create a plugin on my codeblocks build.
After that I tried to install, it but something went wrong and make my build codeblocks crash. It makes my IDE looks not so good (see attachment image)., I tried to follow:
Quote
oBFusCATed:
Try starting codeblocks with gdb or valgrind
from
http://forums.codeblocks.org/index.php?topic=13699.0;wap2 but it wont work.,
I tried to unistall and recompile codeblocks using:
Quote
make uninstall
&
 make clean
 make distclean
 make clean-bin
 make clean-zipfiles
& recompile using the tutorial from BUILD txt
but it seems nothing changes.
Here's the error message when i run codeblocks using the terminal:
Quote
(codeblocks:3222): GLib-GObject-WARNING **: cannot register existing type 'GtkPizza'

(codeblocks:3222): GLib-GObject-WARNING **: invalid cast from 'GtkPizza' to '<invalid>'

(codeblocks:3222): GLib-GObject-WARNING **: cannot register existing type 'GtkPizza'

(codeblocks:3222): GLib-GObject-WARNING **: invalid cast from 'GtkPizza' to '<invalid>'

(codeblocks:3222): GLib-GObject-WARNING **: cannot register existing type 'GtkPizza'

(codeblocks:3222): GLib-GObject-WARNING **: invalid cast from 'GtkPizza' to '<invalid>'

Anyone can help please?
Im using by the way Ubuntu 14.04, latest version of gcc and svn 9903 build.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re:
« Reply #1 on: September 06, 2014, 05:17:16 pm »
Did you run the update script?
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline threeS

  • Multiple posting newcomer
  • *
  • Posts: 36
Re: CodeBlocks crashes after installing HelloWOrld Pluigin
« Reply #2 on: September 06, 2014, 07:37:24 pm »
i run the update script
Quote
$ ./update_revision.sh
Using 'svn --xml info' to get the revision
Found revision: '9903' '2014-09-02 05:50:58'
but still the same.

When i look into the codeblocks logs, i got something like these:
Quote
...
Loading lexer_objc
Loading lexer_registry
Configured 0 tools
Scanning for plugins in /home/threes/.codeblocks/share/codeblocks/plugins
/home/threes/.codeblocks/share/codeblocks/plugins/SamplePlugin.so: not loaded (missing symbols?)
No plugin manifest file in resource: /home/threes/.codeblocks/share/codeblocks/testPlugin.zip
No plugin manifest file in resource: /home/threes/.codeblocks/share/codeblocks/SamplePlugin.zip
Loaded 1 plugins
Scanning for plugins in /usr/local/lib/codeblocks/plugins
No plugin manifest file in resource: /usr/local/share/codeblocks/wxsmith.zip
No plugin manifest file in resource: /usr/local/share/codeblocks/ReopenEditor.zip
No plugin manifest file in resource: /usr/local/share/codeblocks/scriptedwizard.zip
No plugin manifest file in resource: /usr/local/share/codeblocks/IncrementalSearch.zip
...

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: CodeBlocks crashes after installing HelloWOrld Pluigin
« Reply #3 on: September 06, 2014, 08:35:24 pm »
i run the update script
Quote
$ ./update_revision.sh
Using 'svn --xml info' to get the revision
Found revision: '9903' '2014-09-02 05:50:58'
but still the same.

When i look into the codeblocks logs, i got something like these:
Quote
...
Loading lexer_objc
Loading lexer_registry
Configured 0 tools
Scanning for plugins in /home/threes/.codeblocks/share/codeblocks/plugins
/home/threes/.codeblocks/share/codeblocks/plugins/SamplePlugin.so: not loaded (missing symbols?)
No plugin manifest file in resource: /home/threes/.codeblocks/share/codeblocks/testPlugin.zip
No plugin manifest file in resource: /home/threes/.codeblocks/share/codeblocks/SamplePlugin.zip
Loaded 1 plugins
Scanning for plugins in /usr/local/lib/codeblocks/plugins
No plugin manifest file in resource: /usr/local/share/codeblocks/wxsmith.zip
No plugin manifest file in resource: /usr/local/share/codeblocks/ReopenEditor.zip
No plugin manifest file in resource: /usr/local/share/codeblocks/scriptedwizard.zip
No plugin manifest file in resource: /usr/local/share/codeblocks/IncrementalSearch.zip
...
That's not the correct update-script (it does what the name says, it updates the revision in some build-files, so the svn-revisoin is known in the build C::B).
Try running the script named update in the src-folder.

Offline threeS

  • Multiple posting newcomer
  • *
  • Posts: 36
Re: CodeBlocks crashes after installing HelloWOrld Pluigin
« Reply #4 on: September 07, 2014, 04:32:04 pm »
Ah! sorry.,
Quote
Try running the script named update in the src-folder.

i run the update and these are the results.
Quote
threes@alyssa:~/codeblocks/src$ ./update
Updating Linux version.
Creating output directory tree
Compressing core UI resources
Compressing plugins UI resources
Packing core UI bitmaps
Packing plugins UI bitmaps
Copying files
cp: cannot stat ‘devel/codeblocks’: No such file or directory
cp: cannot stat ‘devel/*.so’: No such file or directory
cp: cannot stat ‘devel/share/codeblocks/plugins/*.so’: No such file or directory
Stripping debug info from output tree
strip: 'output/codeblocks': No such file
strip: 'output/*.so': No such file
strip: 'output/share/codeblocks/plugins/*.so': No such file
Creating launch-scripts

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: CodeBlocks crashes after installing HelloWOrld Pluigin
« Reply #5 on: September 07, 2014, 06:24:30 pm »
Sorry, you don't need this script, when building C::B with makefiles.
Does your self-build C::B runs correctly without the plugin ?

Try to start C::B from console with the -v option to get more informations.

Offline threeS

  • Multiple posting newcomer
  • *
  • Posts: 36
Re: CodeBlocks crashes after installing HelloWOrld Pluigin
« Reply #6 on: September 07, 2014, 06:44:55 pm »
Quote
Does your self-build C::B runs correctly without the plugin ?
At first actually, before I create that HelloWorld Plugin in the tutorial my C::B runs correctly and the other plugins runs since im using this
Quote
./configure --with-contrib-plugins=all

Quote
Try to start C::B from console with the -v option to get more informations.

When I run codeblocks -v in my terminal, it shows something like these:
Quote
$ codeblocks -v
Initialize EditColourSet .....
Initialize EditColourSet: done.
Loading menubar...
HelloWorld: loaded
HelloWorldPlugin plugin activated
Loading toolbar...
Initializing plugins...

(codeblocks:8083): GLib-GObject-WARNING **: cannot register existing type 'GtkPizza'
(codeblocks:8083): GLib-GObject-WARNING **: invalid cast from 'GtkPizza' to '<invalid>'
....
The C::B IDE looks the same on my attached image and something pops-up with a message:
Quote
Unable to open requested HTML document:/usr/local/share/codeblocks/start_here.zip#zip:start_here.html

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: CodeBlocks crashes after installing HelloWOrld Pluigin
« Reply #7 on: September 07, 2014, 07:01:51 pm »
Might be a misconfigured wxWidgets build.

Which linux distro do you use ?

I don't know any actual distro without (at least) wx2.8 packages.

Building wxWidgets yourself is normally not needed and can be errorprone.

Offline threeS

  • Multiple posting newcomer
  • *
  • Posts: 36
Re: CodeBlocks crashes after installing HelloWOrld Pluigin
« Reply #8 on: September 07, 2014, 07:20:54 pm »
Quote
Which linux distro do you use ?
I used UBUNTU 14.04 and using wxGTK-2.8.12.

I build the wxGTK on my own following
Quote
http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux
On Building wxWidgets

Anyway of building wxGTK?

Offline threeS

  • Multiple posting newcomer
  • *
  • Posts: 36
Re: CodeBlocks crashes after installing HelloWOrld Pluigin
« Reply #9 on: September 07, 2014, 07:24:39 pm »
Another thing.
is there any possible way to remove the
Quote
HelloWorldPlugin plugin activated
in
Quote
$ codeblocks -v
Initialize EditColourSet .....
Initialize EditColourSet: done.
Loading menubar...
HelloWorld: loaded
HelloWorldPlugin plugin activated
Loading toolbar...
Initializing plugins...

(codeblocks:8083): GLib-GObject-WARNING **: cannot register existing type 'GtkPizza'
(codeblocks:8083): GLib-GObject-WARNING **: invalid cast from 'GtkPizza' to '<invalid>'
....
since i cannot used the IDE because the functionalities are not functioning?
Because I suspected that, it is the cause of my C::B crashes.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: CodeBlocks crashes after installing HelloWOrld Pluigin
« Reply #10 on: September 07, 2014, 08:06:27 pm »
Most important (I think):
remove the whole self-installed wxGTK-stuff and use the system-libs !!!

Next: if possible install C::B in a folder below your home-folder, it's much easier to completely remove it.
This is not possible, if other users on your system shouöd use it.

You might tell pkg-config where to find the C::B-config files in this case.

Offline threeS

  • Multiple posting newcomer
  • *
  • Posts: 36
Re: [SOLVED] CodeBlocks crashes after installing HelloWOrld Pluigin
« Reply #11 on: September 10, 2014, 11:36:46 pm »
Good Day!

I just found out that the HelloWorldPlugin that i installed causes the crash, i manually remove the plugin in ../../share something location and it bring back my fine build codeblocks.,

Thank you to all who made there help through replies .
More Power guys!  :)

Blurred

  • Guest
Re: CodeBlocks crashes after installing HelloWOrld Pluigin
« Reply #12 on: September 11, 2014, 02:36:04 pm »
I am trying to develop a simple test plugin too. I installed codeblocks + codeblocks-contrib + wxwidgets2.8 using apt-get on Ubuntu 14.04 (it installs version 13.12). I have compiled and installed the HelloWorld successfully following the tutorial (correcting the lib prefix on the name before the build...). Nevertheless the installed plugin does not work. It does not print the message. It also blocks the execution of the plugin manager. The only solution is to remove the plugin from the .codeblocks folder and restart codeblocks.
When I run codeblocks from a terminal, I got the following message in the terminal after enabling the plugin in the plugin manager:

../src/common/event.cpp(1787): assert "m_clientDataType != wxClientData_Object" failed in DoGetClientData(): this window doesn't have void client data
HelloWorldPlugin plugin activated

Any idea about what is happening? I noticed also that the project creation procedure asks for the wxwidgets in the plugin creation, but it does not appear on the tutorial.

Best regards