Segmentation fault on hrender
siriusxiv opened this issue · 4 comments
Confirmed on Ubuntu 14.04 with the latest commit of HIVE (commit 1a233b1) and all the submodules up to date.
hrender stopped after a segfault error.
Here is the gdb report:
(gdb) r
Program received signal SIGSEGV, Segmentation fault.
_IO_fgets (buf=0x7fffffffcb40 "lsgl_shader_source_GG1TLD", n=4095, fp=0x7fffffffcb40) at iofgets.c:50
50 iofgets.c: No such file or directory.
(gdb) bt
#0 _IO_fgets (buf=0x7fffffffcb40 "lsgl_shader_source_GG1TLD", n=4095, fp=0x7fffffffcb40) at iofgets.c:50
#1 0x00000000004c05ae in lsgl::FragmentShader::DoCompile() ()
#2 0x00000000004bfd3a in lsgl::Shader::Compile() ()
#3 0x000000000049d991 in CreateProgramSrc_SGL(char const*, unsigned int&) ()
#4 0x00000000004a05eb in VolumeBuffer::Create(VolumeModel const*) ()
#5 0x00000000004a29be in RenderCore::Render() ()
#6 0x00000000004a580d in render(lua_State*) ()
#7 0x00007ffff7990980 in luaD_precall () from /home/malik/workspace/riken/HIVE/build/bin/liblua.so
#8 0x00007ffff79a0574 in luaV_execute () from /home/malik/workspace/riken/HIVE/build/bin/liblua.so
#9 0x00007ffff7990fc9 in luaD_call () from /home/malik/workspace/riken/HIVE/build/bin/liblua.so
#10 0x00007ffff79901ac in luaD_rawrunprotected () from /home/malik/workspace/riken/HIVE/build/bin/liblua.so
#11 0x00007ffff7991301 in luaD_pcall () from /home/malik/workspace/riken/HIVE/build/bin/liblua.so
#12 0x00007ffff798982a in lua_pcallk () from /home/malik/workspace/riken/HIVE/build/bin/liblua.so
#13 0x00000000004a566f in SceneScript::Execute(char const*) ()
#14 0x000000000043293b in renderScene(char const*) ()
#15 0x0000000000432512 in main ()
The test files that reproduce the bug can be found here:
https://github.com/siriusxiv/RandomFiles/tree/master/segfault2
I ran the scene but couldn't reproduce seg fault(RHEL 6).
How about running cmake from a scratch?(and please ensure updating SURFACE submodule to recent master)
Indeed, the segfault did not occur again.
I guess it was because SURFACE submodule was not updated. I'll make sure to run cmake from scratch everytime from now.
Thanks! We may need to find a way to ensure we are using right version of submodules...(check hash value of a file or add some version checking in runtime)
Indeed, that is a good idea. Then I will open an issue issue labeled "enhancement" for that.