views:

919

answers:

3

Does anybody know what might be causing this problem? When I run the code, the program immediately crashes on the simulator before getting anywhere; however if I just go to the simulator and run the program, the changes were loaded and there doesn't seem to be any obvious problems. Or how could I try to pinpoint this problem?

[Session started at 2009-09-18 03:31:02 -0700.]
GNU gdb 6.3.50-20050815 (Apple version gdb-966) (Tue Mar 10 02:43:13 UTC 2009)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-apple-darwin".sharedlibrary apply-load-rules all
Attaching to process 2171.
gdb-i386-apple-darwin(2172,0x778720) malloc: *** mmap(size=1420296192) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
gdb stack crawl at point of internal error:
[ 0 ] /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/libexec/gdb/gdb-i386-apple-darwin (align_down+0x0) [0x122300]
[ 1 ] /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/libexec/gdb/gdb-i386-apple-darwin (xstrvprintf+0x0) [0x123394]
[ 2 ] /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/libexec/gdb/gdb-i386-apple-darwin (xmalloc+0x28) [0x1235b7]
[ 3 ] /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/libexec/gdb/gdb-i386-apple-darwin (dyld_info_read_raw_data+0x50) [0x1659d7]
[ 4 ] /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/libexec/gdb/gdb-i386-apple-darwin (dyld_info_read+0x1bc) [0x168a80]
[ 5 ] /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/libexec/gdb/gdb-i386-apple-darwin (macosx_dyld_update+0xbf) [0x168cc4]
[ 6 ] /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/libexec/gdb/gdb-i386-apple-darwin (macosx_solib_add+0x36b) [0x169ff4]
[ 7 ] /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/libexec/gdb/gdb-i386-apple-darwin (macosx_child_attach+0x478) [0x17dd39]
[ 8 ] /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/libexec/gdb/gdb-i386-apple-darwin (attach_command+0x5d) [0x64eed]
[ 9 ] /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/libexec/gdb/gdb-i386-apple-darwin (mi_cmd_target_attach+0x4c) [0x15de9]
[ 10 ] /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/libexec/gdb/gdb-i386-apple-darwin (captured_mi_execute_command+0x16d) [0x17453]
[ 11 ] /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/libexec/gdb/gdb-i386-apple-darwin (catch_exception+0x41) [0x7a9c2]
[ 12 ] /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/libexec/gdb/gdb-i386-apple-darwin (mi_execute_command+0xa9) [0x16f8f]
/SourceCache/gdb/gdb-966/src/gdb/utils.c:1144: internal-error: virtual memory exhausted: can't allocate 1420296192 bytes.
A problem internal to GDB has been detected, further debugging may prove unreliable.

The Debugger has exited with status 1.The Debugger has exited with status 1.
+1  A: 

When this happens for me, I take out code until it runs, then put it back in one piece at a time until something breaks.

Xetius
+1  A: 

Inside Xcode -> Preferences-> Debugging window please uncheck the "Load symbols lazily" option.

Alecsandru Soare
Should I have expected to change the message at all? Nothing was changed after unchecking this option. Thanks for your help though
singularity
A: 

It works for me! Thanks Alecsandru.

[]´s Glauber

Glauber