Code::Blocks

Developer forums (C::B DEVELOPMENT STRICTLY!) => Plugins development => Topic started by: Ceniza on July 03, 2005, 12:01:54 am

Title: ClassBrowser @ Code Completion
Post by: Ceniza on July 03, 2005, 12:01:54 am
Well, this question is related to http://www.codeblocks.org/index.php?name=PNphpBB2&file=viewtopic&t=502

I found the final crashing point was the destructor of ClassBrowser (line 79 in classbrowser.cpp) which removes the Symbols page.

Removing that line makes it work now, even though the destructor of DebuggerGDB does something similar and nothing evil happens there.

wxWidgets is supposed to take care of removing/freeing that kind of things so, is it really necessary to be in the destructor or is it just another evil bug in wxWidgets?

I'll keep my copy that way in the meanwhile but I would like you to take a look at it.
Title: ClassBrowser @ Code Completion
Post by: rickg22 on July 03, 2005, 01:14:11 am
Ceniza: I can't seem to reproduce the bug with wx2.4.2

[Edit]
Now, wait a second. We have to check the code to see if the classbrowser is being destroyed INSIDE the wxNotebook code, because if that's the case, we'd try to remove the page TWICE.

You're right, this whole line should be removed! Then the resulting code would be:

Code: [Select]

ClassBrowser::~ClassBrowser()
{
}


I don't see why not. Yiannis? You have the last word.
[/Edit]
Title: ClassBrowser @ Code Completion
Post by: mandrav on July 03, 2005, 09:58:10 am
It was needed back when the plugins could be unloaded on the fly.
I think this line can safely be removed now. Actually I just removed it :)

Thanks again Ceniza :) ,

Yiannis.