Code: Select all
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1208104096 (LWP 4624)]
0x0813dadd in -[Universe update:] (self=0xa304ab8, _cmd=0x8185228,
delta_t=0.020028012790135108) at src/Core/Universe.m:5280
5280 while ((index > 0)&&(p0.y < y_sortedEntities[index - 1]->position.y))
(gdb) bt
#0 0x0813dadd in -[Universe update:] (self=0xa304ab8, _cmd=0x8185228,
delta_t=0.020028012790135108) at src/Core/Universe.m:5280
#1 0x0806080a in -[GameController doStuff:] (self=0xa19bab8, _cmd=0x8189148,
sender=0x0) at src/Core/GameController.m:510
#2 0x080783fd in -[MyOpenGLView pollControls:] (self=0xa1a3878,
_cmd=0x81851d0, sender=0xafd85b8) at src/SDL/MyOpenGLView.m:1015
#3 0x0061c6e2 in -[NSObject performSelector:withObject:] (self=0xa1a3878,
_cmd=0x7dcd58, aSelector=0x81851d0, anObject=0xafd85b8) at NSObject.m:1782
#4 0x0066dc92 in -[NSTimer fire] (self=0xafd85b8, _cmd=0x7d20f8)
at NSTimer.m:219
#5 0x00642185 in -[NSRunLoop limitDateForMode:] (self=0xafaea40,
_cmd=0x7d2060, mode=0x7d21e8) at NSRunLoop.m:843
#6 0x0064072b in -[NSRunLoop runMode:beforeDate:] (self=0xafaea40,
_cmd=0x7d2190, mode=0x7d21e8, date=0xa9d3a08) at NSRunLoop.m:1109
#7 0x00640620 in -[NSRunLoop runUntilDate:] (self=0xafaea40, _cmd=0x7d2188,
date=0xa9d3a08) at NSRunLoop.m:1167
#8 0x0063f1a2 in -[NSRunLoop run] (self=0xafaea40, _cmd=0x8185200)
at NSRunLoop.m:1150
#9 0x0806063a in -[GameController applicationDidFinishLaunching:] (
self=0xa19bab8, _cmd=0x8187e50, notification=0x0)
at src/Core/GameController.m:375
#10 0x08074cf6 in main (argc=1, argv=0xbf8eea74) at src/SDL/main.m:52
Code: Select all
(gdb) p index
$1 = 42
(gdb) p p0
$2 = {x = 15895.2256, y = 15212.6348, z = 587336.25}
(gdb) p y_sortedEntities
$3 = {0xb05ab010, 0xa3dd9e8, 0xb4e04010, 0xad94b010, 0xb52ad010, 0xadb2b010,
0xb2320010, 0xb24e2010, 0xb4e54010, 0xb4cc4010, 0xaddfb010, 0xadeeb010,
0xb0c69010, 0xb1119010, 0xb1079010, 0xadb7b010, 0xadbcb010, 0xb48fd010,
0xadc1b010, 0xb0cb9010, 0xadcbb010, 0xb10c9010, 0xb47e9010, 0xb07df010,
0xadadb010, 0xb1029010, 0xb622f010, 0xb3db4010, 0xb0c19010, 0xb0bc9010,
0xb0a89010, 0xb0a39010, 0xb0ad9010, 0xb0b79010, 0xb1597010, 0xb0b29010,
0xb0f39010, 0xb1b69010, 0xadc6b010, 0x0, 0x0, 0x0, 0x0, 0xadd0b010,
0x0 <repeats 2004 times>}
(gdb) p position
$4 = 0
Code: Select all
(gdb) p y_sortedEntities[index - 1]
$5 = (class Entity *) 0x0
It is interesting to note index is 42, which is of course The Answer to Life, The Universe and Everything. One would hope the question isn't SIGSEGV