Segfault in Decal constructor making blooddecalfast
Reported by pabs3 on IRC:
hmm, is a crash after enabling debug mode, messing with parameters and fighting a bit something to report? challenge level 2 (
map2
) basically upped my strength to 1000, murdered the rabbits and got the crash
Crash log:
$ lugaru -d
--------------------------------------------------------------------------
Lugaru HD: The Rabbit's Foot, by Wolfire Games and the OSS Lugaru project.
Licensed under the GPL 2.0+ and CC-BY-SA 3.0 and 4.0 licenses.
More information, updates and bug reports at http://osslugaru.gitlab.io
Version 1.2 [Debian 1.2-2] -- None build
--------------------------------------------------------------------------
Loading config
Unknown config option 'Debug:' with value '1'. Ignoring.
Loading 3 accounts
Loading account 0/3
Loading account 1/3
Loading account 2/3
|funnybunny|
|funnybunny|
|10|
|2|
|1.5|
|10|
|2|
writing account 1/3 (pabs)
writing account 2/3 (test)
writing account 3/3 (medium)
|0.5|
|100|
|1.25|
|100|
|10|
|1000|
|1000|
|1.5|
|1.24|
|2|
writing account 1/3 (pabs)
writing account 2/3 (test)
writing account 3/3 (medium)
|1.5|
|1.75|
|2000|
|2000|
|2000|
writing account 1/3 (pabs)
writing account 2/3 (test)
writing account 3/3 (medium)
|1000|
|2000|
|2000|
writing account 1/3 (pabs)
writing account 2/3 (test)
writing account 3/3 (medium)
Segmentation fault (core dumped)
$ gdb -batch -n -ex 'set pagination off' -ex bt -ex 'thread apply all bt full' --core /var/crash/1000/29069-1000-1000-11-1506172005-chianamo--usr-games-lugaru.core /usr/games/lugaru
[New LWP 29069]
[New LWP 29079]
[New LWP 29078]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `lugaru -d'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x000055e8691318c3 in Decal::Decal (this=0x7ffd5cc35ea0, _position=..., _type=blooddecalfast, _opacity=0.600000024, _rotation=-355, _brightness=0.24000001, whichx=101175, whichy=-25874, size=0.639999986, terrain=..., first=true) at ./Source/Graphic/Decal.cpp:53
53 ./Source/Graphic/Decal.cpp: No such file or directory.
[Current thread is 1 (Thread 0x7f5cb23bc040 (LWP 29069))]
#0 0x000055e8691318c3 in Decal::Decal (this=0x7ffd5cc35ea0, _position=..., _type=blooddecalfast, _opacity=0.600000024, _rotation=-355, _brightness=0.24000001, whichx=101175, whichy=-25874, size=0.639999986, terrain=..., first=true) at ./Source/Graphic/Decal.cpp:53
#1 0x000055e869130c27 in Terrain::MakeDecalLock (this=this@entry=0x55e869402c20 <terrain>, type=type@entry=blooddecalfast, where=..., whichx=101175, whichy=-25874, size=size@entry=0.639999986, opacity=opacity@entry=0.600000024, rotation=rotation@entry=-355) at ./Source/Environment/Terrain.cpp:1323
#2 0x000055e8691311c6 in Terrain::MakeDecal (this=0x55e869402c20 <terrain>, type=type@entry=blooddecalfast, where=..., size=<optimized out>, opacity=opacity@entry=0.600000024, rotation=<optimized out>) at ./Source/Environment/Terrain.cpp:1297
#3 0x000055e86913eec0 in Sprite::Draw () at ./Source/Graphic/Sprite.cpp:401
#4 0x000055e8691b5174 in Game::DrawGLScene (side=stereoCenter) at ./Source/GameDraw.cpp:545
#5 0x000055e8691072c3 in main (argc=<optimized out>, argv=<optimized out>) at ./Source/main.cpp:699
Thread 3 (Thread 0x7f5ca5279700 (LWP 29078)):
#0 0x00007f5cb013066d in poll () at ../sysdeps/unix/syscall-template.S:84
No locals.
#1 0x00007f5caf0e86b1 in poll (__timeout=1234, __nfds=3, __fds=0x55e86b5b7110) at /usr/include/x86_64-linux-gnu/bits/poll2.h:46
No locals.
#2 poll_func (ufds=0x55e86b5b7110, nfds=3, timeout=1234, userdata=0x55e86b5cbc90) at pulse/thread-mainloop.c:69
mutex = 0x55e86b5cbc90
#3 0x00007f5caf0da070 in pa_mainloop_poll (m=m@entry=0x55e86b5bec30) at pulse/mainloop.c:844
__func__ = "pa_mainloop_poll"
__PRETTY_FUNCTION__ = "pa_mainloop_poll"
#4 0x00007f5caf0da700 in pa_mainloop_iterate (m=0x55e86b5bec30, block=<optimized out>, retval=0x0) at pulse/mainloop.c:926
r = 0
#5 0x00007f5caf0da790 in pa_mainloop_run (m=0x55e86b5bec30, retval=retval@entry=0x0) at pulse/mainloop.c:944
r = <optimized out>
#6 0x00007f5caf0e85f9 in thread (userdata=0x55e86b5cbf50) at pulse/thread-mainloop.c:100
m = 0x55e86b5cbf50
mask = {__val = {18446744067267100671, 18446744073709551615 <repeats 15 times>}}
prev_mask = {__val = {0, 140036102126740, 5, 0, 0, 140036066903952, 140035884551488, 140036102157215, 17723342345328784885, 17723342345328784885, 7959303351591398243, 7882826979255612277, 7308602655095616878, 32487697137033837, 7809924986204808562, 8439809899347272559}}
sa = {__sigaction_handler = {sa_handler = 0x0, sa_sigaction = 0x0}, sa_mask = {__val = {0, 5, 0, 1, 140036104086464, 94456721928032, 0, 0, 140036104087320, 140035884551024, 7231874830, 140036104086464, 140035884551008, 140036060344558, 2296172972, 4294967295}}, sa_flags = 0, sa_restorer = 0x0}
#7 0x00007f5cab59cc58 in internal_thread_func (userdata=0x55e86b5bed40) at pulsecore/thread-posix.c:81
t = 0x55e86b5bed40
#8 0x00007f5cafa23494 in start_thread (arg=0x7f5ca5279700) at pthread_create.c:333
__res = <optimized out>
pd = 0x7f5ca5279700
now = <optimized out>
unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140035884553984, -8259827541079201424, 0, 140726159761999, 140035884553984, 94456722552688, 8351495403303889264, 8351483339043400048}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
not_first_call = <optimized out>
pagesize_m1 = <optimized out>
sp = <optimized out>
freesize = <optimized out>
__PRETTY_FUNCTION__ = "start_thread"
#9 0x00007f5cb0139abf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
No locals.
Thread 2 (Thread 0x7f5ca557a700 (LWP 29079)):
#0 pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:143
No locals.
#1 0x00007f5caf0e8c98 in pa_threaded_mainloop_wait (m=0x55e86b5cbf50) at pulse/thread-mainloop.c:215
__func__ = "pa_threaded_mainloop_wait"
__PRETTY_FUNCTION__ = "pa_threaded_mainloop_wait"
#2 0x00007f5cb1f90f99 in ALCpulsePlayback_mixerProc (ptr=ptr@entry=0x55e86b6437f0) at ./Alc/backends/pulseaudio.c:818
self = 0x55e86b6437f0
device = 0x55e86b5cdb40
update_size = <optimized out>
frame_size = 8
len = 0
#3 0x00007f5cb1f96007 in althrd_starter (arg=<optimized out>) at ./common/threads.c:526
cntr = {func = 0x7f5cb1f90e30 <ALCpulsePlayback_mixerProc>, arg = 0x55e86b6437f0}
#4 0x00007f5cafa23494 in start_thread (arg=0x7f5ca557a700) at pthread_create.c:333
__res = <optimized out>
pd = 0x7f5ca557a700
now = <optimized out>
unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140035887703808, -8259827541079201424, 0, 140726159761935, 0, 140036104310848, 8351494715572250992, 8351483339043400048}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
not_first_call = <optimized out>
pagesize_m1 = <optimized out>
sp = <optimized out>
freesize = <optimized out>
__PRETTY_FUNCTION__ = "start_thread"
#5 0x00007f5cb0139abf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
No locals.
Thread 1 (Thread 0x7f5cb23bc040 (LWP 29069)):
#0 0x000055e8691318c3 in Decal::Decal (this=0x7ffd5cc35ea0, _position=..., _type=blooddecalfast, _opacity=0.600000024, _rotation=-355, _brightness=0.24000001, whichx=101175, whichy=-25874, size=0.639999986, terrain=..., first=true) at ./Source/Graphic/Decal.cpp:53
placex = <optimized out>
placez = <optimized out>
rot = <optimized out>
#1 0x000055e869130c27 in Terrain::MakeDecalLock (this=this@entry=0x55e869402c20 <terrain>, type=type@entry=blooddecalfast, where=..., whichx=101175, whichy=-25874, size=size@entry=0.639999986, opacity=opacity@entry=0.600000024, rotation=rotation@entry=-355) at ./Source/Environment/Terrain.cpp:1323
rot = {x = 0, y = 0, z = 0}
decalbright = 0.24000001
decal = {position = {x = 607055.562, y = -4.28889942, z = -155247.859}, type = blooddecalfast, opacity = 0.600000024, rotation = 0, alivetime = 0, brightness = 4.56879351e-41, texcoords = {{2.35610961e-38, 1.40129846e-45}, {2.2577826e+26, 3.08173558e-41}, {2.28589839e+26, 3.08173558e-41}}, vertex = {{x = 0, y = 0, z = 0}, {x = 0, y = 0, z = 0}, {x = 0, y = 0, z = 0}}}
decal2 = {position = {x = 3.60133705e-43, y = 1.40129846e-45, z = 4.39938242e+17}, type = 32765, opacity = 2.24207754e-44, rotation = 0, alivetime = 1.12103877e-44, brightness = 4.56879351e-41, texcoords = {{2.28411053e+26, 3.08173558e-41}, {2.28410389e+26, 3.08173558e-41}, {0, 1}}, vertex = {{x = 0, y = 1, z = 2.28508747e+26}, {x = 3.08173558e-41, y = 2.28495318e+26, z = 3.08173558e-41}, {x = 2.23045928e+26, y = 3.08173558e-41, z = -0.000736042857}}}
#2 0x000055e8691311c6 in Terrain::MakeDecal (this=0x55e869402c20 <terrain>, type=type@entry=blooddecalfast, where=..., size=<optimized out>, opacity=opacity@entry=0.600000024, rotation=<optimized out>) at ./Source/Environment/Terrain.cpp:1297
patchx = {101176, 101175, 101175, 101176}
patchy = {-25874, -25874, -25874, -25874}
#3 0x000055e86913eec0 in Sprite::Draw () at ./Source/Graphic/Sprite.cpp:401
where = <optimized out>
startpoint = {x = 584793.688, y = -18.4376106, z = -149883.656}
movepoint = {x = 0, y = 0, z = 0}
whichtri = <optimized out>
endpoint = {x = 606759.938, y = -24.2888985, z = -155543.516}
footpoint = {x = 0, y = 0, z = 0}
rotationpoint = 0
spritehit = false
i = <optimized out>
k = <optimized out>
M = {0.427814305, -0.284503222, 0.857923508, 0, 0, 0.94917047, 0.314762384, 0, -0.903866649, -0.134659857, 0.406068712, 0, 0.0896606445, -1.37133789, -3.10083008, 1}
point = {x = 0.0896606445, y = -1.37133789, z = -3.10083008}
distancemult = 2.4971242
lasttype = 0
lastspecial = 0
whichpatchx = 25293
whichpatchz = -6468
start = {x = 0.171535492, y = 2.84024811, z = -14.3095379}
end = {x = 1.22919559, y = 1.78985596, z = -17.940134}
colpoint = {x = -163587.875, y = 50125.0508, z = -112443.078}
check = true
blend = true
tempmult = 0.0755999982
difference = {x = 0.900865316, y = 0.00351776718, z = 0.434084475}
lightcolor = {0.875, 0.875, 0.939999998}
viewdistsquared = 10000
tempviewer = {x = 759.373596, y = 72.3249588, z = 983.910217}
#4 0x000055e8691b5174 in Game::DrawGLScene (side=stereoCenter) at ./Source/GameDraw.cpp:545
opacity = 0.400000006
rotation = 0
changed = 0
olddrawmode = <optimized out>
terrainlight = {x = 0.969131351, y = 0.969131351, z = 0.983626366}
distance = -172.424133
point = {x = 6.01932526, y = 4.24164581, z = -6.64599657}
size = 0.400000006
texcoordwidth = 1
texcoordheight = 1
texviewwidth = 1024
texviewheight = 1024
checkpoint = {x = 762.377441, y = 74.4878693, z = 985.24176}
tempmult = 0.0144000007
tutorialopac = <optimized out>
string = ""
drawmode = 0
#5 0x000055e8691072c3 in main (argc=<optimized out>, argv=<optimized out>) at ./Source/main.cpp:699
e = {type = 771, common = {type = 771, timestamp = 771358}, window = {type = 771, timestamp = 771358, windowID = 2, event = 96 '`', padding1 = 0 '\000', padding2 = 0 '\000', padding3 = 0 '\000', data1 = 1796737568, data2 = 21992}, key = {type = 771, timestamp = 771358, windowID = 2, state = 96 '`', repeat = 0 '\000', padding2 = 0 '\000', padding3 = 0 '\000', keysym = {scancode = 1796737568, sym = 21992, mod = 62208, unused = 3526203218}}, edit = {type = 771, timestamp = 771358, windowID = 2, text = "`\000\000\000 \n\030k\350U\000\000\000\363@\272R\227-Ҡ\367\027k\350U\000\000d\370\027k", start = 21992, length = 1556308288}, text = {type = 771, timestamp = 771358, windowID = 2, text = "`\000\000\000 \n\030k\350U\000\000\000\363@\272R\227-Ҡ\367\027k\350U\000\000d\370\027k"}, motion = {type = 771, timestamp = 771358, windowID = 2, which = 96, state = 1796737568, x = 21992, y = -1170148608, xrel = -768764078, yrel = 1796732832}, button = {type = 771, timestamp = 771358, windowID = 2, which = 96, button = 32 ' ', state = 10 '\n', clicks = 24 '\030', padding1 = 107 'k', x = 21992, y = -1170148608}, wheel = {type = 771, timestamp = 771358, windowID = 2, which = 96, x = 1796737568, y = 21992, direction = 3124818688}, jaxis = {type = 771, timestamp = 771358, which = 2, axis = 96 '`', padding1 = 0 '\000', padding2 = 0 '\000', padding3 = 0 '\000', value = 2592, padding4 = 27416}, jball = {type = 771, timestamp = 771358, which = 2, ball = 96 '`', padding1 = 0 '\000', padding2 = 0 '\000', padding3 = 0 '\000', xrel = 2592, yrel = 27416}, jhat = {type = 771, timestamp = 771358, which = 2, hat = 96 '`', value = 0 '\000', padding1 = 0 '\000', padding2 = 0 '\000'}, jbutton = {type = 771, timestamp = 771358, which = 2, button = 96 '`', state = 0 '\000', padding1 = 0 '\000', padding2 = 0 '\000'}, jdevice = {type = 771, timestamp = 771358, which = 2}, caxis = {type = 771, timestamp = 771358, which = 2, axis = 96 '`', padding1 = 0 '\000', padding2 = 0 '\000', padding3 = 0 '\000', value = 2592, padding4 = 27416}, cbutton = {type = 771, timestamp = 771358, which = 2, button = 96 '`', state = 0 '\000', padding1 = 0 '\000', padding2 = 0 '\000'}, cdevice = {type = 771, timestamp = 771358, which = 2}, adevice = {type = 771, timestamp = 771358, which = 2, iscapture = 96 '`', padding1 = 0 '\000', padding2 = 0 '\000', padding3 = 0 '\000'}, quit = {type = 771, timestamp = 771358}, user = {type = 771, timestamp = 771358, windowID = 2, code = 96, data1 = 0x55e86b180a20, data2 = 0xd22d9752ba40f300}, syswm = {type = 771, timestamp = 771358, msg = 0x6000000002}, tfinger = {type = 771, timestamp = 771358, touchId = 412316860418, fingerId = 94456717511200, x = -0.000736042857, y = -1.86392019e+11, dx = 1.83717175e+26, dy = 3.08173558e-41, pressure = 1.8372079e+26}, mgesture = {type = 771, timestamp = 771358, touchId = 412316860418, dTheta = 1.83804539e+26, dDist = 3.08173558e-41, x = -0.000736042857, y = -1.86392019e+11, numFingers = 63392, padding = 27415}, dgesture = {type = 771, timestamp = 771358, touchId = 412316860418, gestureId = 94456717511200, numFingers = 3124818688, error = -1.86392019e+11, x = 1.83717175e+26, y = 3.08173558e-41}, drop = {type = 771, timestamp = 771358, file = 0x6000000002 <error: Cannot access memory at address 0x6000000002>, windowID = 1796737568}, padding = "\003\003\000\000\036\305\v\000\002\000\000\000`\000\000\000 \n\030k\350U\000\000\000\363@\272R\227-Ҡ\367\027k\350U\000\000d\370\027k\350U\000\000@a\303\\\375\177\000"}
gameDone = false
gameFocused = true
stats = {buffer_max = <optimized out>, options_max = 1}
parse = {op_count = 1, nonop_count = 110, nonop_args = 0x0, err = false}
Edited by username-removed-546878