mehah / otclient

An alternative tibia client for otserv written in C++20 and Lua, made with a modular system that uses lua scripts for ingame interface and functionality, making otclient flexible and easy to customize
Other
262 stars 202 forks source link

Segfault on login #595

Closed marcin-szmagara closed 10 months ago

marcin-szmagara commented 1 year ago

Priority

High

Area

What happened?

I tried connecting to my local 12.86 forogttenserver instance, as well as a public 8.6 otserver, which works fine with edubart/otclient (and also uses forgottenserver).

I get to pick a character and while it's loading the segfault occurs.

commit 1494437
Logs ``` ms@pc:~/rep/otclient$ ./otclient GPU NVIDIA GeForce RTX 3060 Ti/PCIe/SSE2 OpenGL 4.6.0 NVIDIA 525.105.17 [ALSOFT] (EE) available update failed: Broken pipe [ALSOFT] (EE) available update failed: Broken pipe [ALSOFT] (EE) available update failed: Broken pipe [ALSOFT] (EE) available update failed: Broken pipe [ALSOFT] (EE) available update failed: Broken pipe == application started at Sep 27 2023 14:16:23 == operating system: Debian GNU/Linux 12 OTClient - Redemption 1.0 rev 0.000 (desenv) built on Sep 27 2023 for arch x64 [ALSOFT] (EE) available update failed: Broken pipe [ALSOFT] (EE) available update failed: Broken pipe [ALSOFT] (EE) available update failed: Broken pipe [ALSOFT] (EE) available update failed: Broken pipe [ALSOFT] (EE) available update failed: Broken pipe Startup done :] Segmentation fault (core dumped) ```
Backtrace ``` #0 0x00007ffff7ea5b29 in glBindTexture () from /lib/x86_64-linux-gnu/libGL.so.1 #1 0x0000555555761ad4 in Texture::bind (this=0x7fffcc348e10) at /home/ms/rep/otclient/src/framework/graphics/texture.cpp:105 #2 Texture::setSmooth (this=0x7fffcc348e10, smooth=) at /home/ms/rep/otclient/src/framework/graphics/texture.cpp:130 #3 0x00005555557633d3 in TextureManager::getTexture ( this=0x55555610ebc0 , fileName="/images/game/emblems/emblem_blue", smooth=) at /usr/include/c++/13/bits/shared_ptr_base.h:1665 #4 0x0000555555817dd0 in Creature::setEmblemTexture (this=0x7fffcc3461d0, filename=...) at /home/ms/rep/otclient/src/client/creature.cpp:778 #5 0x00005555557f553c in std::function, std::allocator > const&, std::__cxx11::basic_string, std::allocator > const&)>::operator()(std::__cxx11::basic_string, std::allocator > const&, std::__cxx11::basic_string, std::allocator > const&) const (__args#1="/images/game/emblems/emblem_blue", __args#0="", this=0x555556b46170) at /usr/include/c++/13/bits/std_function.h:591 #6 luabinder::call_fun_and_push_result const&, std::__cxx11::basic_string, std::allocator > const&)>, std::shared_ptr, std::__cxx11::basic_string, std::allocator > >(std::function for more, q to quit, c to continue without paging-- td::shared_ptr const&, std::__cxx11::basic_string, std::allocator > const&)> const&, LuaInterface*, std::shared_ptr const&, std::__cxx11::basic_string, std::allocator > const&) (f=...) at /home/ms/rep/otclient/src/framework/luaengine/luabinder.h:74 #7 luabinder::expand_fun_arguments<0, void>::call, std::__cxx11::basic_string, std::allocator > >, std::function const&, std::__cxx11::basic_string, std::allocator > const&)>, std::shared_ptr, std::__cxx11::basic_string, std::allocator > >(std::tuple, std::__cxx11::basic_string, std::allocator > > const&, std::function const&, std::__cxx11::basic_string, std::allocator > const&)> const&, LuaInterface*, std::shared_ptr const&, std::__cxx11::basic_string, std::allocator > const&) (lua=0x55555610d500 , f=...) at /home/ms/rep/otclient/src/framework/luaengine/luabinder.h:94 #8 luabinder::expand_fun_arguments<1, void>::call, std::__cxx11::basic_string, std::allocator > >, std::function const&, std::__cxx11::basic_string, std::allocator > const&)>, std::__cxx11::basic_string, std::allocator > >(std::tuple, std::__cxx11::basic_string for more, q to quit, c to continue without paging-- raits, std::allocator > > const&, std::function const&, std::__cxx11::basic_string, std::allocator > const&)> const&, LuaInterface*, std::__cxx11::basic_string, std::allocator > const&) ( lua=0x55555610d500 , f=..., tuple=std::tuple containing = {...}) at /home/ms/rep/otclient/src/framework/luaengine/luabinder.h:85 #9 luabinder::expand_fun_arguments<2, void>::call, std::__cxx11::basic_string, std::allocator > >, std::function const&, std::__cxx11::basic_string, std::allocator > const&)>>(std::tuple, std::__cxx11::basic_string, std::allocator > > const&, std::function const&, std::__cxx11::basic_string, std::allocator > const&)> const&, LuaInterface*) (lua=0x55555610d500 , f=..., tuple=std::tuple containing = {...}) at /home/ms/rep/otclient/src/framework/luaengine/luabinder.h:85 #10 luabinder::bind_fun_specializer const&, std::__cxx11::basic_string, std::allocator > const&)>, std::tuple, std::__cxx11::basic_string, std::allocator > > >(std::function const&, std::__cxx11::basic_string, std::allocator > const&)> const&)::{lambda(LuaInterface*)#1}::operator()(LuaInterface*) const (lua=0x55555610d500 , --Type for more, q to quit, c to continue without paging-- __closure=0x555556b46170) at /home/ms/rep/otclient/src/framework/luaengine/luabinder.h:112 #11 std::__invoke_impl const&, std::__cxx11::basic_string, std::allocator > const&)>, std::tuple, std::__cxx11::basic_string, std::allocator > > >(std::function const&, std::__cxx11::basic_string, std::allocator > const&)> const&)::{lambda(LuaInterface*)#1}&, LuaInterface*>(std::__invoke_other, luabinder::bind_fun_specializer const&, std::__cxx11::basic_string, std::allocator > const&)>, std::tuple, std::__cxx11::basic_string, std::allocator > > >(std::function const&, std::__cxx11::basic_string, std::allocator > const&)> const&)::{lambda(LuaInterface*)#1}&, LuaInterface*&&) (__f=...) at /usr/include/c++/13/bits/invoke.h:61 #12 std::__invoke_r const&, std::__cxx11::basic_string, std::allocator > const&)>, std::tuple, std::__cxx11::basic_string, std::allocator > > >(std::function const&, std::__cxx11::basic_string, std::allocator > const&)> const&)::{lambda(LuaInterface*)#1}&, LuaInterface*>(luabinder::bind_fun_specializer for more, q to quit, c to continue without paging-- , std::function const&, std::__cxx11::basic_string, std::allocator > const&)>, std::tuple, std::__cxx11::basic_string, std::allocator > > >(std::function const&, std::__cxx11::basic_string, std::allocator > const&)> const&)::{lambda(LuaInterface*)#1}&, LuaInterface*&&) (__fn=...) at /usr/include/c++/13/bits/invoke.h:114 #13 std::_Function_handler const&, std::__cxx11::basic_string, std::allocator > const&)>, std::tuple, std::__cxx11::basic_string, std::allocator > > >(std::function const&, std::__cxx11::basic_string, std::allocator > const&)> const&)::{lambda(LuaInterface*)#1}>::_M_invoke(std::_Any_data const&, LuaInterface*&&) (__functor=..., __args#0=) at /usr/include/c++/13/bits/std_function.h:290 #14 0x00005555557651b1 in std::function::operator()(LuaInterface*) const (__args#0=0x55555610d500 , this=) at /usr/include/c++/13/bits/std_function.h:591 #15 LuaInterface::luaCppFunctionCallback () at /home/ms/rep/otclient/src/framework/luaengine/luainterface.cpp:623 #16 0x000055555589cd56 in lj_BC_FUNCC () #17 0x000055555588929e in lua_pcall () --Type for more, q to quit, c to continue without paging-- #18 0x0000555555767bf8 in LuaInterface::pcall (errorFuncIndex=1, numRets=-1, numArgs=2, this=0x55555610d500 ) at /home/ms/rep/otclient/src/framework/luaengine/luainterface.cpp:807 #19 LuaInterface::safeCall (this=this@entry=0x55555610d500 , numArgs=numArgs@entry=2, numRets=numRets@entry=-1) at /home/ms/rep/otclient/src/framework/luaengine/luainterface.cpp:429 #20 0x0000555555767e50 in LuaInterface::signalCall ( this=0x55555610d500 , numArgs=2, numRets=-1) at /home/ms/rep/otclient/src/framework/luaengine/luainterface.cpp:463 #21 0x00005555558544e5 in LuaObject::luaCallLuaField(std::basic_string_view >, unsigned char const&) [clone .isra.0] (this=, field=...) at /home/ms/rep/otclient/src/framework/luaengine/luaobject.h:184 #22 0x00005555557bc1ce in LuaObject::callLuaField (field=..., this=) at /home/ms/rep/otclient/src/framework/luaengine/luaobject.h:204 #23 Creature::setEmblem (emblem=3 '\003', this=) at /home/ms/rep/otclient/src/client/creature.cpp:773 #24 ProtocolGame::getCreature (this=this@entry=0x7fffcc1800e0, msg=std::shared_ptr (use count 7, weak count 1) = {...}, type=) at /home/ms/rep/otclient/src/client/protocolgameparse.cpp:2876 #25 0x00005555557bc98e in ProtocolGame::getThing ( --Type for more, q to quit, c to continue without paging--c this=this@entry=0x7fffcc1800e0, msg=std::shared_ptr (use count 7, weak count 1) = {...}) at /home/ms/rep/otclient/src/client/protocolgameparse.cpp:2665 #26 0x00005555557bcc2e in ProtocolGame::setTileDescription ( this=this@entry=0x7fffcc1800e0, msg=std::shared_ptr (use count 7, weak count 1) = {...}, position=...) at /home/ms/rep/otclient/src/client/protocolgameparse.cpp:2593 #27 0x00005555557bce00 in ProtocolGame::setFloorDescription ( this=this@entry=0x7fffcc1800e0, msg=std::shared_ptr (use count 7, weak count 1) = {...}, x=x@entry=1023, y=y@entry=1035, z=7, width=width@entry=18, height=14, offset=0, skip=0) at /home/ms/rep/otclient/src/client/protocolgameparse.cpp:2565 #28 0x00005555557bd59e in ProtocolGame::setMapDescription ( this=this@entry=0x7fffcc1800e0, msg=std::shared_ptr (use count 7, weak count 1) = {...}, x=1023, y=1035, z=7, width=18, height=14) at /home/ms/rep/otclient/src/client/protocolgameparse.cpp:2556 #29 0x00005555557bd6d4 in ProtocolGame::parseMapDescription ( this=this@entry=0x7fffcc1800e0, msg=std::shared_ptr (use count 7, weak count 1) = {...}) at /home/ms/rep/otclient/src/client/protocolgameparse.cpp:972 #30 0x00005555557be742 in ProtocolGame::parseMessage ( this=this@entry=0x7fffcc1800e0, msg=std::shared_ptr (use count 7, weak count 1) = {...}) at /home/ms/rep/otclient/src/client/protocolgameparse.cpp:110 #31 0x00005555557c02b9 in ProtocolGame::onRecv (this=0x7fffcc1800e0, inputMessage=...) at /home/ms/rep/otclient/src/client/protocolgame.cpp:69 #32 0x0000555555752a63 in std::function::operator()(unsigned char*, unsigned short) const (__args#1=, __args#0=, this=0x7fffcc16f2f0) at /usr/include/c++/13/bits/std_function.h:591 #33 Connection::onRecv (recvSize=13140, error=std::error_code = {std::_V2::error_category: 0}, this=0x7fffcc16f290) at /home/ms/rep/otclient/src/framework/net/connection.cpp:305 #34 operator() ( PH2=, PH1=std::error_code = {std::_V2::error_category: 0}, __closure=) at /home/ms/rep/otclient/src/framework/net/connection.cpp:179 #35 asio::detail::read_op, asio::mutable_buffers_1, const asio::mutable_buffer*, asio::detail::transfer_all_t, Connection::read(uint16_t, const RecvCallback&):: >::operator() (start=0, bytes_transferred=, ec=std::error_code = {std::_V2::error_category: 0}, this=) at /home/ms/rep/otclient/build/linux-release/vcpkg_installed/x64-linux/include/asio/impl/read.hpp:396 #36 asio::detail::binder2, asio::mutable_buffers_1, const asio::mutable_buffer*, asio::detail::transfer_all_t, Connection::read(uint16_t, const RecvCallback&):: >, std::error_code, long unsigned int>::operator()(void) (this=) at /home/ms/rep/otclient/build/linux-release/vcpkg_installed/x64-linux/include/asio/detail/bind_handler.hpp:288 #37 0x0000555555742ffa in asio::asio_handler_invoke, asio::mutable_buffers_1, const asio::mutable_buffer*, asio::detail::transfer_all_t, Connection::read(uint16_t, const RecvCallback&):: >, std::error_code, long unsigned int> > (function=...) at /home/ms/rep/otclient/build/linux-release/vcpkg_installed/x64-linux/include/asio/handler_invoke_hook.hpp:87 #38 asio_handler_invoke_helpers::invoke, asio::mutable_buffers_1, const asio::mutable_buffer*, asio::detail::transfer_all_t, Connection::read(uint16_t, const RecvCallback&):: >, std::error_code, long unsigned int>, Connection::read(uint16_t, const RecvCallback&):: > (context=..., function=...) at /home/ms/rep/otclient/build/linux-release/vcpkg_installed/x64-linux/include/asio/detail/handler_invoke_helpers.hpp:54 #39 asio::detail::asio_handler_invoke, asio::mutable_buffers_1, const asio::mutable_buffer*, asio::detail::transfer_all_t, Connection::read(uint16_t, const RecvCallback&):: >, std::error_code, long unsigned int>, asio::basic_stream_socket, asio::mutable_buffers_1, const asio::mutable_buffer*, asio::detail::transfer_all_t, Connection::read(uint16_t, const RecvCallback&):: > ( this_handler=0x7fffd7ffeae0, function=...) at /home/ms/rep/otclient/build/linux-release/vcpkg_installed/x64-linux/include/asio/impl/read.hpp:464 #40 asio_handler_invoke_helpers::invoke, asio::mutable_buffers_1, const asio::mutable_buffer*, asio::detail::transfer_all_t, Connection::read(uint16_t, const RecvCallback&):: >, std::error_code, long unsigned int>, asio::detail::read_op, asio::mutable_buffers_1, const asio::mutable_buffer*, asio::detail::transfer_all_t, Connection::read(uint16_t, const RecvCallback&):: > > (context=..., function=...) at /home/ms/rep/otclient/build/linux-release/vcpkg_installed/x64-linux/include/asio/detail/handler_invoke_helpers.hpp:54 #41 asio::detail::handler_work, asio::mutable_buffers_1, const asio::mutable_buffer*, asio::detail::transfer_all_t, Connection::read(uint16_t, const RecvCallback&):: >, asio::any_io_executor, void>::complete, asio::mutable_buffers_1, const asio::mutable_buffer*, asio::detail::transfer_all_t, Connection::read(uint16_t, const RecvCallback&):: >, std::error_code, long unsigned int> > (handler=..., function=..., this=0x7fffd7ffea60) at /home/ms/rep/otclient/build/linux-release/vcpkg_installed/x64-linux/include/asio/detail/handler_work.hpp:511 #42 asio::detail::reactive_socket_recv_op, asio::mutable_buffers_1, const asio::mutable_buffer*, asio::detail::transfer_all_t, Connection::read(uint16_t, const RecvCallback&):: >, asio::any_io_executor>::do_complete(void *, asio::detail::operation *, const asio::error_code &, std::size_t) (owner=0x5555561c56d0, base=0x7fffcc16f920) at /home/ms/rep/otclient/build/linux-release/vcpkg_installed/x64-linux/include/asio/detail/reactive_socket_recv_op.hpp:146 #43 0x00005555556e4945 in asio::detail::scheduler_operation::complete ( bytes_transferred=, ec=..., owner=, this=, this=, owner=, ec=..., bytes_transferred=) at /home/ms/rep/otclient/build/linux-release/vcpkg_installed/x64-linux/include/asio/detail/scheduler_operation.hpp:39 #44 asio::detail::scheduler::do_poll_one ( ec=std::error_code = {std::_V2::error_category: 0}, this_thread=..., lock=..., this=) at /home/ms/rep/otclient/build/linux-release/vcpkg_installed/x64-linux/include/asio/detail/impl/scheduler.ipp:627 #45 asio::detail::scheduler::poll ( ec=std::error_code = {std::_V2::error_category: 0}, this=) at /home/ms/rep/otclient/build/linux-release/vcpkg_installed/x64-linux/include/asio/detail/impl/scheduler.ipp:276 #46 asio::io_context::poll (this=0x555556114a90 ) at /home/ms/rep/otclient/build/linux-release/vcpkg_installed/x64-linux/include/asio/impl/io_context.ipp:92 #47 Connection::poll () at /home/ms/rep/otclient/src/framework/net/connection.cpp:54 #48 0x000055555577e7fb in Application::poll (this=) at /home/ms/rep/otclient/src/framework/core/application.cpp:144 #49 GraphicalApplication::poll (this=) at /home/ms/rep/otclient/src/framework/core/graphicalapplication.cpp:228 #50 0x0000555555790009 in operator() (__closure=0x5555582f2388) at /home/ms/rep/otclient/src/framework/core/graphicalapplication.cpp:146 #51 std::__invoke_impl > ( __f=...) at /usr/include/c++/13/bits/invoke.h:61 #52 std::__invoke > (__fn=...) at /usr/include/c++/13/bits/invoke.h:96 #53 std::thread::_Invoker > >::_M_invoke<0> (this=0x5555582f2388) at /usr/include/c++/13/bits/std_thread.h:292 #54 std::thread::_Invoker > >::operator() (this=0x5555582f2388) at /usr/include/c++/13/bits/std_thread.h:299 #55 std::thread::_State_impl > > >::_M_run(void) (this=0x5555582f2380) at /usr/include/c++/13/bits/std_thread.h:244 #56 0x00007ffff7adc433 in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6 #57 0x00007ffff77c8fd4 in start_thread (arg=) at ./nptl/pthread_create.c:442 #58 0x00007ffff78495bc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81 ```

What OS are you seeing the problem on?

Linux

Code of Conduct

mehah commented 1 year ago

Are your video card supporting opengl 2.0 and your drivers up to date?

marcin-szmagara commented 1 year ago

Yes, as indicated by the first two log lines.

mehah commented 1 year ago

The only difference between this client and eduabart is that there is no longer support for opengl 1.0, try updating your drivers, otc/edubart should probably be pointing to the 1.0 context.

ivopr commented 11 months ago

Well, I think I'm getting this too.

Logs

GPU NVIDIA GeForce GTX 1650/PCIe/SSE2 OpenGL 4.6.0 NVIDIA 535.113.01 == application started at Oct 28 2023 14:56:24 == operating system: Manjaro Linux OTClient - Redemption 1.0 rev 0.000 (desenv) built on Oct 28 2023 for arch x64 Loaded module 'corelib' Loaded module 'gamelib' Loaded module 'startup' Loaded module 'client' Loaded module 'client_styles' Using configured locale: en Loaded module 'client_locales' Loaded module 'client_topmenu' Loaded module 'client_background' Loaded module 'client_options' Loaded module 'client_entergame' Loaded module 'game_features' Loaded module 'game_things' Loaded module 'client_terminal' Loaded module 'client_serverlist' Loaded module 'game_interface' Loaded module 'game_prey' Loaded module 'game_imbuing' Loaded module 'game_hotkeys' Loaded module 'game_questlog' Loaded module 'game_textmessage' Loaded module 'game_console' Loaded module 'game_actionbar' Loaded module 'game_outfit' Loaded module 'game_healthinfo' Loaded module 'game_skills' Loaded module 'game_inventory' Loaded module 'game_combatcontrols' Loaded module 'game_containers' Loaded module 'game_viplist' Loaded module 'game_battle' Loaded module 'game_minimap' Loaded module 'game_npctrade' Loaded module 'game_textwindow' Loaded module 'game_playertrade' Loaded module 'game_bugreport' Loaded module 'game_playerdeath' Loaded module 'game_playermount' Loaded module 'game_ruleviolation' Loaded module 'game_market' Loaded module 'game_spelllist' Loaded module 'game_cooldown' Loaded module 'game_modaldialog' Loaded module 'game_unjustifiedpoints' Loaded module 'game_shaders' Loaded module 'game_attachedeffects' failed to load a widget from 'game_healthcircle' Loaded module 'game_healthcircle' Startup done :] AddressSanitizer:DEADLYSIGNAL ================================================================= ==372140==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000998 (pc 0x7fa737f19b29 bp 0x7fa722fd6130 sp 0x7fa722fd6118 T12) ==372140==The signal is caused by a READ memory access. ==372140==Hint: address points to the zero page. #0 0x7fa737f19b29 (/usr/lib/libGL.so.1+0x45b29) (BuildId: c00c5fcceeba1bcbcd092deb7ab9d75f9314baee) #1 0x55fa8b18b424 in Texture::setSmooth(bool) /home/ivopr/Git/side/wodbo/otclient/src/framework/graphics/texture.cpp:130 #2 0x55fa8b18fb91 in TextureManager::getTexture(std::__cxx11::basic_string, std::allocator > const&, bool) /home/ivopr/Git/side/wodbo/otclient/src/framework/graphics/texturemanager.cpp:137 #3 0x55fa8aba51b7 in operator() /home/ivopr/Git/side/wodbo/otclient/src/framework/ui/uiwidgetbasestyle.cpp:406 #4 0x55fa8ac4a645 in __invoke_impl&> /usr/include/c++/13.2.1/bits/invoke.h:61 #5 0x55fa8ac3a73e in __invoke_r&> /usr/include/c++/13.2.1/bits/invoke.h:111 #6 0x55fa8ac20301 in _M_invoke /usr/include/c++/13.2.1/bits/std_function.h:290 #7 0x55fa8ad3e5b1 in std::function::operator()() const /usr/include/c++/13.2.1/bits/std_function.h:591 #8 0x55fa8b2b490c in Event::execute() /home/ivopr/Git/side/wodbo/otclient/src/framework/core/event.cpp:36 #9 0x55fa8b2b5111 in EventDispatcher::poll() /home/ivopr/Git/side/wodbo/otclient/src/framework/core/eventdispatcher.cpp:82 #10 0x55fa8b2ddd18 in Application::poll() /home/ivopr/Git/side/wodbo/otclient/src/framework/core/application.cpp:147 #11 0x55fa8b26189b in GraphicalApplication::poll() /home/ivopr/Git/side/wodbo/otclient/src/framework/core/graphicalapplication.cpp:228 #12 0x55fa8b25fe53 in operator() /home/ivopr/Git/side/wodbo/otclient/src/framework/core/graphicalapplication.cpp:146 #13 0x55fa8b2ae595 in __invoke_impl > /usr/include/c++/13.2.1/bits/invoke.h:61 #14 0x55fa8b2ae4e0 in __invoke > /usr/include/c++/13.2.1/bits/invoke.h:96 #15 0x55fa8b2ae34f in _M_invoke<0> /usr/include/c++/13.2.1/bits/std_thread.h:292 #16 0x55fa8b2ae27f in operator() /usr/include/c++/13.2.1/bits/std_thread.h:299 #17 0x55fa8b2ae1e3 in _M_run /usr/include/c++/13.2.1/bits/std_thread.h:244 #18 0x7fa7374e1942 in execute_native_thread_routine /usr/src/debug/gcc/gcc/libstdc++-v3/src/c++11/thread.cc:104 AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV (/usr/lib/libGL.so.1+0x45b29) (BuildId: c00c5fcceeba1bcbcd092deb7ab9d75f9314baee) Thread T12 created by T0 here: #0 0x7fa73784a497 in __interceptor_pthread_create /usr/src/debug/gcc/gcc/libsanitizer/asan/asan_interceptors.cpp:208 #1 0x7fa7374e1a29 in __gthread_create /usr/src/debug/gcc/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu/bits/gthr-default.h:663 #2 0x7fa7374e1a29 in std::thread::_M_start_thread(std::unique_ptr >, void (*)()) /usr/src/debug/gcc/gcc/libstdc++-v3/src/c++11/thread.cc:172 #3 0x55fa8b261272 in GraphicalApplication::run() /home/ivopr/Git/side/wodbo/otclient/src/framework/core/graphicalapplication.cpp:179 #4 0x55fa8abf3991 in main /home/ivopr/Git/side/wodbo/otclient/src/main.cpp:87 #5 0x7fa737133ccf (/usr/lib/libc.so.6+0x27ccf) (BuildId: 8bfe03f6bf9b6a6e2591babd0bbc266837d8f658) ==372140==ABORTING

I didn't test with edubart/otclient though

arthurmoreno commented 11 months ago

I am having similar issues here!

I am building on an Ubuntu 22.

Here a little bit of the bt info while running it on with gdb:

...
Unable to translate: "Prey Dialog"
Unable to translate: "Prey Tracker"
Unable to translate: "You have %s hours and %s minutes left"
Unable to translate: "You don't may receive experience and loot from monsters"

Thread 13 "otclient" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffecae2640 (LWP 304919)]
0x00007ffff7e9db29 in glBindTexture () from /lib/x86_64-linux-gnu/libGL.so.1
(gdb) bt
#0  0x00007ffff7e9db29 in glBindTexture () from /lib/x86_64-linux-gnu/libGL.so.1
#1  0x00005555559f1661 in Texture::bind() ()
#2  0x00005555559f172b in Texture::setSmooth(bool) ()
#3  0x00005555559f3832 in TextureManager::getTexture(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool) ()
#4  0x0000555555cf0ca9 in Creature::setIconTexture(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
#5  0x0000555555c38301 in void std::__invoke_impl<void, void (Creature::* const&)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&), Creature*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&>(std::__invoke_memfun_deref, void (Creature::* const&)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&), Creature*&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
...

It would be greatly beneficial to have access to the correct files for the version I'm currently testing (1321). Unfortunately, finding these files has proven quite challenging on the forums. If there's a comprehensive tutorial or any guidance available on how to obtain and place the necessary files in the data/things/VERSION/ directory, that would be very helpful as well.

arthurmoreno commented 11 months ago

I've partilally solved!

The issue were on the lua scripts that were trying to load images using the path /images/game/npcicons/icon_chat but it was not finding due to the use of relative path.

By replacing all the relative references with the full path in my system I could load the client without issues! In the above example I've replaced with: /home/user/otclient/data/images/game/npcicons/icon_chat

But instead of crashing it is not finding the file.


The real issue was on the:

TexturePtr TextureManager::getTexture(const std::string& fileName, bool smooth) {

method when trying to set smooth:

texture->setSmooth(smooth);

I've changed so it force it to be false and now it is working with all the ui elements being loaded.