Code::Blocks Forums

User forums => Help => Topic started by: scott.deagan on February 12, 2017, 03:36:25 am

Title: Codeblocks not working well on Ubuntu 16.10 (keeps freezing)
Post by: scott.deagan on February 12, 2017, 03:36:25 am
I installed CodeBlocks on Ubuntu 16.10 using:

Code
sudo apt install codeblocks

When I start CodeBlocks and then create a new console application, the CodeBlocks IDE will freeze if I start clicking on menu options (such as SETTINGS -> COMPILER, or SETTINGS -> ENVIRONMENT). The freeze doesn't always happen on the first attempt, although many times it does. It's very easy to reproduce and happens quite often (making CodeBlocks virtually unusable for me on Ubuntu 16.10).

The version of CodeBlocks is 16.01 rev 10692.

Title: Re: Codeblocks not working well on Ubuntu 16.10 (keeps freezing)
Post by: oBFusCATed on February 12, 2017, 01:20:38 pm
Can you give us a backtrace for the crash/lockup?

See here https://wiki.ubuntu.com/Backtrace how to do it.
Title: Re: Codeblocks not working well on Ubuntu 16.10 (keeps freezing)
Post by: scott.deagan on February 12, 2017, 07:41:01 pm
Can you give us a backtrace for the crash/lockup?

See here https://wiki.ubuntu.com/Backtrace how to do it.

Hi oBFusCATed - I followed the instructions you linked to:

1. Turned off apport then rebooted.
2. Ran CodeBlocks via gdb as per the instructions.
3. Created a new console application called Test3.
4. Clicked on Settings | Environment.

Result: the environment dialog is displayed, but freezes (see attached screenshot).

Note: I have noticed that this freezing doesn't occur when no project is opened.

I'm going to perform a fresh install of Ubuntu 16.04 on a different computer and see if the problem still occurs.
Title: Re: Codeblocks not working well on Ubuntu 16.10 (keeps freezing)
Post by: yvesdm3000 on February 12, 2017, 07:46:51 pm
You should type "bt"  (withhout quotes) to show the backtrace in gdb

Yves
Title: Re: Codeblocks not working well on Ubuntu 16.10 (keeps freezing)
Post by: scott.deagan on February 12, 2017, 07:58:37 pm
Update: I have just tried to reproduce the problem on a laptop running Kubuntu 16.10, but was not able to - everything worked as expected.

I will try again on a clean install of Ubuntu 16.10 and a clean install of Ubuntu 16.04.
Title: Re: Codeblocks not working well on Ubuntu 16.10 (keeps freezing)
Post by: scott.deagan on February 12, 2017, 08:14:18 pm
You should type "bt"  (withhout quotes) to show the backtrace in gdb

Yves

Hi Yves - I have run "bt" within gdb as you instructed and have attached the results. This time, it froze on Settings | Compiler.

Title: Re: Codeblocks not working well on Ubuntu 16.10 (keeps freezing)
Post by: scott.deagan on February 12, 2017, 10:44:07 pm
I performed a clean install of Ubuntu 16.10, ran all the updates, then installed CodeBlocks. The problem persists, the gdb backtrace is attached.

Again, I was unable to reproduce the issue on Kubuntu 16.10.
Title: Re: Codeblocks not working well on Ubuntu 16.10 (keeps freezing)
Post by: BlueHazzard on February 12, 2017, 11:36:46 pm
Can you try to disable the symbol browser?
Before loading a project: Settings->Editor->Code Completion->Symbol browser->Disable symbol browser

Title: Re: Codeblocks not working well on Ubuntu 16.10 (keeps freezing)
Post by: scott.deagan on February 12, 2017, 11:50:14 pm
Can you try to disable the symbol browser?
Before loading a project: Settings->Editor->Code Completion->Symbol browser->Disable symbol browser

Tried disabling the symbol browser, the problem persists. I tried to BUILD | CLEAN the default console application, and it froze. I then did a killall codeblocks (seems to be the only way to close Code::Blocks when this issue occurs) and tried SETTINGS | ENVIRONMENT, and it froze again.
Title: Re: Codeblocks not working well on Ubuntu 16.10 (keeps freezing)
Post by: scott.deagan on February 13, 2017, 02:22:03 pm
I performed a clean install of Ubuntu 16.04.1 LTS, ran all the updates, then installed Code::Blocks from the repositories using:

Code
sudo apt install codeblocks

This installed Code::Blocks release 13.12 rev 9501.

Again, I created a new console application, opened the generated main.cpp file, then iteratively clicked through the SETTINGS menu options (Environment, Editor, Compiler, Debugger, Global Variables, Scripting...).

The gdb backtrace is attached.
Title: Re: Codeblocks not working well on Ubuntu 16.10 (keeps freezing)
Post by: nanyu on February 13, 2017, 03:00:35 pm
me too :
see :
  http://forums.codeblocks.org/index.php/topic,21739.0.html

(http://forums.codeblocks.org/index.php?action=dlattach;topic=21739.0;attach=8557;image)

1.  this bug was happen before one year ago.
2.  I have disabled all plugin.
2.  I didn't open or create new project. just launch c::b .
Title: Re: Codeblocks not working well on Ubuntu 16.10 (keeps freezing)
Post by: Jenna on February 13, 2017, 06:39:50 pm
I will set up  a vm with 16.10 and try to reproduce.
Title: Re: Codeblocks not working well on Ubuntu 16.10 (keeps freezing)
Post by: oBFusCATed on February 13, 2017, 08:18:02 pm
@scott.deagan: You've hit some of the nasty bugs, I have no idea how to fix :( There is an old discussion on the wx mailing list about this problem https://groups.google.com/forum/#!topic/wx-dev/r_QdyEzoM4I No time to read it fully to find out if they've found a solution, probably not.
Title: Re: Codeblocks not working well on Ubuntu 16.10 (keeps freezing)
Post by: BlueHazzard on February 14, 2017, 03:29:30 pm
can you give more info why you think their problem is related to this mailing list entry? As far as i can see it handles only the clipboard?
And why is this error only on ubuntu and not on mint or other debian based systems? I tried ubuntu in a vm and it seems that wxWidgets has more problems on ubuntu.. I got many repaint issues (toolbar disappearing, borders not drawn correctly) I used a fresh build of wx3.1 with gtk3 (i tested only a few minutes, don't have time to investigate there at the moment)...
Title: Re: Codeblocks not working well on Ubuntu 16.10 (keeps freezing)
Post by: Jenna on February 14, 2017, 11:11:23 pm
I just tried on ubuntu 16.10, self-compiled C::B from trunk.
Compiled against system wxWidgets (3.02) and don't have visual issues (except the cursors over the toolbat-grips, which is known) and no crashes.
Symbolsbrowser is active and I currently compile the wx30 unix workspace.

Which DE do you use ?
The (in my opinion) nearly unusable unity ?

I tested it with gnome-shell and if that makes the difference, the ubuntu devs have created a pretty broken desktop environment.
Title: Re: Codeblocks not working well on Ubuntu 16.10 (keeps freezing)
Post by: BlueHazzard on February 15, 2017, 08:06:48 pm
i used ubuntu out of the box, so unitiy?
terrible user interface, but it seems to be quite popular (at least the most new linux user i see use ubuntu with unitiy. Funny how compiz used 15% cpu 30% of the runtime ^^ ( i used a not so performant (1 cpu no gpu)  vm)
Title: Re: Codeblocks not working well on Ubuntu 16.10 (keeps freezing)
Post by: oBFusCATed on February 15, 2017, 08:38:56 pm
can you give more info why you think their problem is related to this mailing list entry?
Is this an answer to my post?
Title: Re: Codeblocks not working well on Ubuntu 16.10 (keeps freezing)
Post by: BlueHazzard on February 15, 2017, 08:57:41 pm
yes
Title: Re: Codeblocks not working well on Ubuntu 16.10 (keeps freezing)
Post by: oBFusCATed on February 15, 2017, 09:09:10 pm
Because I see clipboard problem sometimes. Also I see a freeze caused by the clipboard doing wxyield just a minute ago. Very annoying.
Title: Re: Codeblocks not working well on Ubuntu 16.10 (keeps freezing)
Post by: yvesdm3000 on February 15, 2017, 11:06:35 pm
i used ubuntu out of the box, so unitiy?
terrible user interface, but it seems to be quite popular (at least the most new linux user i see use ubuntu with unitiy. Funny how compiz used 15% cpu 30% of the runtime ^^ ( i used a not so performant (1 cpu no gpu)  vm)
Unity and Compiz uses a lot of OpenGL code and is sluggish as hell in a VM since it has to fall back on a software implementation. That's why you see such high cpu load.
Some VM implementations allow some sort of OpenGL passthru that accelerates it a lot but is very often buggy...

Yves
Title: Re: Codeblocks not working well on Ubuntu 16.10 (keeps freezing)
Post by: dmoore on February 18, 2017, 12:04:58 am
Have you tried the daily PPA?

https://launchpad.net/~codeblocks-devs/+archive/ubuntu/daily
Title: Re: Codeblocks not working well on Ubuntu 16.10 (keeps freezing)
Post by: nanyu on February 24, 2017, 04:27:17 pm
Have you tried the daily PPA?

https://launchpad.net/~codeblocks-devs/+archive/ubuntu/daily

I have tried it.  have the bug too.
Title: Re: Codeblocks not working well on Ubuntu 16.10 (keeps freezing)
Post by: nanyu on March 12, 2017, 07:37:35 pm
I have try run code::blocks with sudo, l
sudo codeblocks
AND everything OK! the UI didn't freezing now .
===========================

Can you give us a backtrace for the crash/lockup?

See here https://wiki.ubuntu.com/Backtrace how to do it.

Hi oBFusCATed - I followed the instructions you linked to:

1. Turned off apport then rebooted.
2. Ran CodeBlocks via gdb as per the instructions.
3. Created a new console application called Test3.
4. Clicked on Settings | Environment.

Result: the environment dialog is displayed, but freezes (see attached screenshot).

Note: I have noticed that this freezing doesn't occur when no project is opened.

I'm going to perform a fresh install of Ubuntu 16.04 on a different computer and see if the problem still occurs.
Title: Re: Codeblocks not working well on Ubuntu 16.10 (keeps freezing)
Post by: BlueHazzard on March 12, 2017, 09:12:47 pm
could this be caused by the file browser plugin?

running codeblocks as root is not the best idea...
Title: Re: Codeblocks not working well on Ubuntu 16.10 (keeps freezing)
Post by: oBFusCATed on March 13, 2017, 02:06:39 am
I have try run code::blocks with sudo, l
sudo codeblocks
AND everything OK! the UI didn't freezing now .

Are you sure there isn't something in the settings that is different between the two users? Can you try to rename ~/.config/codeblocks to something just for test?
Title: Re: Codeblocks not working well on Ubuntu 16.10 (keeps freezing)
Post by: vboeva on January 23, 2018, 02:23:27 pm
Have you tried the daily PPA?

https://launchpad.net/~codeblocks-devs/+archive/ubuntu/daily

This helped me for the same issue. I have uninstalled code blocks installed with get apt and used PPA. Now it works perfectly.