Developer forums (C::B DEVELOPMENT STRICTLY!) > CodeCompletion redesign
New code completion remarks/issues
mmkider:
--- Quote from: ollydbg on September 28, 2009, 07:40:41 am ---
--- Quote from: mmkider on September 28, 2009, 05:25:29 am ---I Found a crash, See picture.
At last, I need keyin '\n' but I keyin '\'. it will crash.
--- End quote ---
I can't reproduce the crash when entering only one statements, can you give a simple testing code?
--- End quote ---
--- Code: ---static wxRegEx rePrint(_T("^(@_@)(.*)"));
void Test_CodeCompletion()
{
static wxString buffer;
wxArrayString lines = GetArrayFromString(buffer, _T('\n'));
bool bMatch=false;
for (unsigned int i = 0; i < lines.GetCount(); ++i)
{
if (rePrint.Matches(lines[i]))
{
lines[i]=_T("");
bMatch=true;
}
}
if(bMatch)
{
buffer.clear();
for (unsigned int i = 0; i < lines.GetCount(); ++i)
{
if(lines[i]!=_T(""))
{
buffer+=lines[i]+_T("\n"); // this line will be crash.
}
}
}
return; // come back later
}
--- End code ---
Step 1: keyin "buffer"
Step 2: keyin "+"
Step 3: keyin "="
Step 4: keyin "lines"
Step 5: keyin "["
Step 6: keyin "]"
Step 7: keyin "i"
Step 8: keyin "+"
Step 9: keyin "_"
Step 10: keyin "T"
Step 11: keyin "()"
Step 12: keyin "\"\""
Step 13: keyin "\\" => crash
ollydbg:
I follow you steps, but still can't reproduce this crash.
By the way, if you enter these statement:
--- Code: ---buffer+=lines[i]+_T("\");
--- End code ---
You will notice that the open brace and the close brace have the different colors. I guess this is caused by Scintilla gramma highlight.
mmkider:
--- Quote from: ollydbg on September 28, 2009, 08:49:50 am ---I follow you steps, but still can't reproduce this crash.
By the way, if you enter these statement:
--- Code: ---buffer+=lines[i]+_T("\");
--- End code ---
You will notice that the open brace and the close brace have the different colors. I guess this is caused by Scintilla gramma highlight.
--- End quote ---
you need create project from wx project template.
I try this function in the normal C++ project, it will run fine.
But I try this function in the wx project, it still give me a crash after Popup "(x)".
ollydbg:
@mmkider
I just create a wx project by wizard, and still can't reproduce crash.
In my test, I have no completion list like "(x)".
Which version of codeblocks did you use? For me, I use latest svn + my own patch. :D
Jenna:
I can more or less confirm this crash on linux.
It does not crash, but it hangs and eats 100 % of one of my CPU's.
Latest svn-source.
I will look into it.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version