Author Topic: Debugger no longer breaks, and segfaults  (Read 14644 times)

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2777
Debugger no longer breaks, and segfaults
« on: March 27, 2006, 10:45:17 pm »
SVN 2264, XPsp2

The debugger no longer stops at breakpoints.
When debugging a simple template, it segfaults and
produces no backtrace.

1) New project/widgets gui
2) compile setting "produce debug..." and "all warnings"
3) run it. Should run fine.
4) set a break point on any OnInit() statement
5) hit continue

Program will segfault, asks if you want a backtrace, answer yes,
backtrace will be empty.

Second test
1)Load Codeblocks.cbp.
2) set a breakpoint on any statement in main.cpp:CreateToolbar();
3) hit debugger continue
CB will run without ever hitting the breakpoint.

All the above worked last Friday. (Today is monday)

Could someone confirm?

thanks
pecan

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5491
Re: Debugger no longer breaks, and segfaults
« Reply #1 on: March 27, 2006, 11:08:45 pm »
Code
void MainFrame::CreateToolbars()
{
wxXmlResource *myres = wxXmlResource::Get();
if (m_pToolbar)
{
SetToolBar(0L);
// delete m_pToolbar;
m_pToolbar = 0L;
}

    wxString resPath = ConfigManager::GetDataFolder();
    wxString xrcToolbarName = _T("main_toolbar");

I think you mean this function, tried it with rev 2263 (WinXP SP2):
I put a breakpoint on :
   wxXmlResource *myres = wxXmlResource::Get();
and
    wxString resPath = ConfigManager::GetDataFolder();

CB did not stop at the first breakpoint, but it sure stopped on the second one.


Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2777
Re: Debugger no longer breaks, and segfaults
« Reply #2 on: March 28, 2006, 12:28:24 am »
Ok, I give

How can I get back to SVN 2263?
I cannot get 2264 to break anywhere. It just segfaults.

thanks
pecan


Edit: also, could you please try my little "new project" test?
« Last Edit: March 28, 2006, 12:30:47 am by Pecan »

TheNullinator

  • Guest
Re: Debugger no longer breaks, and segfaults
« Reply #3 on: March 28, 2006, 01:18:39 am »
To get back to revision 2263, type `svn up -r2263' in the Code::Blocks source directory.

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2777
Re: Debugger no longer breaks, and segfaults
« Reply #4 on: March 28, 2006, 01:39:53 am »
To get back to revision 2263, type `svn up -r2263' in the Code::Blocks source directory.

Thanks, did that, compiled, and I still get the crashes... so that means I've
got something else broken on my system.

Could have been caused by the full disk compress I did this morning.
I'll delete the entire CodeBlocks source trunk and download again....

Oh, dear, I live on the end of a country POTS line. There goes my evening...

thanks
pecan

TheNullinator

  • Guest
Re: Debugger no longer breaks, and segfaults
« Reply #5 on: March 28, 2006, 01:53:30 am »
Hmm, I tried with revision 2264 and it seems to always skip the first breakpoint that control reaches in the Code::Blocks source.  If you put a breakpoint on the very next line it breaks there, but it doesn't seem to matter which function, or where in the function, you put the first breakpoint, it is still skipped.  It doesn't do it for other projects, though.

I'll give the wxWidgets new project one a go in a little while and see if it seg faults.

TheNullinator

  • Guest
Re: Debugger no longer breaks, and segfaults
« Reply #6 on: March 28, 2006, 02:06:14 am »
I can't run a wxWidgets template project under the debugger without it seg faulting, with or without breakpoints.  I'm using the same wxWidgets DLL as the one Code::Blocks uses and Code::Blocks debugs fine (apart from skipping the first breakpoint).
« Last Edit: March 28, 2006, 02:08:09 am by TheNullinator »

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2777
Re: Debugger no longer breaks, and segfaults
« Reply #7 on: March 28, 2006, 02:47:20 am »
I downloaded a completely fresh copy of CodeBlocks SVN 2264.
Any template wxWidget segfaults when using the debugger but.
for me, runs ok on its own.

I cannot get SVN 2264 or 2263 or 2258 to break at any breakpoints.

I reloaded an older copy of SVN 2199 from my backup disk. It works fine every time. Even breaks on the first breakpoint.

To make sure it's not a wxWidget lib problem, I swaped the backed up
 lib version with the current. Nothing changed. So it's not the libs.

It was all working fine Firday. I thought that version was SVN 2258.
But now I can't get that to debug either. I'm at a lose to figure this out.
I'd almost think something besides the .exe and .dll are causing this.

pecan
« Last Edit: March 28, 2006, 02:58:02 am by Pecan »

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2777
Re: Debugger no longer breaks, and segfaults
« Reply #8 on: March 28, 2006, 02:56:35 am »
I can't run a wxWidgets template project under the debugger without it seg faulting, with or without breakpoints.  I'm using the same wxWidgets DLL as the one Code::Blocks uses and Code::Blocks debugs fine (apart from skipping the first breakpoint).

You're right. Debugging CodeBlocks.exe itself (via SVN 2264) works if you put a two breakpoints together, one after the other.
It always skips the first breakpoint.

When debugging CB itself, it does not segfault.

Another mystery....

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: Debugger no longer breaks, and segfaults
« Reply #9 on: March 28, 2006, 08:01:55 am »

Any template wxWidget segfaults when using the debugger but for me, runs ok on its own.
I cannot get SVN 2264 or 2263 or 2258 to break at any breakpoints.


i can confirm this behaviour,
my last backup-build ( where debugging works without segfault's as pecan has described ) is CB svn rev2251.

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: Debugger no longer breaks, and segfaults
« Reply #10 on: March 28, 2006, 09:30:33 am »
i just stepped back through revisions and found out, that the last revision, where the debugger works without segfault was rev 2255

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Debugger no longer breaks, and segfaults
« Reply #11 on: March 28, 2006, 10:13:00 am »
Both bugs mentioned are fixed in revision 2265.
Be patient!
This bug will be fixed soon...

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: Debugger no longer breaks, and segfaults
« Reply #12 on: March 28, 2006, 10:45:46 am »
Both bugs mentioned are fixed in revision 2265.

thx, works fine again !

TheNullinator

  • Guest
Re: Debugger no longer breaks, and segfaults
« Reply #13 on: March 28, 2006, 10:56:47 am »
Both bugs mentioned are fixed in revision 2265.

Wow!   :D  You guys sure are fast at fixing bugs.  11 and a half hours from the initial post and whamo(!), fixed.

I tip my hat to the devs here for making, maintaining, and constantly improving this wonderful piece of software.   8)

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Debugger no longer breaks, and segfaults
« Reply #14 on: March 28, 2006, 11:01:31 am »
Both bugs mentioned are fixed in revision 2265.

Wow!   :D  You guys sure are fast at fixing bugs.  11 and a half hours from the initial post and whamo(!), fixed.

Actually, it took something less than 5 minutes (including testing). I just needed to sit on a XP computer ;)
Be patient!
This bug will be fixed soon...