Author Topic: Open projects from Nautilus freezes C::B  (Read 7176 times)

Offline Dee

  • Multiple posting newcomer
  • *
  • Posts: 28
Open projects from Nautilus freezes C::B
« on: April 27, 2006, 01:45:56 pm »
Hello,

I use the latest nightly build rev2387 for Ubuntu 5.10, so I use the deb provided by Michael.

Since rev22-something (maybe before) C::B freezes if I want to open a project by double-clicking in Nautlius on the cbp-file. C::B opens and loads and loads and loads... The CPU usage is up to 100% but nothing is shown after 15 minutes of waiting.

If I first open C::B and then select Projects -> Open, everything is fine, the project opens as normal.

Can somebody reproduce this behaviour? What can I do to find the error?

Greetings, Dee

PS: If this a known bug I'm sorry but I haven't found it in the forum. (Maybe most people don't open double-click on files...)

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Open projects from Nautilus freezes C::B
« Reply #1 on: April 27, 2006, 03:00:01 pm »
Quote
Since rev22-something (maybe before) C::B freezes
Hmm... it would have been good if you had told us at that time. We're currently at 238x, so more than 100 (almost 200) revisions lie between...

Now it will be quite hard (if possible at all) to find out what code change may have caused this behaviour.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline Dee

  • Multiple posting newcomer
  • *
  • Posts: 28
Re: Open projects from Nautilus freezes C::B
« Reply #2 on: April 27, 2006, 03:12:30 pm »
Hm, sorry... I have never used the nightly build since last week. And I just grab some old version to test this... So I knew this bug only a week... The latest version I can get is rev2218 from 19.03.06. If the BerliOS-servers are available again I will test it with this package.

Greetings, Dee
« Last Edit: April 27, 2006, 03:17:52 pm by Dee »

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: Open projects from Nautilus freezes C::B
« Reply #3 on: April 27, 2006, 07:27:28 pm »
Hm, sorry... I have never used the nightly build since last week. And I just grab some old version to test this... So I knew this bug only a week... The latest version I can get is rev2218 from 19.03.06. If the BerliOS-servers are available again I will test it with this package.

Hello,

I have tried with rev2387 (.deb package) and there is no problems. I click on a C::B project file, C::B started and open the project (eventually it complains if the project use an old format :)).

Are you sure that the problem is related to C::B? MAy be you can try to start C::B with gdb, get the backtrace and post it.

Bes wishes,
Michael

IMHO, the nightly builds subforum is not the most suitable place to put such a thread. I think that the Help subforum would be better.

Offline Dee

  • Multiple posting newcomer
  • *
  • Posts: 28
Re: Open projects from Nautilus freezes C::B
« Reply #4 on: April 27, 2006, 07:47:42 pm »
Quote
eventually it complains if the project use an old format
To be sure that's not the case, I have created a new project in this C::B version and saved it to disk.

Quote
Are you sure that the problem is related to C::B?
Yes, I think so. It may be something like the Environment->Settings crash that only appear on a few computers...

Quote
May be you can try to start C::B with gdb, get the backtrace and post it.
Unfortunately not... because the codeblocks process hangs I must kill it to go on. And then I can not get some backtrace... Or is there another way to use gdb when a process does not return normally? (I haven't used gdb not that much before.)

Quote
the nightly builds subforum is not the most suitable place to put such a thread. I think that the Help subforum would be better.
I thought because I use a nightly build it belongs here... If not, some mod could be so nice and move it to the right place?

Greetings, Dee

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: Open projects from Nautilus freezes C::B
« Reply #5 on: April 27, 2006, 08:10:07 pm »
Quote
Are you sure that the problem is related to C::B?
Yes, I think so. It may be something like the Environment->Settings crash that only appear on a few computers...

May be. But there must be a reason anyway. May be a conflict or a bad install and so on. Try with other C::B projects and see if you still have troubles.

Quote
May be you can try to start C::B with gdb, get the backtrace and post it.
Unfortunately not... because the codeblocks process hangs I must kill it to go on. And then I can not get some backtrace... Or is there another way to use gdb when a process does not return normally? (I haven't used gdb not that much before.)

Ok, I see. Unfortunaly I am not an expert too. I use occasionally gdb and since not a lot of time.

Quote
the nightly builds subforum is not the most suitable place to put such a thread. I think that the Help subforum would be better.
I thought because I use a nightly build it belongs here... If not, some mod could be so nice and move it to the right place?

AFAIK, the nightly builds subforum should be used to annonce nightly builds. Users who have problems with a nightly build usually post their problems directly under the nightly build annoncement (but I do not know if this is the right way :roll:). I usually use the Help subforum when I have problems with SVN C::B.

Best wishes,
Michael

Offline Dee

  • Multiple posting newcomer
  • *
  • Posts: 28
Re: Open projects from Nautilus freezes C::B
« Reply #6 on: April 27, 2006, 08:35:40 pm »
Quote
May be a conflict or a bad install and so on.
Hm, I know the guy who give me the link to this deb... ;) (I mean it's your built I downloaded this morning.)

Quote
Try with other C::B projects and see if you still have troubles.
How many? I have created the simplest program I could ( or better I let create by C::B.)
Code: [Select]
#include <iostream>
int main()
{
std::cout << "Hello world!" << std::endl;
return 0;
}
and save it... It still hangs!

And it may be that some projects may work and some not. I haven't found any project that could be opened per double-click or from terminal with "codeblocks project.cbp". (Just tested three types...)

Greetings, Dee

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: Open projects from Nautilus freezes C::B
« Reply #7 on: April 27, 2006, 08:54:05 pm »
Quote
May be a conflict or a bad install and so on.
Hm, I know the guy who give me the link to this deb... ;) (I mean it's your built I downloaded this morning.)

ehmm....I did not mean specifically the .deb package :), but the packages you have installed in your system. May be your problem is local more then C::B related.

Quote
Try with other C::B projects and see if you still have troubles.
How many? I have created the simplest program I could ( or better I let create by C::B.)
Code: [Select]
#include <iostream>
int main()
{
std::cout << "Hello world!" << std::endl;
return 0;
}
and save it... It still hangs!

And it may be that some projects may work and some not. I haven't found any project that could be opened per double-click or from terminal with "codeblocks project.cbp". (Just tested three types...)

I attach here the small project I have used (is more or less useless code :)). Once you will get it, an admin should delete it for save bandwidth.

Best wishes,
Michael


[attachment deleted by admin]

Offline artoj

  • Almost regular
  • **
  • Posts: 206
  • Location: Supporting my team
    • http://ajonsson.kapsi.fi/
Re: Open projects from Nautilus freezes C::B
« Reply #8 on: April 27, 2006, 09:12:13 pm »
I can see this bug also. I cannot open a Console project made from File - New Project on Ubuntu Breezy.

I've tried opening the project from terminal and from Nautilus, in both cases C::B's UI hangs (no backtrace, no messages to console) and I've to issue "killall codeblocks" or Ctrl+C to close C::B.

The first revision where the test does not fail is 2263. All revisions from today to 2272 fail.

The test is following:
1. Remove all other C::B from Ubuntu, "sudo apt-get remove codeblocks". Remove old Console project.
2. Download .deb
3. Install .deb, "sudo dpkg -i ****.deb"
4. Launch C::B.
5. Create new Console project from File - New.
6. I created the project to the root of my home directory, "/home/arto". I named the project "console".
7. Check that the project was successfully created and close C::B.
8. Try to launch the project from terminal, "cd console;codeblocks console.cbp". It fails.
9. Try to launch the project from Nautilus. Right click the project file - select "Open with Code::Blocks IDE" (the .cbp is registered to C::B in my setup).

In step 8 and 9 revision 2263 succeedes, revision 2272 fails.

I'm using C::B through VMWare Player with Ubuntu virtualization file but this shouldn't cause any issues. Ubuntu Breezy has the latest patches installed and "wx-config --version" outputs "2.6.1".

I haven't touched the plugins, so they're all enabled.

@Dee, could you check revisions 2263 and 2272 and report your results.

There could be something that I'm doing wrong though because I'm just starting to use Ubuntu.

Offline Dee

  • Multiple posting newcomer
  • *
  • Posts: 28
Re: Open projects from Nautilus freezes C::B
« Reply #9 on: April 27, 2006, 09:47:03 pm »
@artoj: Very detailed description :) and yes, it's exactly the same here. 2263 can open the project files from Nautilus or as argument, 2272 not. So there must be a change somewhere... But please test Michaels file because:

@Michael: I have tested your project. If I open it I get some warning, that "Project file format is older (1.3) than the current format (1.4) ... [more text]". But the project opens (!) without hanging.
If I close C::B and let the project save to the new 1.4. format and try to open it now, C::B hangs again. So it has some problems with the new format there I think.

Edit: Hi hi... this is funny. I took a look into the project files of Michael. The only difference: <FileVersion major="1" minor="3"/> in the original version instead of <FileVersion major="1" minor="4"/> after saving the project file.

So I have open my project file and found the line <FileVersion major="1" minor="1"/> and changed it to <FileVersion major="1" minor="3"/>. And what should I say? I get the warning above because the file format is too old (Why don't I get this message with file format 1.1 ?) but the project opens without hanging....
The same happens if I change the minor version to a number greater than 4, maybe 5. It says that the project file is too new and may not be loaded correctly, but it opens without hanging.

artoj, could you test this?

I think this should help to find the bug... :)

Greetings, Dee
« Last Edit: April 27, 2006, 09:55:11 pm by Dee »

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: Open projects from Nautilus freezes C::B
« Reply #10 on: April 27, 2006, 09:52:21 pm »
@Michael: I have tested your project. If I open it I get some warning, that "Project file format is older (1.3) than the current format (1.4) ... [more text]". But the project opens (!) without hanging.
If I close C::B and let the project save to the new 1.4. format and try to open it now, C::B hangs again. So it has some problems with the new format there I think.

That's strange :?. The project was in format 1.3 when I tested it the first time, but then I saved it, so it should have been in 1.4 when I upload it on this forum.

I will re-check. [EDIT]: It was still in format 1.3. Hmmm, it seems that I have some troubles with the .deb package and my old rev2133. I will remove it.

[EDIT2]: I have completly removed rev2133 (sigh my first Ubuntu C::B :cry:) and retry with the project as you did, but I get no hang. C::B (.deb package rev2387) just loads the project as it did before.

Best wishes,
Michael
« Last Edit: April 27, 2006, 10:52:13 pm by Michael »

Offline artoj

  • Almost regular
  • **
  • Posts: 206
  • Location: Supporting my team
    • http://ajonsson.kapsi.fi/
Re: Open projects from Nautilus freezes C::B
« Reply #11 on: April 27, 2006, 10:28:39 pm »
So I have open my project file and found the line <FileVersion major="1" minor="1"/> and changed it to <FileVersion major="1" minor="3"/>. And what should I say? I get the warning above because the file format is too old (Why don't I get this message with file format 1.1 ?) but the project opens without hanging....
The same happens if I change the minor version to a number greater than 4, maybe 5. It says that the project file is too new and may not be loaded correctly, but it opens without hanging.

artoj, could you test this?

Yup, I can see this also. In Michael's project:

2272

minor = 4 -> hang
minor = 3 -> conversion dialog, no hang

2263

minor = 4 -> no problems
minor = 3 -> conversion dialog, no problems

The bug should be pretty easy to find, just compare revisions 2263 and 2272 from Subversion.

Edit: and one thing before I forget it:

Code: [Select]
diff console_2263/console_2263.cbp console_2272/console_2272.cbp
outputs:

Code: [Select]
5c5
<               <Option title="console_2263" />
---
>               <Option title="console_2272" />
10c10
<                               <Option output="console_2263" />
---
>                               <Option output="console_2272" />
« Last Edit: April 27, 2006, 10:36:42 pm by artoj »

Offline takeshi miya

  • Lives here!
  • ****
  • Posts: 1487
Re: Open projects from Nautilus freezes C::B
« Reply #12 on: April 27, 2006, 11:16:47 pm »
Revision 2268 seems totally suspicious. :P

Offline Dee

  • Multiple posting newcomer
  • *
  • Posts: 28
Re: Open projects from Nautilus freezes C::B
« Reply #13 on: May 11, 2006, 09:03:15 pm »
Anything new here?

Greetings, Dee