Author Topic: CC: m_NeedMarkFileAsLocal never completes on script-only projects  (Read 4116 times)

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
CC: m_NeedMarkFileAsLocal never completes on script-only projects
« on: September 24, 2014, 10:13:21 pm »
Opening a project that contains no C/C++ code causes CC to hang, complaining "still need to mark files as local".  I tried debugging a little, but this is an unfamiliar section of CC to me, so maybe another pair of eyes would help?

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5915
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: CC: m_NeedMarkFileAsLocal never completes on script-only projects
« Reply #1 on: September 26, 2014, 10:24:15 am »
I create a minimal sample project(no compiler, only contains a script), but I can't reproduce.

Basically there are three kinds of things when a project is loaded:
1, get the gcc's preprocessor directives (by calling the  gcc -dM -E), but this only happens the compiler is valid.
2, get the files
After parsing the above two(parsing is done in thread pool), here comes the step 3:
3, run a task to mark some tokens in the TokenTree as local.

I believe in your case, both 1 and 2 are empty, so we don't have any chance to run step 3, so the m_NeedMarkFileAsLocal never get chance to reset. :)

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 Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: CC: m_NeedMarkFileAsLocal never completes on script-only projects
« Reply #2 on: September 29, 2014, 06:12:54 am »
Thanks, I will see if that gives me enough of a lead to be able to track the bug down.