-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]项目编译失败,修补后编译的程序运行游戏时闪退 #12
Comments
升级系统ruby包至3.2.4,重新编译,仍然需要注释
GDB的bt信息: (gdb) bt
#0 0x00007ffff7bd658c in ?? () from /usr/lib/libruby.so.3.2
#1 0x00007ffff7bdde24 in ?? () from /usr/lib/libruby.so.3.2
#2 0x00007ffff7bde00c in ?? () from /usr/lib/libruby.so.3.2
#3 0x00007ffff7bde024 in rb_exc_raise () from /usr/lib/libruby.so.3.2
#4 0x00007ffff7bd2840 in ?? () from /usr/lib/libruby.so.3.2
#5 0x00007ffff7bd288c in rb_raise () from /usr/lib/libruby.so.3.2
#6 0x00007ffff7c8c8dc in ?? () from /usr/lib/libruby.so.3.2
#7 0x00007ffff7c8e890 in rb_convert_type_with_id ()
from /usr/lib/libruby.so.3.2
#8 0x00007ffff7d5350c in rb_string_value () from /usr/lib/libruby.so.3.2
#9 0x00007ffff7be195c in ?? () from /usr/lib/libruby.so.3.2
#10 0x00007ffff7c4911c in ?? () from /usr/lib/libruby.so.3.2
#11 0x00007ffff7dd5e28 in ?? () from /usr/lib/libruby.so.3.2
#12 0x00007ffff7dd60c0 in ?? () from /usr/lib/libruby.so.3.2
#13 0x00007ffff7dda0d4 in rb_funcallv () from /usr/lib/libruby.so.3.2
#14 0x00005555556294b0 in binding::marshal_load_utf8 (argc=1,
argv=0x7ffff0cc19c0, self=140736639271560)
at /home/donmor/rguplayer/binding/mri/init_corefile.cc:163
#15 0x00007ffff7dd5e28 in ?? () from /usr/lib/libruby.so.3.2
#16 0x00007ffff7dda0d4 in rb_funcallv () from /usr/lib/libruby.so.3.2
#17 0x0000555555629100 in binding::MriLoadData (
filename="Data/Scripts.rxdata", mri_exc=false)
at /home/donmor/rguplayer/binding/mri/init_corefile.cc:120
--Type <RET> for more, q to quit, c to continue without paging--c
#18 0x0000555555612508 in binding::BindingEngineMri::LoadPackedScripts (
this=0x555556171d70) at /home/donmor/rguplayer/binding/mri/mri_main.cc:323
#19 0x0000555555612280 in binding::BindingEngineMri::RunBindingMain (
this=0x555556171d70) at /home/donmor/rguplayer/binding/mri/mri_main.cc:294
#20 0x00005555555f5ec4 in content::BindingRunner::BindingFuncMain (
this=0x555562386280)
at /home/donmor/rguplayer/content/worker/binding_worker.cc:76
#21 0x00005555555f8260 in std::__invoke_impl<void, void (content::BindingRunner::*)(), content::BindingRunner*> (
__f=@0x5555560cfe90: (void (content::BindingRunner::*)(content::BindingRunner * const)) 0x5555555f5b84 <content::BindingRunner::BindingFuncMain()>,
__t=@0x5555560cfe88: 0x555562386280)
at /usr/include/c++/14.0.1/bits/invoke.h:74
#22 0x00005555555f8158 in std::__invoke<void (content::BindingRunner::*)(), content::BindingRunner*> (
__fn=@0x5555560cfe90: (void (content::BindingRunner::*)(content::BindingRunner * const)) 0x5555555f5b84 <content::BindingRunner::BindingFuncMain()>)
at /usr/include/c++/14.0.1/bits/invoke.h:96
#23 0x00005555555f804c in std::thread::_Invoker<std::tuple<void (content::BindingRunner::*)(), content::BindingRunner*> >::_M_invoke<0ul, 1ul> (
this=0x5555560cfe88) at /usr/include/c++/14.0.1/bits/std_thread.h:292
#24 0x00005555555f7fd8 in std::thread::_Invoker<std::tuple<void (content::BindingRunner::*)(), content::BindingRunner*> >::operator() (this=0x5555560cfe88)
at /usr/include/c++/14.0.1/bits/std_thread.h:299
#25 0x00005555555f7fa4 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (content::BindingRunner::*)(), content::BindingRunner*> > >::_M_run (
this=0x5555560cfe80) at /usr/include/c++/14.0.1/bits/std_thread.h:244
#26 0x00007ffff7927dd4 in std::execute_native_thread_routine (
__p=0x5555560cfe80)
at /usr/src/debug/gcc/gcc/libstdc++-v3/src/c++11/thread.cc:104
#27 0x00007ffff75f4cf8 in start_thread (arg=<optimized out>)
at pthread_create.c:447
#28 0x00007ffff767afd4 in __thread_start3 ()
at ../sysdeps/unix/sysv/linux/loongarch/clone3.S:74 因libruby未开debug,部分符号被隐去了,稍后尝试重新构建带debug的ruby |
libruby链接别用动态库用静态库 |
换Ruby3.2.2的静态库可以带着 |
编译tag=20240306修补后可以过并且成功运行游戏;经过排查将MRI闪退问题定位到commitID=8869f28处。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
我的编译环境为Arch Linux(已滚至最新)+GCC13/GCC14+Ruby 3.0.6,按照README编译时多次报错,在修补了部分文件后编译出可执行文件
rgm
,用来测试运行游戏(使用青鬼6.23汉化版)时,程序每次均卡死(使用killall -9
结束)或闪退,日志中有[LOG] [Binding] Quit mri binding engine.
,推测是Ruby部分出错。使用GDB调试,在
binding/mri/mri_util.h:150
和binding/mri/mri_main.cc:405
处下断点,于150行处获取到每个载入Ruby的脚本,最终在载入102: Main
时产生非0state,转至405行,循环中断。已在x86_64和loongarch64(龙芯的自主架构)复现。
所做的改动:
其中:
此处删除了
rb_call_builtin_inits
,因为此处一直链接失败(报undefined reference),经查证此函数位于ruby/array.c
,推测此处是一个失效的hack。此处较大可能导致了闪退。顺便问一下主程最后一次构建出可用的二进制时使用了什么环境,Ruby版本多少?
The text was updated successfully, but these errors were encountered: