Freebsd issue? - Printable Version +- Cuberite Forum (https://forum.cuberite.org) +-- Forum: Plugins (https://forum.cuberite.org/forum-1.html) +--- Forum: Plugin Discussion (https://forum.cuberite.org/forum-8.html) +--- Thread: Freebsd issue? (/thread-2937.html) Pages:
1
2
|
Freebsd issue? - wpmaster - 04-06-2017 I have a Freebsd machine running Cuberite It runs fine without major problems but I am stuck making Lua plugins because using ForEachEntity function and relavant callbackfunction gives me segfault error Please help me function GetIf(Name) -- Check if unique mob matching name exist cRoot:Get():ForEachWorld( function (w) LOG("fetching from " .. w:GetName()) w:ForEachEntity( function (e) if not(e:IsMob()) then return true else return true end end ) end ) end RE: Freebsd issue? - xoft - 04-06-2017 Hello, that is weird. Are you running a precompiled binary downloaded from our buildservers, or are you compiling yourself? Would you be willing to compile a debug version and run it under a debugger to see the exact stacktrace? RE: Freebsd issue? - wpmaster - 04-06-2017 (04-06-2017, 05:41 PM)xoft Wrote: Hello, Thank you for your fast reply, I am running precompiled version and also tried self-compile version which led to same result (Independant Lua included with source files is compiled) I'd really like to help you because I myself am a C programmer and like C projects Can you direct me how to install debug version? I will post stacktrace when I come from work FYI : other ForEach functions work properly RE: Freebsd issue? - Seadragon91 - 04-06-2017 For compiling debug build https://github.com/cuberite/cuberite/blob/master/COMPILING.md#debug-mode For debugging follow the steps in this thread https://forum.cuberite.org/thread-631.html RE: Freebsd issue? - wpmaster - 04-06-2017 (04-06-2017, 06:28 PM)Seadragon91 Wrote: For compiling debug build tyvm I am going to compile that version and follow steps after that It's going to take some time, maybe a day RE: Freebsd issue? - wpmaster - 04-07-2017 (04-06-2017, 05:41 PM)xoft Wrote: Hello, attached gdb crash log tho not sure I am doing right because it's my first time using gdb :P Code: Currently logging to "crash.txt". I guess this issue is related to Freebsd POSIX multithread library... RE: Freebsd issue? - Seadragon91 - 04-07-2017 When is the code called? On startup from server or from command handler, hook or etc. RE: Freebsd issue? - Seadragon91 - 04-07-2017 I added the code to the Initialize of a plugin and Cuberite crashes every time on startup. Your stack trace is nearly the same like on my side. Plugins are initialized, before the worlds are loaded. The crash is still a problem, but for now it should work running the code, when the worlds have been loaded. For example from command handler or a hook. RE: Freebsd issue? - wpmaster - 04-07-2017 (04-07-2017, 02:39 AM)Seadragon91 Wrote: When is the code called? On startup from server or from command handler, hook or etc. At server startup It's really weird because the plugin does not produce segfault when it's reloaded and fired Thank you for looking into the log RE: Freebsd issue? - wpmaster - 04-07-2017 (04-07-2017, 02:59 AM)Seadragon91 Wrote: I added the code to the Initialize of a plugin and Cuberite crashes every time on startup. Your stack trace is nearly the same like on my side. I will give it a try, thank you |