Author Topic: ClassBrowser @ Code Completion  (Read 16281 times)

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
ClassBrowser @ Code Completion
« 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.

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
ClassBrowser @ Code Completion
« Reply #1 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

ClassBrowser::~ClassBrowser()
{
}


I don't see why not. Yiannis? You have the last word.
[/Edit]

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
ClassBrowser @ Code Completion
« Reply #2 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.
Be patient!
This bug will be fixed soon...