News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

CC: m_NeedMarkFileAsLocal never completes on script-only projects

Started by Alpha, September 24, 2014, 10:13:21 PM

Previous topic - Next topic

Alpha

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?

ollydbg

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.

Alpha

Thanks, I will see if that gives me enough of a lead to be able to track the bug down.