Author Topic: Constant hang with 7763  (Read 9505 times)

Offline ironhead

  • Almost regular
  • **
  • Posts: 210
Constant hang with 7763
« on: February 01, 2012, 10:45:06 pm »
I've updated to the latest svn version (7763 as of this post) and it constantly hangs when CC is supposed to kick in (i.e. on the 3rd character).  I've done a '--debug-log-to-file' but since I have to kill the codeblocks.exe process, it's a truncated file (at 4096 bytes).  Is this a known issue?

I'm running codeblocks self compiled using MinGW gcc 4.6.2 on Windows XP Pro SP3.
« Last Edit: February 02, 2012, 02:15:27 am by ironhead »

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5280
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Constant hang with 7763
« Reply #1 on: February 02, 2012, 02:35:07 am »
I can confirm it hangs (Even in a very simple tiny code snippet)

I try to find the reason, but no success.

1, I debug it under gdb, and when it hangs, I pause the gdb, and check all the threads and call stack, I only find one:

One thread is halted in:
[debug]#5  0x65ed5270 in CodeCompletion::CodeComplete (this=0x3b9f458) at E:\code\cb\cb_trunk\src\plugins\codecompletion\codecompletion.cpp:968
Here is a cs enter, so the main GUI hangs.
The other thread has no useful information.

2, I try to enable the "#define CC_ENABLE_LOCKER_TRACK", and add '--debug-log-to-file', but when viewing the debug log file, I can't find anything wrong, the last message is:
Code: [Select]
....
s_TokensTreeCritical.Enter() : ExpandItem(), E:\code\cb\cb_trunk\src\plugins\codecompletion\classbrowserbuilderthread.cpp, 1040
s_TokensTreeCritical.Entered() : ExpandItem(), E:\code\cb\cb_trunk\src\plugins\codecompletion\classbrowserbuilderthread.cpp, 1040
s_TokensTreeCritical.Leave() : ExpandItem(), E:\code\cb\cb_trunk\src\plugins\codecompletion\classbrowserbuilderthre

The ugly thing is: The main GUI hangs, so the cc_logger does not work anymore. :(

« Last Edit: February 02, 2012, 03:03:57 am by ollydbg »
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 jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Constant hang with 7763
« Reply #2 on: February 02, 2012, 06:30:59 am »
It does not hang here, neither on linux nor win7.

Did you do a real clean rebuild. I mean manually cleaned (devel, output, .objs and include/*.gch) to be absolutely sure no artefacts of a prior build are left ?
Or a fresh and clean svn checkout ?

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9606
Re: Constant hang with 7763
« Reply #3 on: February 02, 2012, 07:40:25 am »
It does not hang here, neither on linux nor win7.
Not here, too. You can try to add a #define CC_ENABLE_LOCKER_ASSERT in the compiler options of the CC target and re-compile this plugin. If it still hangs, it should not be the lockers.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5280
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Constant hang with 7763
« Reply #4 on: February 02, 2012, 08:03:46 am »
I did a clean build. The strange thing is:
if I run the new build c::b under c::b, then the new c::b will hang.
If I run the new c::b separately, it does not hang.

EDIT both cases hang.
« Last Edit: February 02, 2012, 08:25:14 am by ollydbg »
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 ironhead

  • Almost regular
  • **
  • Posts: 210
Re: Constant hang with 7763
« Reply #5 on: February 02, 2012, 02:20:03 pm »
It does not hang here, neither on linux nor win7.

Did you do a real clean rebuild. I mean manually cleaned (devel, output, .objs and include/*.gch) to be absolutely sure no artefacts of a prior build are left ?
Or a fresh and clean svn checkout ?

Odd, it hangs all the time for me.  This is on a fresh svn checkout (no previous builds done in the local repository).

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5280
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Constant hang with 7763
« Reply #6 on: February 02, 2012, 03:16:52 pm »
You can try to add a #define CC_ENABLE_LOCKER_ASSERT in the compiler options of the CC target and re-compile this plugin. If it still hangs, it should not be the lockers.
It still hangs here(Windows XP) if I enable CC_ENABLE_LOCKER_ASSERT, so where is bug come from???

I fix a build error when enable CC_ENABLE_LOCKER_ASSERT in rev 7765.
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 ironhead

  • Almost regular
  • **
  • Posts: 210
Re: Constant hang with 7763
« Reply #7 on: February 02, 2012, 04:29:02 pm »
I defined both CC_ENABLE_LOCKER_ASSERT and CC_ENABLE_LOCKER_TRACK in the code-completion target, executed a complete rebuild (after updating to 7765) and now C::B crashes whenever I load a project file.  I've attached the .RPT file for reference.

edit: I removed CC_ENABLE_LOCKER_TRACK and I'm now back to the original behaviour, in that C::B hangs when the CC list is supposed to show (this is with CC_ENABLE_LOCKER_ASSERT defined).
« Last Edit: February 02, 2012, 05:01:06 pm by ironhead »

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9606
Re: Constant hang with 7763
« Reply #8 on: February 03, 2012, 12:36:08 am »
I defined both CC_ENABLE_LOCKER_ASSERT and CC_ENABLE_LOCKER_TRACK in the code-completion target, executed a complete rebuild (after updating to 7765) and now C::B crashes whenever I load a project file.  I've attached the .RPT file for reference.
OK - I was able to reproduce and fixed that. In addition I also fixed the permanent ClassBrowserBuilderThread lock-up. However, for the latter I need some more time as there is one annoyance, so I won't commit.

Please revert (only CC!) to r7658 (maybe r7723 works, too) to fix. CC on trunk is not stable atm.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline ironhead

  • Almost regular
  • **
  • Posts: 210
Re: Constant hang with 7763
« Reply #9 on: February 03, 2012, 01:23:13 am »
I can confirm that 7766 fixes the hang.  I look forward to testing the other fixes when they are ready. ;)

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5280
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Constant hang with 7763
« Reply #10 on: February 03, 2012, 02:19:59 am »
I defined both CC_ENABLE_LOCKER_ASSERT and CC_ENABLE_LOCKER_TRACK in the code-completion target, executed a complete rebuild (after updating to 7765) and now C::B crashes whenever I load a project file.  I've attached the .RPT file for reference.
OK - I was able to reproduce and fixed that.
Confirm the fix, thanks!!!
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.