#30 ustunts crashes on start

open
nobody
None
5
7 days ago
2010-01-07
Yegor Derevenets
No

Ultimate Stunts version: 0.7.5
Platform: Debian GNU/Linux Squeeze x86_64
Game was build/installed via ./configure --prefix=home/yegor && make && make install

Program output during first launch:
---- begin ----
---Sound system
---World data
---World data
---Renderer
Loading lensflare distance 1.000 size 0.200 file environment/lensflare/lensflare0.jpg
Loading file environment/lensflare/lensflare0.jpg
Segmentation fault (core dumped)
---- end ----

Backtrace by gdb:
---- begin ----
(gdb) bt
#0 0x00007ffff677f185 in free () from /lib/libc.so.6
#1 0x0000000000464885 in RawImageClose (fileName=<value optimized out>) at image.c:154
#2 RGBImageLoad (fileName=<value optimized out>) at image.c:269
#3 0x000000000045c767 in CTexture::loadImage (this=0xb93080, filename=<value optimized out>, list=<value optimized out>) at texture.cpp:70
#4 CTexture::load (this=0xb93080, filename=<value optimized out>, list=<value optimized out>) at texture.cpp:51
#5 0x000000000044d008 in CGraphicWorld::reloadConfiguration (this=0xb92590) at graphicworld.cpp:165
#6 0x000000000044d464 in CGraphicWorld (this=0xb92590) at graphicworld.cpp:79
#7 0x00000000004195a3 in CGameRenderer (this=0xb92430) at gamerenderer.cpp:36
#8 0x0000000000421716 in CUSCore (this=0xb91f10, winsys=0x6ed400, soundsys=<value optimized out>) at uscore.cpp:34
#9 0x000000000040efd1 in CGameGUI (this=0xafd300, winsys=0x6ed400) at gamegui.cpp:96
#10 0x000000000041ecd9 in main (argc=<value optimized out>, argv=<value optimized out>) at main.cpp:49
---- end ----

valgrind doesn't say anything interesting. So, everything seems to be fine until this line.
Commenting out frees at image.c:154 and image.c:155 helps.
Commenting out only the former doesn't: program still crashes at random points.

Also, when I start driving, textures of car internals are absent and errors are printed to console:
---- begin ----
Error: trying to draw a too small texture:
x=256, y=0
Error: trying to draw a too small texture:
x=256, y=0
Error: trying to draw a too small texture:
x=256, y=0
Error: trying to draw a too small texture:
x=256, y=0
---- end ----

Discussion

  • CJP
    CJP
    2011-01-11

    Identical to bug #1962017. See also my comment there for possible solutions.

    Additionally, I'd like to comment that the error message could be a bit more user-friendly and the compilation manual should really warn for this. I'll keep the issue open until these things are fixed.