project-navigation
Personal tools

Author Topic: Intermittent crash during campaign  (Read 3235 times)

Offline elbows

  • Cannon Fodder
  • **
  • Posts: 4
    • View Profile
Intermittent crash during campaign
« on: March 18, 2012, 01:51:56 pm »
Playing the campaign, I occasionally get a crash during missions from this assertion failure:
ufo: src/common/dbuffer.c:506: dbuffer_extract: Assertion `buf->len == 0' failed.

It seems to happen during the aliens' turn, but I'm not sure if that's always the case.

This is the stack trace:
#0  0x0012e416 in __kernel_vsyscall ()
#1  0x00487941 in raise () from /lib/libc.so.6
#2  0x0048ae42 in abort () from /lib/libc.so.6
#3  0x004808e8 in __assert_fail () from /lib/libc.so.6
#4  0x080d4f9a in dbuffer_extract (buf=0x13769e14, data=0xbfffe220 "\037B", len=6) at src/common/dbuffer.c:506
#5  0x080d2134 in NET_StreamDequeue (s=0x13769d8c, data=0xbfffe21c "\t\027L", len=10) at src/common/net.c:765
#6  0x080d424e in NET_ReadMsg (s=0x13769d8c) at src/common/netpack.c:578
#7  0x080581d1 in CL_ReadPackets () at src/client/cl_main.c:429
#8  0x0805988c in CL_Frame (now=1224344, data=0x0) at src/client/cl_main.c:1096
#9  0x080c6c67 in tick_timer (now=1224344, data=0xc678c44) at src/common/common.c:1325
#10 0x080c70e8 in Qcommon_Frame () at src/common/common.c:1486
#11 0x081310eb in main (argc=1, argv=0xbffff3d4) at src/ports/linux/linux_main.c:55

I poked around a bit in the debugger, and it seems like it's caused by a malformed dbuffer:
buf->len is 14, but buf->head->len is 0, and buf->head->next is NULL.  I'm not familiar with the UFO code, but based on the struct definition and the code of dbuffer_extract, that looks wrong.

The crash only happens once every hour or so.

OS: Linux (Ubuntu 10.10)
Version: e3e81b81770f91395288f162fc64a871e5e651df (master from Friday)

ufoconsole.log is attached.

Offline Mattn

  • CaveExpress
  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4830
  • www.caveproductions.org
    • View Profile
    • CaveExpress
Re: Intermittent crash during campaign
« Reply #1 on: March 18, 2012, 03:31:09 pm »
this is most likely a threading issue that we have since a very long time. we can't reliable reproduce it, and thus it's hard to fix.

Offline Tantalus

  • Rookie
  • ***
  • Posts: 28
    • View Profile
Re: Intermittent crash during campaign
« Reply #2 on: March 20, 2012, 12:10:23 pm »
Maybe this information helps a bit:
I've run into this error twice on my laptop (Win Vista 32Bit, Intel T4200 DualCore CPU, 4GB RAM, Intel GMA 4500 graphics), but I've never run into this on my PC (Win7, will provide hardware-specs this evening if needed). Used the same nightly on both machines.

Ok, here are the specs:
Win7 Ultimate, AMD Athlon II X2 CPU, 4GB RAM, ATI Radeon 5570 graphics card with driver version 8.911.0.0
« Last Edit: March 20, 2012, 11:44:10 pm by Tantalus »