digitalmars.D.learn - Debug OutOfMemoryError?
- Jacob Carlborg (12/12) Jul 31 2010 How do I debug an OutOfMemoryError? I'm trying to run a simple
- Steven Schveighoffer (4/14) Aug 02 2010 Try compiling druntime in debug mode with -gc, then debug the applicatio...
- Jacob Carlborg (4/19) Aug 02 2010 I'll give that a try, thanks.
How do I debug an OutOfMemoryError? I'm trying to run a simple application that uses SDL and OpenGL with Derelict on Mac OS X 10.6. It works fine using D1 and Tango but fails with the message "Memory allocation failed" when I use D2. I probably messed something up when I ported the Mac specific parts of Derelict SDL to make it work with D2. But how do I debug it when it just prints "Memory allocation failed" and exits with code 01? I can't catch the exception and even if I could it would be useless because it doesn't contain any stack trace, what it looks like after looking at the druntime source code. Any advise? -- /Jacob Carlborg
Jul 31 2010
On Sat, 31 Jul 2010 05:55:40 -0400, Jacob Carlborg <doob me.com> wrote:How do I debug an OutOfMemoryError? I'm trying to run a simple application that uses SDL and OpenGL with Derelict on Mac OS X 10.6. It works fine using D1 and Tango but fails with the message "Memory allocation failed" when I use D2. I probably messed something up when I ported the Mac specific parts of Derelict SDL to make it work with D2. But how do I debug it when it just prints "Memory allocation failed" and exits with code 01? I can't catch the exception and even if I could it would be useless because it doesn't contain any stack trace, what it looks like after looking at the druntime source code. Any advise?Try compiling druntime in debug mode with -gc, then debug the application, putting a breakpoint at the point where it prints the error. -Steve
Aug 02 2010
On 2010-08-02 14:34, Steven Schveighoffer wrote:On Sat, 31 Jul 2010 05:55:40 -0400, Jacob Carlborg <doob me.com> wrote:I'll give that a try, thanks. -- /Jacob CarlborgHow do I debug an OutOfMemoryError? I'm trying to run a simple application that uses SDL and OpenGL with Derelict on Mac OS X 10.6. It works fine using D1 and Tango but fails with the message "Memory allocation failed" when I use D2. I probably messed something up when I ported the Mac specific parts of Derelict SDL to make it work with D2. But how do I debug it when it just prints "Memory allocation failed" and exits with code 01? I can't catch the exception and even if I could it would be useless because it doesn't contain any stack trace, what it looks like after looking at the druntime source code. Any advise?Try compiling druntime in debug mode with -gc, then debug the application, putting a breakpoint at the point where it prints the error. -Steve
Aug 02 2010