Ryzom Client debug build on Mac problem (maybe same on Linux?)

Added by rti about 9 years ago


I lately ran into some problems running the Ryzom Client as a debug build on Mac OS X.
I wonder if anyone has a debug build running on Linux?

I looked a bit into it, but until now I have no idea how to solve it.
The file and line number information gdb is providing is complete nonsense. Like gdb having problems with all the luabind template voodoo.

This is the backtrace i get (frame #0, #1, #2 are not implemented in types_nl.h):

INF 700c7be0 client.cpp 497 main <Unknown> : Pre-Login Init of Ryzom success
INF 700c7be0 client.cpp 500 main <Unknown> : Login of Ryzom...

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x0000000106cd1890
0x000000010015ecb0 in newkey () at types_nl.h:378
378     const std::string nlMode("NL_DEBUG");
(gdb) bt
#0  0x000000010015ecb0 in newkey () at types_nl.h:378
#1  0x000000010015f765 in luaV_settable () at types_nl.h:378
#2  0x000000010015a708 in lua_settable () at types_nl.h:378
#3  0x00000001008df87a in luabind::adl::index_proxy<luabind::adl::object>::operator=<luabind::adl::object> (this=0x7fff5fbfe7f0, value=@0x7fff5fbfe8f0) at object.hpp:627
#4  0x0000000106cb1664 in luabind::detail::add_overload ()
#5  0x00000001008f1c23 in luabind::detail::constructor_registration<NLMISC::CRGBA, luabind::detail::null_type, boost::mpl::v_item<luabind::adl::argument const&, boost::mpl::v_item<void, boost::mpl::vector0<mpl_::na>, 0>, 0>, luabind::detail::null_type>::register_ (this=0x108dae230, L=0x10a128260) at class.hpp:359
#6  0x0000000106cbb1a3 in luabind::scope::register_ ()
#7  0x0000000106ca1dac in luabind::detail::class_registration::register_ ()
#8  0x0000000106cbb1a3 in luabind::scope::register_ ()
#9  0x0000000106cbb2f8 in luabind::module_::operator[] ()
#10 0x00000001008cfe93 in CLuaIHM::registerBasics (ls=@0x10a128c40) at /Users/rti/Development/ryzom/code/ryzom/client/src/interface_v3/lua_ihm.cpp:512
#11 0x00000001008d02f3 in CLuaIHM::registerAll (ls=@0x10a128c40) at /Users/rti/Development/ryzom/code/ryzom/client/src/interface_v3/lua_ihm.cpp:1478
#12 0x0000000100868ef9 in CInterfaceParser::initLUA (this=0x107c25200) at /Users/rti/Development/ryzom/code/ryzom/client/src/interface_v3/interface_parser.cpp:4632
#13 0x000000010084475d in CInterfaceManager::initLogin (this=0x107c25200) at /Users/rti/Development/ryzom/code/ryzom/client/src/interface_v3/interface_manager.cpp:438
#14 0x000000010034d2f9 in login () at /Users/rti/Development/ryzom/code/ryzom/client/src/login.cpp:813
#15 0x00000001001d9d9a in main (argc=1, argv=0x7fff5fbff608) at /Users/rti/Development/ryzom/code/ryzom/client/src/client.cpp:503

The crash happens as soon as CLuaIHM::registerBasics() tries to register the CRGBA class. Commenting this lets the code crash at the next part (registering ucstring).
Maybe the error is related to the recent changes made for using newer lua/luabind version?

Btw: the release build passes this code without any problems.


Replies (4)

RE: Ryzom Client debug build on Mac problem (maybe same on Linux?) - Added by vl about 9 years ago

first, are you sure everything is compiled in debug (nel and ryzom)? with same compiler/linker options?

second, is it possible that the debug and release binaries doesn't use the same allocator? for exampl, in release, when you allocate 4 bytes, you have 4 bytes, in debug, there s some extra debug value before and after the block.

if the lua is in release and ryzom/nel in debug, the mix can generate really strange behaviors.

last, it's very hard to know if it's a problem with debug mode, with mac or with 64 bits since you have all the 3 :)

RE: Ryzom Client debug build on Mac problem (maybe same on Linux?) - Added by rti about 9 years ago

Yes. when i tried, i compiled NeL and Ryzom in debug mode.
But I was about to ask it anyway... so combining NeL release with Ryzom debug is not a supported configuration?

I will double check compiler and linker options generated by CMake.
Yes, my Lua is built in release, and by LuaBind as well. I will check if building those in debug changes anything.

Thanks for the hints.

RE: Ryzom Client debug build on Mac problem (maybe same on Linux?) - Added by rti about 9 years ago

Thanks a lot for the hint. Lua debug build was the key.

I compilled both, lua and luabind, as static library with -g and the strange error is gone.