Stack trace:
Code: Select all
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -150646080 (LWP 5618)]
0x008d633a in objc_msg_lookup () from /usr/lib/libobjc.so.1
(gdb) bt
#0 0x008d633a in objc_msg_lookup () from /usr/lib/libobjc.so.1
#1 0x00e201a6 in -[GSArray indexOfObject:] ()
from /usr/GNUstep/System/Library/Libraries/libgnustep-base.so.1.11
#2 0x00e54ff3 in -[NSArray containsObject:] ()
from /usr/GNUstep/System/Library/Libraries/libgnustep-base.so.1.11
#3 0x080f1e16 in -[ShipEntity fireLaserShotInDirection:] (self=0xe4bff010,
_cmd=0x8187440, direction=0) at ShipEntity.m:4998
#4 0x080f015e in -[ShipEntity fireMainWeapon:] (self=0xe4bff010,
_cmd=0x81871f0, range=11737.24371360863) at ShipEntity.m:4606
#5 0x080e434d in -[ShipEntity update:] (self=0xe4bff010, _cmd=0x818c6e0,
delta_t=0.0099929981661261991) at ShipEntity.m:1973
#6 0x081222bf in -[Universe update:] (self=0x86b6ff8, _cmd=0x8174460,
delta_t=0.0099929981661261991) at Universe.m:5061
#7 0x0805d967 in -[GameController doStuff:] (self=0x854b8f8, _cmd=0x8177a48,
sender=0x0) at GameController.m:444
Code: Select all
4994 if (victim->isShip)
4995 {
4996 ShipEntity* ship_hit = ((ShipEntity*)victim);
4997 ShipEntity* subent = ship_hit->subentity_taking_damage;
4998 if ((subent) && [ship_hit->sub_entities containsObject:subent])
4999 {
5000 if (ship_hit->isFrangible)
5001 {
If we look at ship_hit->sub_entities, this looks fine:
Code: Select all
(gdb) po ship_hit->sub_entities
("<ParticleEntity 300 PARTICLE_EXHAUST ttl: -272.439s>", "<ParticleEntity 300 PARTICLE_EXHAUST ttl: -272.439s>", "<ParticleEntity 300 PARTICLE_EXHAUST ttl: -272.439s>", "<ParticleEntity 600 PARTICLE_FLASHER ttl: -270.439s>", "<ParticleEntity 600 PARTICLE_FLASHER ttl: -270.439s>", "<ParticleEntity 600 PARTICLE_FLASHER ttl: -270.439s>", "<ParticleEntity 600 PARTICLE_FLASHER ttl: -270.439s>", "<ParticleEntity 600 PARTICLE_FLASHER ttl: -270.439s>", "<ParticleEntity 600 PARTICLE_FLASHER ttl: -270.439s>", "<ParticleEntity 600 PARTICLE_FLASHER ttl: -270.439s>", "<ParticleEntity 600 PARTICLE_FLASHER ttl: -270.439s>", "<ParticleEntity 600 PARTICLE_FLASHER ttl: -270.439s>", "<ParticleEntity 600 PARTICLE_FLASHER ttl: -270.439s>", "<ParticleEntity 600 PARTICLE_FLASHER ttl: -270.439s>", "<ParticleEntity 600 PARTICLE_FLASHER ttl: -270.439s>")
Code: Select all
(gdb) po ship_hit
<ShipEntity GalCop Viper Interceptor 968 (wingman) >
(gdb) p subent
$2 = (class ShipEntity *) 0xf0c34010
(gdb) po subent
Program received signal SIGSEGV, Segmentation fault.
0x008d633a in objc_msg_lookup () from /usr/lib/libobjc.so.1
The program being debugged was signaled while in a function called from GDB.
GDB remains in the frame where the signal was received.
To change this behavior use "set unwindonsignal on"
Evaluation of the expression containing the function (_NSPrintForDebugger) will be abandoned.