Developer forums (C::B DEVELOPMENT STRICTLY!) > CodeCompletion redesign

cc-branch crashes on linux

<< < (6/9) > >>

Jenna:

--- Quote from: ollydbg on August 24, 2010, 03:00:45 pm ---
--- Quote from: jens on August 24, 2010, 11:04:17 am ---It's at least much slower.

--- End quote ---
compared with which?
As loaden said:
The conditional preprocessor and macro expansion takes a lot of time, also make cc get more precise tokens.


--- End quote ---
trunk (svn r6525 compiled with -O2)
not first time parsing, but several reparses to have as much as possible in OS-buffer (debian 64-bit with 4 GB memory)

--- Code: ---Parsing stage done (1521 total parsed files, 50655 tokens in 0 minute(s), 2.924 seconds).
...
Parsing stage done (1521 total parsed files, 50655 tokens in 0 minute(s), 2.680 seconds).

--- End code ---

cc-branch (svnr6524)

--- Code: ---Project 'Code::Blocks - Unix' parsing stage done (1249 total parsed files, 66373 tokens in 0 minute(s), 6.697 seconds).
...
Project 'Code::Blocks - Unix' parsing stage done (1249 total parsed files, 66373 tokens in 0 minute(s), 6.659 seconds).

--- End code ---

cc-branch (svnr6524 codecompletion-plugin compiled with -O2)

--- Code: ---Project 'Code::Blocks - Unix' parsing stage done (1249 total parsed files, 66373 tokens in 0 minute(s), 3.012 seconds).
...
Project 'Code::Blocks - Unix' parsing stage done (1249 total parsed files, 66373 tokens in 0 minute(s), 3.019 seconds).

--- End code ---

It looks like the optimization does the trick.
It's turned off by default in C::B project file (at least on linux), but turned on in automake-system.

But it still feels slower, the cause might be the much greater amount of tokens that have to be added to symbols-browser.

killerbot:
hi, the patch has fixed the crash, but now I get a crash whe nCB closes (again when we having been switching between a non project file).
This is a stack trace :

--- Code: ---  <stack>
    <frame level="0"/>
    <frame level="1" function="TextCtrlLogger::Append(wxString const&amp;, Logger::level)" offset="00000064"/>
    <frame level="2" function="NativeParser::ClearParsers()" offset="000000b3"/>
    <frame level="3" function="CodeCompletion::OnRelease(bool)" offset="0000003f"/>
    <frame level="4" function="cbPlugin::Release(bool)" offset="00000065"/>
    <frame level="5" function="PluginManager::DetachPlugin(cbPlugin*)" offset="00000043"/>
    <frame level="6" function="PluginManager::UnloadPlugin(cbPlugin*)" offset="0000001a"/>
    <frame level="7" function="PluginManager::UnloadAllPlugins()" offset="00000023"/>
    <frame level="8" function="PluginManager::~PluginManager()" offset="00000022"/>
    <frame level="9" function="PluginManager::~PluginManager()" offset="00000009"/>
    <frame level="10" function="Manager::Shutdown()" offset="00000076"/>
  </stack>

--- End code ---

EDIT : I tried this 3 times, each time crash, but only once the rpt xml file contained a stack trace, the other times only a list of modules.

MortenMacFly:

--- Quote from: killerbot on August 24, 2010, 08:25:42 pm ---hi, the patch has fixed the crash, but now I get a crash whe nCB closes (again when we having been switching between a non project file).
This is a stack trace :

--- Code: ---  <stack>
    <frame level="0"/>
    <frame level="1" function="TextCtrlLogger::Append(wxString const&amp;, Logger::level)" offset="00000064"/>
    <frame level="2" function="NativeParser::ClearParsers()" offset="000000b3"/>
    <frame level="3" function="CodeCompletion::OnRelease(bool)" offset="0000003f"/>
    <frame level="4" function="cbPlugin::Release(bool)" offset="00000065"/>
    <frame level="5" function="PluginManager::DetachPlugin(cbPlugin*)" offset="00000043"/>
    <frame level="6" function="PluginManager::UnloadPlugin(cbPlugin*)" offset="0000001a"/>
    <frame level="7" function="PluginManager::UnloadAllPlugins()" offset="00000023"/>
    <frame level="8" function="PluginManager::~PluginManager()" offset="00000022"/>
    <frame level="9" function="PluginManager::~PluginManager()" offset="00000009"/>
    <frame level="10" function="Manager::Shutdown()" offset="00000076"/>
  </stack>

--- End code ---

--- End quote ---
In ClearParsers() which is also called from the destructor there is an logger output but no check if the app is shutting down. So the output to the log fails. This can be fixed by either just removing this log message or checking if C::B shuts down and if so, not posting anything to the logger.

MortenMacFly:

--- Quote from: MortenMacFly on August 24, 2010, 08:31:06 pm ---In ClearParsers() which is also called from the destructor there is an logger output but no check if the app is shutting down. So the output to the log fails. This can be fixed by either just removing this log message or checking if C::B shuts down and if so, not posting anything to the logger.

--- End quote ---
Wait a sec... even worse! TextCtrlLogger derives from Loggers which has a virtual destructor, but TextCtrlLogger does not implement a destructor. Thus the control of the TextCtrlLogger does not get cleared properly (most likely). I wonder why the compiler does not complain about the missing implementation of the destructor... or am I missing something (it's late and I had a long day...).

BTW: All sanity checks in the TextCtrlLogger are useless therefore...?!

Loaden:

--- Quote from: MortenMacFly on August 24, 2010, 08:31:06 pm ---
--- Quote from: killerbot on August 24, 2010, 08:25:42 pm ---hi, the patch has fixed the crash, but now I get a crash whe nCB closes (again when we having been switching between a non project file).
This is a stack trace :

--- Code: ---  <stack>
    <frame level="0"/>
    <frame level="1" function="TextCtrlLogger::Append(wxString const&amp;, Logger::level)" offset="00000064"/>
    <frame level="2" function="NativeParser::ClearParsers()" offset="000000b3"/>
    <frame level="3" function="CodeCompletion::OnRelease(bool)" offset="0000003f"/>
    <frame level="4" function="cbPlugin::Release(bool)" offset="00000065"/>
    <frame level="5" function="PluginManager::DetachPlugin(cbPlugin*)" offset="00000043"/>
    <frame level="6" function="PluginManager::UnloadPlugin(cbPlugin*)" offset="0000001a"/>
    <frame level="7" function="PluginManager::UnloadAllPlugins()" offset="00000023"/>
    <frame level="8" function="PluginManager::~PluginManager()" offset="00000022"/>
    <frame level="9" function="PluginManager::~PluginManager()" offset="00000009"/>
    <frame level="10" function="Manager::Shutdown()" offset="00000076"/>
  </stack>

--- End code ---

--- End quote ---
In ClearParsers() which is also called from the destructor there is an logger output but no check if the app is shutting down. So the output to the log fails. This can be fixed by either just removing this log message or checking if C::B shuts down and if so, not posting anything to the logger.

--- End quote ---
I personally think that not CC bug.
We need find the reason?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version