Author Topic: About the Class browser crash....  (Read 31004 times)

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: About the Class browser crash....
« Reply #15 on: July 02, 2007, 03:01:06 pm »
I just noticed something.


m_pTreeTop->Expand(root);
if(platform::gtk)
{
     // seems like the "expand" event comes too late in wxGTK,
     // so make it happen now
     ExpandItem(root);
}

Maybe this is the cause of the crash... ExpandItem seems to be called by the main thread in Windows, while in Linux is called by the worker thread. But I can't really be sure, there are other places where the code changes in the Windows platform.
« Last Edit: July 02, 2007, 03:21:05 pm by rickg22 »

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: About the Class browser crash....
« Reply #16 on: July 02, 2007, 03:28:54 pm »
The crash is reproducible under Windows XP here, but it does not occur when running in the debugger, so it will be next to impossible to find it (other than by sheer luck).
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: About the Class browser crash....
« Reply #17 on: July 02, 2007, 04:35:22 pm »
The crash is reproducible under Windows XP here, but it does not occur when running in the debugger, so it will be next to impossible to find it (other than by sheer luck).

The crash can be reproduced in Debugger, too.

Please see the backtrace generated using GDB in the following thread.
Quote
https://developer.berlios.de/bugs/?func=detailbug&bug_id=11433&group_id=5358
Be a part of the solution, not a part of the problem.

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: About the Class browser crash....
« Reply #18 on: July 02, 2007, 04:58:22 pm »
I found the reason:   You delete or Release() the pointer at some point, but you don't invalidate it.

Commenting out the code accessing m_pTreeTop around line 640 in classbrowserbuilderthread.cpp fixes the crash. Thus, the first logical conclusion is that the pointer is null.
However, adding a check for null-ness does not fix the crash. Ergo: the pointer in non-null and non-valid.

Find a delete without m_pTreeTop = 0, or a Release() without, and you have your bug.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: About the Class browser crash....
« Reply #19 on: July 02, 2007, 07:30:06 pm »
I found the reason:   You delete or Release() the pointer at some point, but you don't invalidate it.

Close but wrong. Anyway, the bug has been closed.
Be patient!
This bug will be fixed soon...

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: About the Class browser crash....
« Reply #20 on: July 02, 2007, 08:53:05 pm »
Yay!  :D

So, how many bugs till RC3?