|
|
|
|
Re: Building 4DIAC Forte on macOS with luajit leads to segfault on start [message #1822653 is a reply to message #1822603] |
Tue, 10 March 2020 20:03 |
Radimir Sorokin Messages: 4 Registered: March 2020 |
Junior Member |
|
|
Thank you for your responses!
Quote:Have you tried luajit in other OS?
No, unfortunately, I have no such options.
Quote:It didn't work correctly(the behavior is not correct)
Can you elaborate on this? Does this mean I shouldn't rely on dynamic type loading at all?
Quote:In other OS we used the branch v2.0 of luajit-2.0 repo. Did you try that branch?
Yes, I was trying v2.0.5 for the first time and now tried v2.0.0 with the same effect.
Quote:can you run your 4diac FORTE with gdb so that we can see a backtrace on where the segfault is happening. This can help us trace this down.
Sure! Here what I got:
lldb) target create "forte"
Current executable set to 'forte' (x86_64).
(lldb) b lj_api.c:626
Breakpoint 1: where = libluajit-5.1.2.dylib`lua_pushcclosure + 12 at lj_api.c:626:3, address = 0x00007fff04c5b99c
(lldb) run
Process 95645 launched: '/usr/local/bin/forte' (x86_64)
libluajit-5.1.2.dylib was compiled with optimization - stepping may behave oddly; variables may not be available.
Process 95645 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
frame #0: 0x000000010045d99c libluajit-5.1.2.dylib`lua_pushcclosure(L=0x0000000000000000, f=(libluajit-5.1.2.dylib`luaopen_base at lib_base.c:673), n=0) at lj_api.c:626:3 [opt]
623 LUA_API void lua_pushcclosure(lua_State *L, lua_CFunction f, int n)
624 {
625 GCfunc *fn;
-> 626 lj_gc_check(L);
627 api_checknelems(L, n);
628 fn = lj_func_newC(L, (MSize)n, getcurrenv(L));
629 fn->c.f = f;
Target 0: (forte) stopped.
(lldb) frame info
frame #0: 0x000000010045d99c libluajit-5.1.2.dylib`lua_pushcclosure(L=0x0000000000000000, f=(libluajit-5.1.2.dylib`luaopen_base at lib_base.c:673), n=0) at lj_api.c:626:3 [opt]
(lldb) frame variable
(lua_State *) L = 0x0000000000000000
(lua_CFunction) f = 0x00000001004a77e0 (libluajit-5.1.2.dylib`luaopen_base at lib_base.c:673)
(int) n = 0
(GCfunc *) fn = <variable not available>
(lldb) thread backtrace
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
* frame #0: 0x000000010045d99c libluajit-5.1.2.dylib`lua_pushcclosure(L=0x0000000000000000, f=(libluajit-5.1.2.dylib`luaopen_base at lib_base.c:673), n=0) at lj_api.c:626:3 [opt]
frame #1: 0x00000001004b3a12 libluajit-5.1.2.dylib`luaL_openlibs(L=0x0000000000000000) at lib_init.c:41:5 [opt]
frame #2: 0x0000000100028588 forte`CLuaEngine::CLuaEngine(this=0x00000001007001a0) at luaengine.cpp:47:3
frame #3: 0x00000001000285a5 forte`CLuaEngine::CLuaEngine(this=0x00000001007001a0) at luaengine.cpp:45:26
frame #4: 0x00000001000220fa forte`CResource::CResource(this=0x0000000100700630, pa_pstInterfaceSpec=0x00000001000c4968, pa_nInstanceNameId=4294967295, pa_acFBConnData="", pa_acFBVarsData="��
") at resource.cpp:53:19
frame #5: 0x000000010009ab0b forte`CDevice::CDevice(this=0x0000000100700630, pa_pstInterfaceSpec=0x00000001000c4968, pa_nInstanceNameId=4294967295, pa_acFBConnData="", pa_acFBVarsData="��
") at device.h:49:9
frame #6: 0x000000010009a9e7 forte`RMT_DEV::RMT_DEV(this=0x0000000100700630) at RMT_DEV.cpp:28:3
frame #7: 0x000000010009ab75 forte`RMT_DEV::RMT_DEV(this=0x0000000100700630) at RMT_DEV.cpp:29:32
frame #8: 0x00000001000021a1 forte`createDev(pa_acMGRID="localhost:61499") at main.cpp:65:15
frame #9: 0x00000001000022bd forte`main(argc=1, arg=0x00007ffeefbff7c8) at main.cpp:91:5
frame #10: 0x00007fff6911b7fd libdyld.dylib`start + 1
frame #11: 0x00007fff6911b7fd libdyld.dylib`start + 1
|
|
|
|
|
|
|
Re: Building 4DIAC Forte on macOS with luajit leads to segfault on start [message #1822696 is a reply to message #1822667] |
Wed, 11 March 2020 15:17 |
|
Radimir Sorokin wrote on Wed, 11 March 2020 08:21Unfortunately, specifying these options gain no effect.
To bad. From your backtrace I can see that the method luaL_newstate(); returns a null pointer. I googled a bit and sofar these linker options seem to be the only right solution. However as I don't have a mac for testing I don't know how to correclty get 4diac FORTE linked with them.
|
|
|
|
Powered by
FUDForum. Page generated in 0.04163 seconds