chown2 / lunaticvibesf

Lunatic Vibes F - a BMS client, a Lunatic Rave 2 clone
MIT License
8 stars 0 forks source link

Data races in TextureBmsBga #76

Closed chown2 closed 6 months ago

chown2 commented 6 months ago

d100cff23a096634790c2b63de6e5b748c04fb58

["texture_extra.cpp"@190] [TextureBmsBga] added pic: /path/to/チョウの標本 (by Process 2.3.1.)/process.bmp

Thread 79 "ChartBgaLoad" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffabe006c0 (LWP 11710)]
std::_Rb_tree_insert_and_rebalance (__insert_left=<optimized out>, __x=0x5070002e3380, __p=<optimized out>,
    __header=...) at /usr/src/debug/gcc/gcc/libstdc++-v3/src/c++98/tree.cc:278
Downloading source file /usr/src/debug/gcc/gcc/libstdc++-v3/src/c++98/tree.cc
Download failed: Connection reset by peer.  Continuing without source file /usr/src/debug/gcc/gcc/libstdc++-v3/src/c++98/tree.cc.
warning: 278    /usr/src/debug/gcc/gcc/libstdc++-v3/src/c++98/tree.cc: No such file or directory
(gdb) bt
#0  std::_Rb_tree_insert_and_rebalance (__insert_left=<optimized out>, __x=0x5070002e3380, __p=<optimized out>,
    __header=...) at /usr/src/debug/gcc/gcc/libstdc++-v3/src/c++98/tree.cc:278
#1  0x0000555558f144e4 in std::_Rb_tree<unsigned long, std::pair<unsigned long const, TextureBmsBga::obj>, std::_Select1st<std::pair<unsigned long const, TextureBmsBga::obj> >, std::less<unsigned long>, std::allocator<std::pair<unsigned long const, TextureBmsBga::obj> > >::_M_insert_node (this=0x5130000000d0, __x=0x0, __p=0x5070002590d0,
    __z=0x5070002e3380) at /usr/include/c++/13.2.1/bits/stl_tree.h:2385
#2  0x0000555558f0b475 in std::_Rb_tree<unsigned long, std::pair<unsigned long const, TextureBmsBga::obj>, std::_Select1st<std::pair<unsigned long const, TextureBmsBga::obj> >, std::less<unsigned long>, std::allocator<std::pair<unsigned long const, TextureBmsBga::obj> > >::_Auto_node::_M_insert (this=0x7fffa96b7960, __p={...})
    at /usr/include/c++/13.2.1/bits/stl_tree.h:1657
#3  0x0000555558f014d9 in std::_Rb_tree<unsigned long, std::pair<unsigned long const, TextureBmsBga::obj>, std::_Select1st<std::pair<unsigned long const, TextureBmsBga::obj> >, std::less<unsigned long>, std::allocator<std::pair<unsigned long const, TextureBmsBga::obj> > >::_M_emplace_hint_unique<std::piecewise_construct_t const&, std::tuple<unsigned long const&>, std::tuple<> >(std::_Rb_tree_const_iterator<std::pair<unsigned long const, TextureBmsBga::obj> >, std::piecewise_construct_t const&, std::tuple<unsigned long const&>&&, std::tuple<>&&) (this=0x5130000000d0,
    __pos={...}) at /usr/include/c++/13.2.1/bits/stl_tree.h:2465
#4  0x0000555558efa702 in std::map<unsigned long, TextureBmsBga::obj, std::less<unsigned long>, std::allocator<std::pair<unsigned long const, TextureBmsBga::obj> > >::operator[] (this=0x5130000000d0, __k=@0x7fffa9a0d080: 119)
    at /usr/include/c++/13.2.1/bits/stl_map.h:513
#5  0x0000555558eccfcb in TextureBmsBga::addBmp (this=0x513000000050, idx=119,
    pBmp=filesystem::path "/path/to/チョウの標本 (by Process 2.3.1.)/start2.bmp" = {...}) at /path/to/lunaticvibesf/src/game/graphics/texture_extra.cpp:183
#6  0x00005555590e33af in operator() (__closure=0x7fffa968c080)
    at /path/to/lunaticvibesf/src/game/scene/scene_play.cpp:1260
#7  0x000055555914feee in boost::asio::detail::binder0<ScenePlay::loadChart()::<lambda()>::<lambda()> >::operator()(void) (this=0x7fffa968c080)
    at /path/to/lunaticvibesf/build/vcpkg_installed/x64-linux/include/boost/asio/detail/bind_handler.hpp:56
#8  0x0000555559151c5a in boost::asio::detail::executor_op<boost::asio::detail::binder0<ScenePlay::loadChart()::<lambda()>::<lambda()> >, std::allocator<void>, boost::asio::detail::scheduler_operation>::do_complete(void *, boost::asio::detail::scheduler_operation *, const boost::system::error_code &, std::size_t) (owner=0x511000575fc0,
    base=0x508000d25e20)
    at /path/to/lunaticvibesf/build/vcpkg_installed/x64-linux/include/boost/asio/detail/executor_op.hpp:70
#9  0x0000555559172f55 in boost::asio::detail::scheduler_operation::complete (this=0x508000d25e20,
    owner=0x511000575fc0, ec=..., bytes_transferred=0)
    at /path/to/lunaticvibesf/build/vcpkg_installed/x64-linux/include/boost/asio/detail/scheduler_operation.hpp:40
#10 0x000055555918810f in boost::asio::detail::scheduler::do_run_one (this=0x511000575fc0, lock=...,
    this_thread=..., ec=...)
    at /path/to/lunaticvibesf/build/vcpkg_installed/x64-linux/include/boost/asio/detail/impl/scheduler.ipp:493
#11 0x0000555559185e8b in boost::asio::detail::scheduler::run (this=0x511000575fc0, ec=...)
    at /path/to/lunaticvibesf/build/vcpkg_installed/x64-linux/include/boost/asio/detail/impl/scheduler.ipp:210
#12 0x000055555918a3f0 in boost::asio::thread_pool::thread_function::operator() (this=0x502000140d18)
    at /path/to/lunaticvibesf/build/vcpkg_installed/x64-linux/include/boost/asio/impl/thread_pool.ipp:39
#13 0x00005555591d722e in boost::asio::detail::posix_thread::func<boost::asio::thread_pool::thread_function>::run (
    this=0x502000140d10)
    at /path/to/lunaticvibesf/build/vcpkg_installed/x64-linux/include/boost/asio/detail/posix_thread.hpp:86
#14 0x00005555591759b1 in boost::asio::detail::boost_asio_detail_posix_thread_function (arg=0x502000140d10)
    at /path/to/lunaticvibesf/build/vcpkg_installed/x64-linux/include/boost/asio/detail/impl/posix_thread.ipp:74
#15 0x00007ffff6ea955a in start_thread (arg=<optimized out>) at pthread_create.c:447
#16 0x00007ffff6f26a5c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78

Or getting stuck in deconstructor.