Author Topic: codeblocks crash and burn on 64-bit ubuntu  (Read 16906 times)

Offline bootstrap

  • Multiple posting newcomer
  • *
  • Posts: 64
codeblocks crash and burn on 64-bit ubuntu
« on: September 10, 2013, 05:45:41 am »
I probably did something inappropriate, since I never have fully understood the subtle issues of linux packages, but I'll mention this problem anyway since it seems a bit unfriendly to me.

I had the /boot directory on my 64-bit ubuntu v12.04 disk get smashed, and had to buy a new hard drive and install a fresh version of 64-bit ubuntu v12.04 to re-create my system (all other partitions, directory structures and files are undamaged).

After I fresh installed ubuntu on the new disk, I first fully updated ubuntu with the ubuntu update application, then installed all the applications I normally need, including codeblocks, with the ubuntu software center.

Of course that is an old version of codeblocks (10.04 if I remember the signon dialog correctly), but when I ran codeblocks just to verify it worked, the codeblocks IDE appeared and everything seemed to be fine (it detected my gcc compiler which I then set as default compiler).

Then I closed codeblocks and entered the following lines per a document I created about one year ago that lists the steps to install and configure ubuntu linux:

sudo add-apt-repository ppa:/pasgui/ppa
sudo apt-get update
sudo apt-get install codeblocks

That process completed correctly... as far as I could tell from the text in the terminal window.

Then I tried to run codeblocks, but codeblocks crashed and generated an error dialog saying something about file codeblocks.xml.  There was also another dialog displayed that said something like "do you want to adopt the new default codeblocks configurations?".  The crash happens immediately, before I can select "yes" or "no".

I started codeblocks several times, and this happens every time.

Then I removed codeblocks with the ubuntu software center.

Then I entered those 3 text lines again:

sudo add-apt-repository ppa:/pasgui/ppa
sudo apt-get update
sudo apt-get install codeblocks

Then I ran codeblocks and... presto chango... seems to work.  At least it fully signs on and everything, though I haven't copied my "project" directory from the other disk and tried to run things.

I'm not sure why having the default codeblocks already installed before adding the repository would cause so much trouble.  Especially since I'm fairly sure I had the default (ubuntu software center) version of codeblocks installed before I executed those 3 nightly update repository lines.  But now that clearly causes a problem.

I assume I'm okay now, but thought I should mention this because it seems a bit strange this would happen, plus some others might unfortunately give up on codeblocks entirely before trying what I did.

Also, if what I did proves I'm a linux moron... please explain why.  I know I'm a moron, so you won't offend me, and I'd like to become a bit less of a moron if possible.  Thanks.

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: codeblocks crash and burn on 64-bit ubuntu
« Reply #1 on: September 11, 2013, 03:05:42 pm »
Two guesses:
1. The migration of your personal C::B settings from 10.04 to a newer version didnt work properly. A C::B bug.
2. Before your crash you were running a more recent release or nightly. Running 10.04 on settibgs created with a new version might have left those settings in an inconsistent state. Arguably a C::B bug, but you shouldnt expect a newer settings file to work, but causing a crash isnt good!

Unless this is easy to reproduce and isolate I donít think this will be high on anyone's fix list.

Offline bootstrap

  • Multiple posting newcomer
  • *
  • Posts: 64
Re: codeblocks crash and burn on 64-bit ubuntu
« Reply #2 on: September 12, 2013, 03:58:49 am »
Your #2 doesn't really come into play, because I hadn't even moved my project directory to the new system disk yet.  All I did was install codeblocks via the ubuntu software manager, start up codeblocks to make sure it ran, then closed codeblocks and continued installing other packages, including the ppa that deals with nightlies.

So I didn't even change any codeblocks settings (the defaults were probably created when I started it up), and I didn't create or open any projects.  The only codeblocks window that appeared was the usual codeblocks main window that asks whether to create a new project or open an existing one.  And there were no existing ones, since I hadn't even moved my project directory over to the disk yet.

Yeah, I figure nobody wants to deal with a minor bug like this.  Being that I never fully understood the subtle aspects of linux packages, I didn't know whether it was necessary or appropriate to install the nominal codeblocks application with the ubuntu software application before I enabled the ppa to install nightlies.

But I'm guessing there was no need for me to install the nominal codeblocks before enabling the ppa.  Probably programmers with more knowledge of packages would never have bothered installing the nominal codeblocks before the ppa, and thus they would never have experienced the problem.

Thanks.

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: codeblocks crash and burn on 64-bit ubuntu
« Reply #3 on: September 12, 2013, 03:06:13 pm »
Given that you have ruled out #2 I would have thought what you did should just work. The newer version should take priority over the old but it sounds like the upgrade process from old to new is not doing the same thing as removing the old and adding the new.

Maybe jens or one of the other linux packagers can weigh in on this.

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: codeblocks crash and burn on 64-bit ubuntu
« Reply #4 on: October 01, 2013, 11:26:01 pm »
Just a note on this. I recently upgraded CB using Pasgui's PPA on one of the Ubuntu 12.04 machines that I don't code on regularly. The upgrade went from a fairly old version to svn9156, and after I started up I had the same crash reported by the OP.

To work around this problem, I started in safe mode, enabled the compiler plugin, accepted the prompt to update compiler settings, quit, restarted CB and everything worked fine. So I think the problem was

1. The migration of your personal C::B settings [...] to a newer version didnt work properly. A C::B bug.