Hi,
On Mar 4, 11:47 am, zeXspectrum <
zexspect...@gmail.com> wrote:
> I tried to reproduce those two problems:
>
> 1) My test app just stucks on the second delete []. And no exception
> is generated at all.
>
> // Delete already deleted memory.
> char* p = new char[1000];
> delete [] p;
> delete [] p; << Stucks here
>
> I don't know how handle such error, but you can avoid such errors by
> following some coding rules. For example, see thishttp://
crashrpt.sourceforge.net/docs/html/writing_robust_code.html
Yes, thanks... But I would like to catch them any way... The only
way I found to catch them was to create another process and attach it
as a debugger using DebugActiveProcess()... But I haven't found a way
to catch it within the same process.
> 2) I reproduced the stack overflow exception as you described, and
> error report was generated ok. I used CrashRpt v.1.2.8 and Visual
> Studio 2005 on Windows 7 SP1. What's your version? Can you provide
> more information how to reproduce your problem?
Here are the steps I did :
- Download the latest version (CrashRpt_v1.2.8_r1116.zip)
- Apply the patch at the end of the message
- Open the Visual Studio 2010 solution (I use this version on Windows
Vista)
- Run crashcon in Release mode (so that the stack overflow code
actually gets executed)
Instead of seeing the crash report window, the program will simply
crash.
Hope this helps,
pogo11
--- CrashRpt_v1.2.8_r1116/reporting/crashcon/crashcon.cpp Mon Mar 07
00:41:13 2011
+++ CrashRpt_v1.2.8_r1116.orig/reporting/crashcon/crashcon.cpp Fri Dec
10 22:24:56 2010
@@ -90,16 +90,8 @@
{
}
#else
- // Stack overflow.
- struct Overflow
- {
- static int recursive( int a )
- {
- return ( a < 0 ) ? 0 : recursive( a + 1 );
- }
- };
-
- printf("%d\n", Overflow::recursive( 0 ));
+ int *p = 0;
+ *p = 0;
#endif // _DEBUG
}