#include <>
I am using own build of Code::Blocks for ALT Linux, SVN 6900 and SVN 6846.Cannot reproduce - works as expected on Windows. However, the list it shows includes a lot folders that might be questionable... i.e. folders above the compiler directories?!
NAMESPACE_BEGIN(CryptoPP) -> namespace CryptoPP {
<NAMESPACE_BEGIN(CryptoPP)>
<![CDATA[namespace CryptoPP {]]>
</NAMESPACE_BEGIN(CryptoPP)>
Cannot reproduce - works as expected on Windows.
Cannot reproduce - works as expected on Windows.
On Windows I can't reproduce too.
Cannot reproduce - works as expected on Windows.
On Windows I can't reproduce too.
Works here (more or less).
After the closing bracket, C::B uses 125 to 138 % of CPU (Core2Duo) and about 1.2 GB of memory, but after some time (about 5-10 sec) the CPU and memory usage is normal again and it shows me a bunch of preprocessor symbols in the symbols browser (even if there is no valid include).
EDIT:
It's still open and memory usage increases again.
System starts to become unresponsive, so it surely is in an endless-loop and eats up more an more memory.
Will see if I can debug it later.
Nice catch, the include patch auto completion feature is implemented by Loaden, hope he can fix it. :D :DCannot reproduce - works as expected on Windows.
On Windows I can't reproduce too.
Works here (more or less).
After the closing bracket, C::B uses 125 to 138 % of CPU (Core2Duo) and about 1.2 GB of memory, but after some time (about 5-10 sec) the CPU and memory usage is normal again and it shows me a bunch of preprocessor symbols in the symbols browser (even if there is no valid include).
EDIT:
It's still open and memory usage increases again.
System starts to become unresponsive, so it surely is in an endless-loop and eats up more an more memory.
Will see if I can debug it later.
I think I found the reason for the crash.
It happens, because if a new empty file is created and is not saved, it has the name "Untitledx", where x is a digit.
In NativeParser::OnEditorActivatedTimer, the directory of the active editor os added to the search-directories, if the editor contains a header-file.
The name is (e.g.) Untitled0, this is treated as header by CCFileTypeOf, because the extension is empty, but Untitled0 is just a dummy-name, because the editor is not yet saved, so it has an empty path.
This empty path is added to the include-dirs.
The SystemHeadersThread creates a HeaderDirTraverser and parses all include-dirs.
If an include-dir does not end with a path-seperator, it is added in CodeCompletion::GetSystemIncludeDirs.
And the empty path of Untitled0 suddenly is the root-path (at least on linux), just a single path-seperator.
ANd now after typing #include <> the HeaderDirTraverser starts searching for a file starting with a ">" in the whole file-system, and this can be really, really large, so C::B uses more and more memory and can crash or (at least) make the system unresponsive, because of extensive swapping.
If we check for an empty path in OnEditorActivatedTimer (or later), we can avoid such issues.
I hope this helps the CC specíalists to fix this issue.
I think I found the reason for the crash.Thanks!
I think I found the reason for the crash.Thanks!
This patch should fix this issue.
Again:codeblocks.RPT
From 6454 to the 6900 version after version of any course to crash.
Open the program file, in the main editing window, click the right mouse button, the program will crash.
codeblocks.RPT
codeblocks.RPT
Please delete the file E:\CodeBlocks\share\codeblocks\plugins\EditorTweaks.dll
and start your C::B again. I think EditorTweaks plugin cause this crash.
Index: EditorTweaks.cpp
===================================================================
--- EditorTweaks.cpp (revision 6904)
+++ EditorTweaks.cpp (working copy)
@@ -174,7 +174,7 @@
void EditorTweaks::OnRelease(bool /*appShutDown*/)
{
- m_tweakmenu = 0;
+ m_tweakmenu = NULL;
// EditorHooks::UnregisterHook(m_EditorHookId, true);
EditorManager* em = Manager::Get()->GetEditorManager();
@@ -208,7 +208,7 @@
void EditorTweaks::BuildMenu(wxMenuBar* menuBar)
{
Manager::Get()->GetLogManager()->DebugLog(_("Editor Tweaks plugin: Building menu"));
- int i=menuBar->FindMenu(_("Edit"));
+ int i=menuBar->FindMenu(_("&Edit"));
if(i==wxNOT_FOUND)
{
Manager::Get()->GetLogManager()->DebugLog(_("Editor Tweaks plugin: edit menu not found"));
@@ -298,6 +298,8 @@
void EditorTweaks::UpdateUI()
{
+ if ( !m_tweakmenu )
+ return;
cbEditor* ed = Manager::Get()->GetEditorManager()->GetBuiltinActiveEditor();
if(!ed || !ed->GetControl())
{
@@ -414,7 +416,7 @@
//TIP: for consistency, add a separator as the first item...
//make sure we have an editor
- if(type!=mtEditorManager)
+ if(type!=mtEditorManager || !m_tweakmenu)
return;
cbEditor* ed = Manager::Get()->GetEditorManager()->GetBuiltinActiveEditor();
if(!ed || !ed->GetControl())
somethings that I wish to add to codeblocks, I hope:
when I create a new project I really need to create a workspace file also (like MS visual studio), so it will be easy to add a second project.