[airstrike] Triggers and level ending

Erik Auerswald auerswal at unix-ag.uni-kl.de
Fri Jul 15 05:35:41 EDT 2005


Hi,

> > Did you get a backtrace?
> >
> > I commited some fixes to the timer triggers but nothing that might
> > explain a crash.

I've got a backtrace With the old code (revision 26) (started airstrike,
pressed F5, killed ballon, program crashed, did gdb backtrace):

[auerswal at fettuccini trunk]$ gdb ./airstrike
GNU gdb 6.2-2mdk (Mandrakelinux)
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 "i586-mandrake-linux-gnu"...Using host libthread_db library "/lib/tls/libthread_db.so.1".

(gdb) run
Starting program: /home/auerswal/work/airstrike/svn/trunk/airstrike
[Thread debugging using libthread_db enabled]
[New Thread 1080158816 (LWP 30677)]
[New Thread 1088662448 (LWP 30680)]
rc_setup(): Warning, could not load user defaults from 'defaults.conf'.
No hardware acceleration found, using software rendering.
Video driver: x11
[New Thread 1099733936 (LWP 30681)]
Opened audio at 22050 Hz 16 bit mono

In-game keyboard shortcuts:
  F5  -- Restart level
  F4  -- Next level (for testing purposes)
  F1  -- Internal game console
  ESC -- Exit game

Player 1:
  Up            -- Left arrow
  Down          -- Right arrow
  Accelerate    -- Up arrow
  Fire bullet   -- Right Shift
  Drop bomb     -- Right Ctrl
  Self-destruct -- Backspace

Player 2:
  Up            -- x
  Down          -- c
  Accelerate    -- q
  Fire bullet   -- Left Alt
  Drop bomb     -- TAB
  Self-destruct -- s

Note unless you give two -ai options, the game starts in single
player mode. I.e. only the first plane is user controllable.

Creating generator 'player' with sprite type 'biplane'
Creating generator 'player' with sprite type 'biplane'
Creating generator 'singleton' with sprite type 'fuel'
Loading level Tutorial level
entering main loop
there is no joystick 0
NOTE: message 9 to brainless plane
NOTE: message 9 to brainless plane
Object statistics: (only used types printed)
 type         current (created)
trigger_tagkill     0 (1)
singleton_generator 0 (1)
player_generator    0 (2)
ai                  0 (2)
fuel                0 (1)
biplane             0 (2)
airballoon          0 (1)
Creating generator 'player' with sprite type 'biplane'
Creating generator 'player' with sprite type 'biplane'
Creating generator 'singleton' with sprite type 'fuel'
Loading level Tutorial level
there is no joystick 0
NOTE: message 9 to brainless plane
NOTE: message 9 to brainless plane
Triggering objects tagged with:
- level-done

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1080158816 (LWP 30677)]
0x401ac9cb in strlen () from /lib/tls/libc.so.6
(gdb) bt
#0  0x401ac9cb in strlen () from /lib/tls/libc.so.6
#1  0x40180d3e in vfprintf () from /lib/tls/libc.so.6
#2  0x40181ae6 in vfprintf () from /lib/tls/libc.so.6
#3  0x4017da05 in vfprintf () from /lib/tls/libc.so.6
#4  0x4018651f in fprintf () from /lib/tls/libc.so.6
#5  0x08053112 in trigger_tags_activate (tags=0x824fc34) at engine/trigger.c:53
#6  0x0805348e in trigger_tagkill_message (obj=0x8158948, msg=Unhandled dwarf
               expression opcode 0x93) at engine/trigger.c:350
#7  0x08053b72 in triggers_update (group=0x80b1748) at msg_types.h:84
#8  0x0804f3fb in game_frame () at engine/engine.c:176
#9  0x080590c9 in main (argc=1, argv=0xbffff824) at tests/testengine.c:180

> I commited fix to one crash.

This seems to have fixed it.

> There are still some problems:
> - I added to the level 1 player death (level restart) triggers, but that
>   means the level is skipped if level 0 is played first.  The reason is
>   that object statistics are not zeroed at the level end

The level is skipped even when started with -level 1 (at least for me).

Erik



More information about the airstrike mailing list