Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt Phonon Media Source crashes

Qt Phonon Media Source crashes

Scheduled Pinned Locked Moved General and Desktop
11 Posts 2 Posters 4.8k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    goetz
    wrote on last edited by
    #2

    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.

    http://www.catb.org/~esr/faqs/smart-questions.html

    1 Reply Last reply
    0
    • D Offline
      D Offline
      danielfranca
      wrote on last edited by
      #3

      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.

      1 Reply Last reply
      0
      • G Offline
        G Offline
        goetz
        wrote on last edited by
        #4

        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.

        http://www.catb.org/~esr/faqs/smart-questions.html

        1 Reply Last reply
        0
        • D Offline
          D Offline
          danielfranca
          wrote on last edited by
          #5

          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/2108909

          the 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

          1 Reply Last reply
          0
          • D Offline
            D Offline
            danielfranca
            wrote on last edited by
            #6

            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)

            1 Reply Last reply
            0
            • G Offline
              G Offline
              goetz
              wrote on last edited by
              #7

              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.

              http://www.catb.org/~esr/faqs/smart-questions.html

              1 Reply Last reply
              0
              • D Offline
                D Offline
                danielfranca
                wrote on last edited by
                #8

                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.

                1 Reply Last reply
                0
                • D Offline
                  D Offline
                  danielfranca
                  wrote on last edited by
                  #9

                  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-23128

                  I'll try to install dbus and do some tests.

                  1 Reply Last reply
                  0
                  • D Offline
                    D Offline
                    danielfranca
                    wrote on last edited by
                    #10

                    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

                    1 Reply Last reply
                    0
                    • D Offline
                      D Offline
                      danielfranca
                      wrote on last edited by
                      #11

                      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.

                      1 Reply Last reply
                      0

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved