|
Prev: My app's window class
Next: CDialog
From: KM98 on 21 May 2008 00:01 Hi All- I'm using Visual C++ 6.0 in debug mode and get the following message when trying to delete a pointer that was previously allocated using new. "User breakpoint called from code at 0x7c901230" and there is an "int 3" at 0x7c901230 My app is single threaded and this happens in the same funtion where i declare, use and then try to delete the pointer. I have set no breakpoints, what is the meaning of this? can anybody please explain? Thank you.
From: Tom Serface on 21 May 2008 00:26 This could happen if you did something that corrupts your heap. Did you possible delete the pointer previously in the program? Tom "KM98" <kmarcus98(a)gmail.com> wrote in message news:7fd66ef9-61f8-4a53-a951-48e02094b1e5(a)m3g2000hsc.googlegroups.com... > Hi All- > > I'm using Visual C++ 6.0 in debug mode and get the following message > when trying to delete a pointer that was previously allocated using > new. > > "User breakpoint called from code at 0x7c901230" > > and there is an "int 3" at 0x7c901230 > > My app is single threaded and this happens in the same funtion where i > declare, use and then try to delete the pointer. > > I have set no breakpoints, what is the meaning of this? can anybody > please explain? > Thank you. >
From: KM98 on 21 May 2008 00:57 No not really, I have simplified it to the point of creating (new pointer) and then immediately delete'ing. But still the same thing. The pointer is to an object of type Db (berkeley Db from Oracle). I wonder if they are doing something? On May 21, 12:26 am, "Tom Serface" <tom.nos...(a)camaswood.com> wrote: > This could happen if you did something that corrupts your heap. Did you > possible delete the pointer previously in the program? > > Tom > > "KM98" <kmarcu...(a)gmail.com> wrote in message > > news:7fd66ef9-61f8-4a53-a951-48e02094b1e5(a)m3g2000hsc.googlegroups.com... > > > > > Hi All- > > > I'm using Visual C++ 6.0 in debug mode and get the following message > > when trying to delete a pointer that was previously allocated using > > new. > > > "User breakpoint called from code at 0x7c901230" > > > and there is an "int 3" at 0x7c901230 > > > My app is single threaded and this happens in the same funtion where i > > declare, use and then try to delete the pointer. > > > I have set no breakpoints, what is the meaning of this? can anybody > > please explain? > > Thank you.- Hide quoted text - > > - Show quoted text -
From: Joseph M. Newcomer on 21 May 2008 01:36 So what's the backtrace? DId you look at call points within the stack to see what you were doing? It could be freeing a pointer twice, or dealing with heap corruption. It is probably caused by a call from the allocator, and if you walk down the stack into the allocator, it will often tell you exactly what went wrong. joe On Tue, 20 May 2008 21:01:43 -0700 (PDT), KM98 <kmarcus98(a)gmail.com> wrote: >Hi All- > >I'm using Visual C++ 6.0 in debug mode and get the following message >when trying to delete a pointer that was previously allocated using >new. > >"User breakpoint called from code at 0x7c901230" > >and there is an "int 3" at 0x7c901230 > >My app is single threaded and this happens in the same funtion where i >declare, use and then try to delete the pointer. > >I have set no breakpoints, what is the meaning of this? can anybody >please explain? >Thank you. Joseph M. Newcomer [MVP] email: newcomer(a)flounder.com Web: http://www.flounder.com MVP Tips: http://www.flounder.com/mvp_tips.htm
From: Giovanni Dicanio on 21 May 2008 03:09
"KM98" <kmarcus98(a)gmail.com> ha scritto nel messaggio news:7fd66ef9-61f8-4a53-a951-48e02094b1e5(a)m3g2000hsc.googlegroups.com... > I'm using Visual C++ 6.0 in debug mode and get the following message > when trying to delete a pointer that was previously allocated using > new. > > "User breakpoint called from code at 0x7c901230" > > and there is an "int 3" at 0x7c901230 > > My app is single threaded and this happens in the same funtion where i > declare, use and then try to delete the pointer. Have you tried linking with debug *multithreaded* DLL for C/C++ run-time ? Maybe Berkley DB (you mentioned in another post) needs multithreaded DLL... (but the default in VC6 is non-multithreaded DLL, IIRC). Projects | Settings | C/C++ Category: Code Generation Use run-time library: Debug Multithreaded DLL Giovanni |