Qt Phonon Media Source crashes
-
The 4.4.0 for phonon is not the problem. That's just the compatibility version. On my self compiled 4.8.0 installation it has the same version.
The stack trace shows something in moveToThread - do you have threading in your application?
I also recommend to run the app in Qt Creator's debugger, it will drop you to the source line where the crash happens. In general, phonon on the Mac should work.
-
Thanks for the answer.
The stack trace shows something in moveToThread – do you have threading in your application?
Not created by me, but I think UI ran in a separated thread, right?
I also recommend to run the app in Qt Creator’s debugger, it will drop you to the source line where the crash happens. In general, phonon on the Mac should work.
Something strange happens when I ran my app in Debug mode... it crashes before the mentioned above... it crashes when it tries to add the sqlite database. This line:
_db = QSqlDatabase::addDatabase( "QSQLITE" );_db is defined as "static QSqlDatabase _db"
Then I get a segmentation fault in this line, and when I try to run directly in GDB I get a segfault and gdb itself closes.
-
That looks fishy.
Do you have a small, complete test program that demonstrates the error? Leave out everything that's not needed to reproduce the faulty behavior.
-
I did the smallest app I could.
Here it's:.pro file: http://pastebin.ca/2108906
mainwindow.h: http://pastebin.ca/2108907
mainwindow.cpp: http://pastebin.ca/2108908
main.cpp: http://pastebin.ca/2108909the application crashes and never reaches the "MessageBox" line.
it crashes at this line -> _mediaObject = new Phonon::MediaObject(this);CrashReport: http://pastebin.ca/2108910
otool -L
test_video:
phonon.framework/Versions/4/phonon (compatibility version 4.4.0, current version 4.4.0)
QtDBus.framework/Versions/4/QtDBus (compatibility version 4.8.0, current version 4.8.0)
QtXml.framework/Versions/4/QtXml (compatibility version 4.8.0, current version 4.8.0)
QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.0)
QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 625.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.11)I guess it has to do with my installation, but I can't figure out what is the problem
-
I don't know if it's the problem but one thing that I've noticed is that in preferences->toolchains there's several GCC "auto-detected", including 32 and 64 bits.
But when I go to projects window the toolchain combobox only allows me select GCC (X86 64 bit), three options appears but they are all the same: GCC (X86 64 bit) -
The toolchain display in Creator is a bit ... weird on the Mac. Just make sure you have the correct version (gcc 4.0 or 4.2) and ignore the rest. The mac compilers support 4 architectures (Intel and PowerPC in 32 and 64 bit variants). That would make 4 toolchains on other operating systems, but it's only one the Mac.
I'll have a look into the sources and report back, stay tuned.
-
Thanks Volker,
Another infos about my installation.Yesterday I tried to uninstall all possible Qt I'd installed... I found a QtSDK under /Users and other under /opt
Uninstalled all and the Library.
Reinstalled the Qt4.8
The problem persists... but a weird thing happens on Qt Creator... it shows that some older Qt installation were not found on Build & Run -> Qt Versions(exclamation sign).
But even when I click "Clean Up" nothing changes... it doesn't clean these removed installations.And Qt Creator didn't auto-detected my Qt4.8 installation at first, I'd to add it manually.
-
I think I found the problem:
There's a bug on Qt4.8 when it tries to access DBUS and there's no dbus installed:
https://bugreports.qt-project.org/browse/QTBUG-23128I'll try to install dbus and do some tests.
-
I've compiled and installed dbus and now it doesn't crash, but it seems to stay stucked at the same point until I kill it myself =/
I'm really thinking in go back to Qt 4.7 -
I compiled the Qt4.8 from sources with dbus disabled and now it's working....well, not 100% yet.
but I'll open another topic because it's other problem.