Developer forums (C::B DEVELOPMENT STRICTLY!) > CodeCompletion redesign
annoying crash when debugging CC's auto-suggestion
p2rkw:
--- Quote ---The autocomplete window in Scintilla is created each time but not destroyed.
--- End quote ---
Sorry, but I can't argee with that.
Here's how ListBox is created:
--- Code: ---void AutoComplete::Start(Window &parent, int ctrlID,
int position, Point location, int startLen_,
int lineHeight, bool unicodeMode, int technology) {
/* C::B begin */
// if (active) {
// Cancel();
// }
/* C::B end */
lb->Create(parent, ctrlID, location, lineHeight, unicodeMode, technology);
lb->Clear();
--- End code ---
"lb->clear" calls ListBoxImpl::Create, here is part of it's implementation:
--- Code: ---/* C::B begin */
if (wid == 0)
wid = new wxSCIListBoxWin(GETWIN(parent.GetID()), ctrlID, location_);
else if (GETLBW(wid)->GetParent() != GETWIN(parent.GetID()))
GETLBW(wid)->Reparent(GETWIN(parent.GetID()));
GETLBW(wid)->SetPosition(wxPoint(location_.x,location_.y));
GETLBW(wid)->SetId(ctrlID);
GETLB(wid)->SetId(ctrlID);
/* C::B end */
--- End code ---
If window wasn't destroyed it will be reused.
At first I thought "How could I make so horrible mistake", but I look deeper into code and it's not so bad :)
ollydbg:
Hi, p2rkw, I just see a very similar crash issue happens (see the discussion in Re: The 22 March 2014 build (9744) is out.).
I think it is much like the one I reported.
Sorry that your patch is lost for one year. I think we need to fix them.
ollydbg:
--- Quote from: oBFusCATed on December 31, 2012, 10:35:09 am ---
--- Quote from: ollydbg on December 31, 2012, 10:21:54 am ---(Another question is: how to build C::B which can link to a debug version of wxWidgets library, so that I can see/track the messages more clearly, currently, gdb's bt command always stop at [debug]#17 0x00e7ff27 in wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) () from E:\code\cb\cleantrunk\src\devel\wxmsw28u_gcc_custom.dll)
--- End quote ---
Build options->Custom variables and probably you should define some wxdebug macros...
--- End quote ---
Today, I build the C::B which link against wx2.8.12 debug library to hunt a bug in Re: The 22 March 2014 build (9744) is out., here is the simple patch
--- Code: --- src/CodeBlocks.cbp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/CodeBlocks.cbp b/src/CodeBlocks.cbp
index 07c384f..b456243 100644
--- a/src/CodeBlocks.cbp
+++ b/src/CodeBlocks.cbp
@@ -711,7 +711,7 @@
</Target>
<Environment>
<Variable name="WX_CFG" value="" />
- <Variable name="WX_SUFFIX" value="u" />
+ <Variable name="WX_SUFFIX" value="ud" />
<Variable name="WX_VERSION" value="28" />
</Environment>
</Build>
@@ -735,6 +735,7 @@
<Add option="-DCB_PRECOMP" />
<Add option="-DWX_PRECOMP" />
<Add option="-DwxUSE_UNICODE" />
+ <Add option="-D__WXDEBUG__" />
<Add directory="$(#WX.include)" />
<Add directory="$(#WX.lib)/gcc_dll$(WX_CFG)/msw$(WX_SUFFIX)" />
<Add directory="sdk/wxscintilla/include" />
--- End code ---
Navigation
[0] Message Index
[*] Previous page
Go to full version