wang-bin / QtAV

A cross-platform multimedia framework based on Qt and FFmpeg. 基于Qt和FFmpeg的跨平台高性能音视频播放框架. Recommand to use new sdk https://github.com/wang-bin/mdk-sdk
http://qtav.org
3.97k stars 1.5k forks source link

macdeployqt发布问题 #1178

Open rgbFrank opened 5 years ago

rgbFrank commented 5 years ago

你好,我使用的最新的QtAV库,在mac电脑上直接跑examples/simpleplayer/simpleplayer_sdk.pro,在QtCreator中Debug与Release运行都是正常的。但是当我在Release版本中macdeployqt后,应用就运行异常了。我把simpleplayer_sdk中跟QtAV相关的部分注释掉再打包就正常。请问这个怎么处理?

`Process: simpleplayer_sdk [20564] Path: /Users/USER/*/simpleplayer_sdk.app/Contents/MacOS/simpleplayer_sdk Identifier: L427.simpleplayer-sdk Version: 0 Code Type: X86-64 (Native) Parent Process: ??? [1] Responsible: simpleplayer_sdk [20564] User ID: 501

Date/Time: 2018-12-29 16:29:23.123 +0800 OS Version: Mac OS X 10.12.6 (16G29) Report Version: 12 Anonymous UUID: 08569DAE-DFE4-66D1-BFA7-D055FDA05A29

Time Awake Since Boot: 4900 seconds

System Integrity Protection: enabled

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY

Application Specific Information: abort() called

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libsystem_kernel.dylib 0x00007fffbff9fd42 __pthread_kill + 10 1 libsystem_pthread.dylib 0x00007fffc008d457 pthread_kill + 90 2 libsystem_c.dylib 0x00007fffbff05420 abort + 129 3 org.qt-project.QtCore 0x0000000100e26ac9 qt_message_fatal(QtMsgType, QMessageLogContext const&, QString const&) + 9 4 org.qt-project.QtCore 0x0000000100e282af QMessageLogger::fatal(char const, ...) const + 213 5 org.qt-project.QtGui 0x000000010299bcfd QWindowPrivate::init(QScreen) + 381 6 org.qt-project.QtGui 0x000000010299bfef QWindow::QWindow(QWindowPrivate&, QWindow) + 159 7 org.qt-project.QtGui 0x00000001029cdd1e QPaintDeviceWindow::QPaintDeviceWindow(QPaintDeviceWindowPrivate&, QWindow) + 14 8 org.qt-project.QtGui 0x00000001029dac9c QOpenGLWindow::QOpenGLWindow(QOpenGLWindow::UpdateBehavior, QWindow) + 60 9 L427.QtAV 0x0000000100189de6 QtAV::OpenGLWindowRenderer::OpenGLWindowRenderer(QOpenGLWindow::UpdateBehavior, QWindow) + 22 10 L427.QtAV 0x0000000100189fd0 QtAV::VideoRenderer QtAV::VideoRenderer::create() + 32 11 L427.QtAV 0x00000001001f5979 QtAV::VideoOutputPrivate::VideoOutputPrivate(int, bool) + 601 12 L427.QtAV 0x00000001001f420c QtAV::VideoOutput::VideoOutput(QObject) + 44 13 L427.simpleplayer-sdk 0x00000001001209c1 PlayerWindow::PlayerWindow(QWidget*) + 225 14 L427.simpleplayer-sdk 0x000000010012085a main + 58 15 libdyld.dylib 0x00007fffbfe71235 start + 1 `

rgbFrank commented 5 years ago

我也尝试手动编译QtAV,然后对生成的bin/Player.app进行macdeployqt打包后,也是运行异常。不打包就没事。 `Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000008 Exception Note: EXC_CORPSE_NOTIFY

Termination Signal: Segmentation fault: 11 Termination Reason: Namespace SIGNAL, Code 0xb Terminating Process: exc handler [0]

VM Regions Near 0x8: --> __TEXT 000000010cc79000-000000010ccf5000 [ 496K] r-x/rwx SM=COW /Users/USER/*/Player.app/Contents/MacOS/Player

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 org.qt-project.QtGui 0x000000010f68c614 QOpenGLContext::shareGroup() const + 4 1 org.qt-project.QtGui 0x000000010f9112dd QOpenGLFunctionsPrivateEx QOpenGLMultiGroupSharedResource::value(QOpenGLContext) + 29 2 org.qt-project.QtGui 0x000000010f910bd0 QOpenGLFunctions::initializeOpenGLFunctions() + 16 3 L427.QtAV 0x000000010cd4da28 QtAV::OpenGLRendererBase::onInitializeGL() + 24 4 org.qt-project.QtOpenGL 0x000000010ef761b6 QGLWidget::glInit() + 54 5 org.qt-project.QtOpenGL 0x000000010ef75dc5 QGLWidget::resizeEvent(QResizeEvent) + 85 6 org.qt-project.QtWidgets 0x000000010f00bf44 QWidget::event(QEvent) + 2180 7 org.qt-project.QtWidgets 0x000000010efd3bad QApplicationPrivate::notify_helper(QObject, QEvent) + 269 8 org.qt-project.QtWidgets 0x000000010efd647c QApplication::notify(QObject, QEvent) + 5852 9 org.qt-project.QtCore 0x000000010d5eaa24 QCoreApplication::notifyInternal2(QObject, QEvent) + 164 10 org.qt-project.QtWidgets 0x000000010f02d2c8 QWidgetWindow::handleResizeEvent(QResizeEvent) + 120 11 org.qt-project.QtWidgets 0x000000010f02b94f QWidgetWindow::event(QEvent) + 1071 12 org.qt-project.QtWidgets 0x000000010efd3bad QApplicationPrivate::notify_helper(QObject, QEvent) + 269 13 org.qt-project.QtWidgets 0x000000010efd647c QApplication::notify(QObject, QEvent) + 5852 14 org.qt-project.QtCore 0x000000010d5eaa24 QCoreApplication::notifyInternal2(QObject, QEvent) + 164 `

NoahZu commented 4 years ago

我也遇到了这个问题,mark一下,解决后再来回复。