-
Notifications
You must be signed in to change notification settings - Fork 99
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
[Linux] 段错误 #44
Comments
从调用栈来看,错误发生在mpv加载lua的过程中,不知道你用的libmpv的信息? |
是 Tumbleweed 官方仓库提供的版本: |
系统上其他使用libmpv的播放器有没有问题呢?这个我现在也没有条件来复现 |
Celluloid 是正常的。 |
同样的问题。
|
挺奇怪的,要不试一下编译mpv官方这个例子 https://github.com/mpv-player/mpv-examples/tree/master/libmpv/qt_opengl ,看看可以正常运行吗 |
正常运行。
|
你提到的四个链接里事实上只涉及到了三行代码(L100, L113 和 L123)。把这三行注释掉,并将 L149 改为 false 重新编译后运行,仍然报 Segmentation fault. gdb 结果与 #44 (comment) 中完全一致。 |
系统的mpv有加载什么脚本吗,有条件可否在源码上单步调试一下? |
没有加载脚本。我可以尝试一下单步调试,具体需要在哪几处打断点,或是看哪些变量? |
可以从MPVPlayer的构造函数开始MPVPlayer::MPVPlayer(QWidget *parent) |
我的环境是gentoo,也有同样的问题。逐步调试后发现是mpv加载youtube-dl的脚本时发生错误。应该是mpv的问题。 一个临时的解决办法是,关掉mpv的lua支持:
|
试试libmpv调用原始的lua@5.1而不是luajit/moonjit |
请问具体怎么操作? |
不熟悉linux,只知道libmpv应由lua5.1构建 |
如果是用gentoo的话:
但是亲测还会段错误。 |
|
linux上libmpv能不能静态链接lua 5.1 |
可以是可以,但是这些Linux发行版的维护者那边不容易沟通,估计写了后不让提交package进去会被打回来,他们的哲学是linux要尽可能的复用所有的so文件,会让我们正面解决这个问题。现在workaround是直接禁用了mpv本身的lua依赖,后面看再想想办法怎样让libmpv load liblua5.1.so的同时让kikoplay可以load liblua5.3.so然后再load libmpv.so |
我分析错了,现在看起来是mpv的问题很大 Thread 9 "mpv/lua script " received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffd9ffb640 (LWP 1721858)]
0x00007ffff646bdc6 in ?? () from /usr/lib64/liblua5.1.so.0
(gdb) bt
#0 0x00007ffff646bdc6 in () at /usr/lib64/liblua5.1.so.0
#1 0x00007ffff6472a9b in () at /usr/lib64/liblua5.1.so.0
#2 0x00007ffff6473919 in () at /usr/lib64/liblua5.1.so.0
#3 0x00007ffff646ee17 in lua_cpcall () at /usr/lib64/liblua5.1.so.0
#4 0x00007ffff7e31c95 in () at /usr/lib64/libmpv.so.1
#5 0x00007ffff7e3bc24 in () at /usr/lib64/libmpv.so.1
#6 0x00007ffff7e3c0a9 in () at /usr/lib64/libmpv.so.1
#7 0x00007ffff651e387 in () at /lib64/libc.so.6
#8 0x00007ffff65a01ac in () at /lib64/libc.so.6
|
Thread 9 "mpv/lua script " received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffd9ffb640 (LWP 1830055)]
0x0000000000000000 in ?? ()
(gdb) bt
#0 0x0000000000000000 in ()
#1 0x00007ffff461280b in () at /usr/lib64/libluajit-5.1.so.2
#2 0x00007ffff46161dc in () at /usr/lib64/libluajit-5.1.so.2
#3 0x00007ffff4620c39 in () at /usr/lib64/libluajit-5.1.so.2
#4 0x00007ffff460ee2c in () at /usr/lib64/libluajit-5.1.so.2
#5 0x00007ffff46233ed in lua_cpcall () at /usr/lib64/libluajit-5.1.so.2
#6 0x00007ffff7e31c95 in () at /usr/lib64/libmpv.so.1
#7 0x00007ffff7e3bc24 in () at /usr/lib64/libmpv.so.1
#8 0x00007ffff7e3c0a9 in () at /usr/lib64/libmpv.so.1
#9 0x00007ffff651e387 in () at /lib64/libc.so.6
#10 0x00007ffff65a01ac in () at /lib64/libc.so.6 现在证实了无论是luajit还是lua5.1支持的libmpv都会崩溃,去掉lua支持的libmpv是正常的,看样子真的是lua5.1和lua5.3符号冲突问题,可见静态链接说不定是最快的解决方法了。 |
版本:git master
环境:
OS: openSUSE Tumbleweed x86_64
Kernel: 5.12.12-1-default
DE: GNOME 40.2
Qt 5.15.2
The text was updated successfully, but these errors were encountered: