Closed jiahao closed 3 months ago
Following build instructions as in #40 gives this segfault running lldb ufotestall:
lldb ufotestall
[==========] Running 130 tests from 17 test cases. [----------] Global test environment set-up. [----------] 31 tests from CampaignTest Process 51613 stopped * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0) frame #0: 0x00007fffd503fd5d libGL.dylib`glBindTexture + 18 libGL.dylib`glBindTexture: -> 0x7fffd503fd5d <+18>: movq (%rdx), %rdi 0x7fffd503fd60 <+21>: movq 0x30(%rdx), %rax 0x7fffd503fd64 <+25>: movl %ecx, %esi 0x7fffd503fd66 <+27>: movl %r8d, %edx Target 0: (ufotestall) stopped. (lldb) bt * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0) * frame #0: 0x00007fffd503fd5d libGL.dylib`glBindTexture + 18 frame #1: 0x0000000100164e05 ufotestall`R_BindTexture_(texnum=1) at r_state.cpp:65 frame #2: 0x0000000100164d74 ufotestall`R_BindTextureDebug(texnum=1, file="/Users/cqm540/repos/ufoai/src/client/renderer/r_image.cpp", line=541, function="image_t *R_LoadImageData(const char *, const byte *, int, int, imagetype_t)") at r_state.cpp:74 frame #3: 0x0000000100133b1b ufotestall`R_LoadImageData(name="pics/icons/windowinfo", pic="\x96ǐ", width=18, height=18, type=it_pic) at r_image.cpp:541 frame #4: 0x000000010013401a ufotestall`R_FindImage(pname="pics/icons/windowinfo", type=it_pic) at r_image.cpp:630 frame #5: 0x000000010021d77e ufotestall`UI_LoadImage(name="icons/windowinfo") at ui_render.cpp:93 frame #6: 0x000000010021ec69 ufotestall`UI_AutoGenerateSprite(name="icons/windowinfo") at ui_sprite.cpp:75 frame #7: 0x000000010021eb79 ufotestall`UI_GetSpriteByName(name="icons/windowinfo") at ui_sprite.cpp:121 frame #8: 0x000000010017a089 ufotestall`UI_Button_SetIconByName(node=0x000000010574e3a0, name="icons/windowinfo") at ui_node_button.cpp:174 frame #9: 0x00000001001b9ccd ufotestall`uiButtonNode_t_set_icon(self=0x000000010574e3a0, name="icons/windowinfo") at ui_lua_shared.cpp:3026 frame #10: 0x00000001001b9c00 ufotestall`_wrap_uiButton_set_icon(L=0x000000010520b220) at ui_lua_shared.cpp:9244 frame #11: 0x0000000100429154 ufotestall`luaD_precall(L=0x000000010520b220, func=0x00000001068bdb10, nresults=0) at ldo.c:319 frame #12: 0x0000000100442c37 ufotestall`luaV_execute(L=0x000000010520b220, nexeccalls=3) at lvm.c:586 frame #13: 0x00000001004298d0 ufotestall`luaD_call(L=0x000000010520b220, func=0x000000010520b600, nResults=-1) at ldo.c:377 frame #14: 0x000000010041dfef ufotestall`f_call(L=0x000000010520b220, ud=0x00007fff5fbfeb38) at lapi.c:793 frame #15: 0x0000000100428805 ufotestall`luaD_rawrunprotected(L=0x000000010520b220, f=(ufotestall`f_call at lapi.c:791), ud=0x00007fff5fbfeb38) at ldo.c:116 frame #16: 0x0000000100429cca ufotestall`luaD_pcall(L=0x000000010520b220, func=(ufotestall`f_call at lapi.c:791), u=0x00007fff5fbfeb38, old_top=48, ef=0) at ldo.c:460 frame #17: 0x000000010041df7a ufotestall`lua_pcall(L=0x000000010520b220, nargs=0, nresults=-1, errfunc=0) at lapi.c:814 frame #18: 0x000000010020b15d ufotestall`UI_ParseAndLoadLuaScript(name="_assets.ufo", text=0x00007fff5fbfed30) at ui_lua.cpp:396 frame #19: 0x00000001001143ca ufotestall`CL_ParseClientData(type="lua", name="_assets.ufo", text=0x00007fff5fbfed30) at cl_main.cpp:810 frame #20: 0x000000010026ebd9 ufotestall`Com_ParseScripts(onlyServer=false) at scripts.cpp:3727 frame #21: 0x00000001002fc527 ufotestall`CampaignTest::SetUpTestCase() at test_campaign.cpp:93 frame #22: 0x00000001003dae93 ufotestall`testing::TestCase::RunSetUpTestCase(this=0x0000000105200420) at gtest.h:855 frame #23: 0x0000000100411b5e ufotestall`void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::TestCase, void>(object=0x0000000105200420, method=80 ae 3d 00 01 00 00 00 00 00 00 00 00 00 00 00, location="SetUpTestCase()")(), char const*) at gtest.cc:2078 frame #24: 0x00000001003dac3b ufotestall`void testing::internal::HandleExceptionsInMethodIfSupported<testing::TestCase, void>(object=0x0000000105200420, method=80 ae 3d 00 01 00 00 00 00 00 00 00 00 00 00 00, location="SetUpTestCase()")(), char const*) at gtest.cc:2114 frame #25: 0x00000001003daace ufotestall`testing::TestCase::Run(this=0x0000000105200420) at gtest.cc:2439 frame #26: 0x00000001003e94fc ufotestall`testing::internal::UnitTestImpl::RunAllTests(this=0x0000000105200100) at gtest.cc:4315 frame #27: 0x000000010041375e ufotestall`bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(object=0x0000000105200100, method=70 91 3e 00 01 00 00 00 00 00 00 00 00 00 00 00, location="auxiliary test code (environments or event listeners)")(), char const*) at gtest.cc:2078 frame #28: 0x00000001003e8f0b ufotestall`bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(object=0x0000000105200100, method=70 91 3e 00 01 00 00 00 00 00 00 00 00 00 00 00, location="auxiliary test code (environments or event listeners)")(), char const*) at gtest.cc:2114 frame #29: 0x00000001003e8db8 ufotestall`testing::UnitTest::Run(this=0x0000000104a72128) at gtest.cc:3926 frame #30: 0x00000001002fb5a1 ufotestall`RUN_ALL_TESTS() at gtest.h:2288 frame #31: 0x00000001002fb011 ufotestall`main(argc=1, argv=0x00007fff5fbff968) at test_all.cpp:135 frame #32: 0x00007fffe6372235 libdyld.dylib`start + 1 frame #33: 0x00007fffe6372235 libdyld.dylib`start + 1
(have no Mac, cannot reproduce this)
Following build instructions as in #40 gives this segfault running
lldb ufotestall
: