Author Topic: CC makes cb hang  (Read 24851 times)

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5491
CC makes cb hang
« on: July 19, 2011, 09:58:44 am »
with one of the latest changes in CC, CB now always hangs on a project that used to work ok.

I have minimized the project to the below code snippet.

Steps to reproduce :
1) create a console project (C++)
2) open its main.cpp
3) replace the main.cpp content by :
Code
#include "boost/filesystem.hpp"


void Copy()
{
boost::filesystem::copy_directory("FooDir", "BarDir");
}

int main()
{
Copy();
return 0;
}
---> all done on linux, make sure you have boost installed somewhere
4) put your cursor just past "boost::filesystem' ===> type '3'   ===> hangs

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: CC makes cb hang
« Reply #1 on: July 19, 2011, 10:40:38 am »
Is this with the debugger's branch?
Because the latest two CC commits are not in the branch and they should fix some random threading problems.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5491
Re: CC makes cb hang
« Reply #2 on: July 19, 2011, 10:42:30 am »
no, just on trunk [I have some machines at home on trunk ;-)  ]

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5915
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: CC makes cb hang
« Reply #3 on: July 19, 2011, 10:58:28 am »
Sounds be a big bug, I will check it. I will tell Loaden too.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline Loaden

  • Lives here!
  • ****
  • Posts: 1014
Re: CC makes cb hang
« Reply #4 on: July 19, 2011, 01:25:57 pm »
Fixed in rev7288. :)

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5491
Re: CC makes cb hang
« Reply #5 on: July 19, 2011, 01:37:19 pm »
I can confirm it is fixed :-)  well done.

Offline ironhead

  • Almost regular
  • **
  • Posts: 210
Re: CC makes cb hang
« Reply #6 on: July 19, 2011, 01:50:12 pm »
Any chance we can get a new nightly?  It looks like a lot of the CC hangs have been addressed and it would be really nice to be able to take advantage of them.  ;)

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5491
Re: CC makes cb hang
« Reply #7 on: July 19, 2011, 02:16:16 pm »
I will kick one out tomorrow.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5915
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: CC makes cb hang
« Reply #8 on: July 19, 2011, 02:24:36 pm »
Fixed in rev7288. :)
great job loaden!!!!! so Fast!!!
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: CC makes cb hang
« Reply #9 on: July 19, 2011, 02:30:55 pm »
Also another sync to the debugger's branch will be handy, so I can test the fixes, too...
Morten, Jens can you do it?

(Jens, if you tell me the exact commands needed to do the merge, I won't bother you any more:) )
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5491
Re: CC makes cb hang
« Reply #10 on: July 19, 2011, 03:48:49 pm »
Also another sync to the debugger's branch will be handy, so I can test the fixes, too...
Morten, Jens can you do it?

(Jens, if you tell me the exact commands needed to do the merge, I won't bother you any more:) )

send those commands to me too please ;-)

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: CC makes cb hang
« Reply #11 on: July 19, 2011, 04:19:44 pm »
Also another sync to the debugger's branch will be handy, so I can test the fixes, too...
Morten, Jens can you do it?

(Jens, if you tell me the exact commands needed to do the merge, I won't bother you any more:) )

send those commands to me too please ;-)
This is how I do it on commandline in linux:

  • cd [path/to/my/debugger-branch/copy]
  • make sure it is clean and uptodate
  • run: svn merge -r [first revision to be merged]:[last revision to be merged] svn+ssh://jenslody@svn.berlios.de/svnroot/repos/codeblocks/trunk . (note the trailing dot [with a blank before it])
  • commit changes with comment "* debugger_branch: merged with trunk (trunk to debugger_branch)"

The first revision to be merged is normally the revision after of (!) the last merge, the last revision to be merged is normally HEAD, the url has to be fixed to fit your needs.
Instead of the url you can use the root-folder of your working-copy of trunk.
Instead of the trailing dot you can use the path to your working copy of the debugger-branch (if you are not inside its root-folder).
To see what will be merged (instead of really doing it), you can use "--dry-run" as for many other svn-commands.

EDIT:
corrected incorrect and dangerous instruction !
« Last Edit: August 15, 2011, 02:46:36 pm by jens »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: CC makes cb hang
« Reply #12 on: July 19, 2011, 11:04:47 pm »
Thanks a lot Jens,
I've added this precious info to the wiki -> http://wiki.codeblocks.org/index.php?title=Version_control
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: CC makes cb hang
« Reply #13 on: August 15, 2011, 02:50:27 pm »
:oops: I found a serious error in my instructions two posts above :
the first revision to be merged has to be the reviosion of last merge !!

This means all my merges (and the merges done by others with this instruction) are most likely incorrect !!

I will check them all and try to correct them !
Exactly I check all merges done by me, oBFusCATed and killerbot.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: CC makes cb hang
« Reply #14 on: August 15, 2011, 04:20:14 pm »
This means all my merges (and the merges done by others with this instruction) are most likely incorrect !!

I will check them all and try to correct them !
Exactly I check all merges done by me, oBFusCATed and killerbot.

Seems like only four files have been involved.

Should be fixed now.

Sorry for the inconvenience.