Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

removed _crtBreakAlloc from source, but breakpoint is still there ?

4 views
Skip to first unread message

Florian Vogler

unread,
Jul 8, 2003, 9:40:59 AM7/8/03
to
Hi there,

yesterday, I inserted _crtBreakAlloc(704) into my source code in VS
.NET.
worked fine, but after removing the line from my source code, the debugger
keeps saying "unhandled exception ... user breakpoint" where there is
definitely no error (i've compiled the sources on other computers and do not
have any problems at all there!).

can anyone help me out where that _crtBreakAlloc might be stored, and how I
can remove/clear it ?
I've allready tried clean/rebuild and deleted all pdb-files, but nothing
helped so far.

thanks for your help in advance,
with best regards,
florian


Kim Gräsman

unread,
Jul 8, 2003, 10:15:44 AM7/8/03
to
Hi Florian,

> worked fine, but after removing the line from my source code, the debugger
> keeps saying "unhandled exception ... user breakpoint" where there is
> definitely no error (i've compiled the sources on other computers and do
not
> have any problems at all there!).

Are you sure it's related to _CrtSetBreakAlloc? I've only used that function
to debug memory leaks, and if you managed to fix the leak, are you sure you
didn't introduce a bug.

A double-delete will expose this behavior, if I recall correctly.

--
Best regards,
Kim Gräsman


"Florian Vogler" <fvo...@web.de> wrote in message
news:u%23EKfZVR...@TK2MSFTNGP11.phx.gbl...

Florian Vogler

unread,
Jul 8, 2003, 10:39:35 AM7/8/03
to
Hi Kim,

what is a double-delete ?

I am actually 99,99% sure that it's not related to a leak.
the debugger simply stops in dbgheap.c at line

if (_crtBreakAlloc != -1L && lRequest == _crtBreakAlloc)

this line -------------> _CrtDbgBreak();

any further ideas ?

do you happen to know where breakallocs are actually stored ?

thanks and best regards,

florian


"Kim Gräsman" <k...@mvps.org> wrote in message
news:%23dquetV...@tk2msftngp13.phx.gbl...

Kim Gräsman

unread,
Jul 8, 2003, 11:05:18 AM7/8/03
to
Hi Florian,

> what is a double-delete ?

something like this:

int* pi = (int*)malloc(1000);
free(pi);
free(pi); // oops, freed twice

> I am actually 99,99% sure that it's not related to a leak.
> the debugger simply stops in dbgheap.c at line

Yep, that kills my theory, there's got to be a _CrtSetBreakAlloc left in
there somewhere.

> do you happen to know where breakallocs are actually stored ?

As far as I know, not anywhere... You call _CrtSetBreakAlloc to set one up
at an allocation index, and if you remove the call, that should be the end
of it.
Have you done a rebuild all?

--
Best regards,
Kim Gräsman


"Florian Vogler" <fvo...@web.de> wrote in message

news:uUfIS6VR...@TK2MSFTNGP11.phx.gbl...

0 new messages