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. QMetaType::registerType: Binary compatibility break — Size mismatch for type ‘QPaintBufferCacheEntry’ [1024]. Previously registered size 0, now regist
QtWS25 Last Chance

QMetaType::registerType: Binary compatibility break — Size mismatch for type ‘QPaintBufferCacheEntry’ [1024]. Previously registered size 0, now regist

Scheduled Pinned Locked Moved General and Desktop
20 Posts 3 Posters 14.2k Views
  • 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.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #3

    You have to use qmake from /opt/Qt5/bin, that should help to build things correctly

    Interested in AI ? www.idiap.ch
    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

    1 Reply Last reply
    0
    • jiapei100J Offline
      jiapei100J Offline
      jiapei100
      wrote on last edited by
      #4

      Yes, as you can see, I have

      bq. $ echo $PATH
      /usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/opt/Qt5.0.1/5.0.1/gcc/bin

      which means, I'm using qt5-qmake already !! In fact, I don't even have a 2nd qmake under /usr/bin

      Any further suggestions?

      Pei

      Welcome to Longer Vision
      https://www.longervision.com

      1 Reply Last reply
      0
      • jiapei100J Offline
        jiapei100J Offline
        jiapei100
        wrote on last edited by
        #5

        I guess the problem comes with QT configuration !! If I modify my original code from
        @#include <QWidget>@
        to
        @#include <QtWidgets/QWidget>@

        everything compiles !!!
        Which seems to hint after I successfully Qt5,

        @CONFIG += qt@

        doesn't configure Qt correctly.

        Anyway, I can compile my program now. But, how to solve the Qt configuration issue?

        Cheers
        Pei

        Welcome to Longer Vision
        https://www.longervision.com

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #6

          For 5.0, QWidget has moved. It is now in QtWidgets and not QtGui anymore.
          You have to add QT += widgets in your pro files

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • jiapei100J Offline
            jiapei100J Offline
            jiapei100
            wrote on last edited by
            #7

            Thank you so much SGaist...

            However, problem continues:

            bq. QMetaType::registerType: Binary compatibility break -- Size mismatch for type 'QPaintBufferCacheEntry' [1024]. Previously registered size 0, now registering size 12.
            The program has unexpectedly finished.

            I've already solved Qt5 and Qwt (add feature) issue. However, the above error message keeps jumping out when I tried to run my program. Please do help...

            thank you
            Pei

            Welcome to Longer Vision
            https://www.longervision.com

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #8

              Something worth to try, check that you don't have Qt4 libs in your path when running your application

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • jiapei100J Offline
                jiapei100J Offline
                jiapei100
                wrote on last edited by
                #9

                Hi, SGaist. You hit the point !!! ^_^

                I'm running Ubuntu 12.10, in which some other packages rely on libqt4. Therefore, I didn't remove all qt4 packages.

                In fact, for now, beside a full version of Qt5 installed under /opt/Qt5.0.1/5.0.1/gcc/lib
                I still have some Qt4 packages installed at
                @/usr/lib/i386-linux-gnu$ ls libQt*
                libQt3Support.so.4 libQtDBus.so.4.8.3 libQtNetwork.so.4 libQtSvg.so.4.8
                libQt3Support.so.4.8 libQtDeclarative.so.4 libQtNetwork.so.4.8 libQtSvg.so.4.8.3
                libQt3Support.so.4.8.3 libQtDeclarative.so.4.8 libQtNetwork.so.4.8.3 libQtTest.so.4
                libQtAssistantClient.prl libQtDeclarative.so.4.8.3 libQtOpenGL.so.4 libQtTest.so.4.8
                libQtAssistantClient.so libQtDesignerComponents.so.4 libQtOpenGL.so.4.8 libQtTest.so.4.8.3
                libQtAssistantClient.so.4 libQtDesignerComponents.so.4.8 libQtOpenGL.so.4.8.3 libQtWebKit.so.4
                libQtAssistantClient.so.4.8 libQtDesignerComponents.so.4.8.3 libQtScript.so.4 libQtWebKit.so.4.9
                libQtAssistantClient.so.4.8.1 libQtDesigner.so.4 libQtScript.so.4.8 libQtWebKit.so.4.9.0
                libQtCLucene.so.4 libQtDesigner.so.4.8 libQtScript.so.4.8.3 libQtXmlPatterns.so.4
                libQtCLucene.so.4.8 libQtDesigner.so.4.8.3 libQtScriptTools.so.4 libQtXmlPatterns.so.4.8
                libQtCLucene.so.4.8.3 libQtGui.so.4 libQtScriptTools.so.4.8 libQtXmlPatterns.so.4.8.3
                libQtCore.so.4 libQtGui.so.4.8 libQtScriptTools.so.4.8.3 libQtXml.so.4
                libQtCore.so.4.8 libQtGui.so.4.8.3 libQtSql.so.4 libQtXml.so.4.8
                libQtCore.so.4.8.3 libQtHelp.so.4 libQtSql.so.4.8 libQtXml.so.4.8.3
                libQtDBus.so.4 libQtHelp.so.4.8 libQtSql.so.4.8.3
                libQtDBus.so.4.8 libQtHelp.so.4.8.3 libQtSvg.so.4
                @

                So, is there a way for me to specify which Qt(5 or 4) I would like to use?

                Cheers
                Pei

                Welcome to Longer Vision
                https://www.longervision.com

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #10

                  Check "man ld", it will explain how you can modify the library loading i.e. before starting your program

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0
                  • H Offline
                    H Offline
                    hdehaan
                    wrote on last edited by
                    #11

                    I have the same problem, and trying with -rpath and rpath-link, but that doesnt help.
                    In fact, Qt is using g++, and not ld.
                    Please help how to come further with this.

                    1 Reply Last reply
                    0
                    • SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on last edited by
                      #12

                      Hi,

                      g++ is the compiler, ld is the library loader, they don't act at the same moment.

                      Does you application use an external library that is linked against Qt 4 ?

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      0
                      • H Offline
                        H Offline
                        hdehaan
                        wrote on last edited by
                        #13

                        Thank you for your reply.

                        I checked that before but can't find any link to Qt4.
                        I have installed Qt5.1.1, but as I have seen in this post before, also my Linux is having Qy4 libraries in the /usr/lib.

                        The last action from Qt while building the app is:

                        g++ -Wl,-rpath,/home/infologic/Qt5.1.1/5.1.1/gcc -Wl,-rpath,/home/infologic/Qt5.1.1/5.1.1/gcc/lib -o demo-player DemoPlayer.o main.o Enums.o Common.o Instance.o Error.o moc_DemoPlayer.o moc_Instance.o -lvlc -Wl,-rpath-link,/home/infologic/Qt5.1.1/5.1.1/gcc/lib -L/home/infologic/Qt5.1.1/5.1.1/gcc/lib -lQt5Widgets -lQt5Gui -lQt5Core -lGL -lpthread
                        { test -n "" && DESTDIR="" || DESTDIR=.; } && test $(gdb --version | sed -e 's,[^0-9]+([0-9]).([0-9]).*,\1\2,;q') -gt 72 && gdb --nx --batch --quiet -ex 'set confirm off' -ex "save gdb-index $DESTDIR" -ex quit 'demo-player' && test -f demo-player.gdb-index && objcopy --add-section '.gdb_index=demo-player.gdb-index' --set-section-flags '.gdb_index=readonly' 'demo-player' 'demo-player' && rm -f demo-player.gdb-index || true

                        Maybe you can find something out of this?

                        Thanks in advance.

                        1 Reply Last reply
                        0
                        • H Offline
                          H Offline
                          hdehaan
                          wrote on last edited by
                          #14

                          The ldd of the release returns:

                          ldd demo-player
                          linux-gate.so.1 (0xb77c2000)
                          libvlc.so.5 => /usr/lib/libvlc.so.5 (0xb7785000)
                          libQt5Widgets.so.5 => /home/infologic/Qt5.1.1/5.1.1/gcc/lib/libQt5Widgets.so.5 (0xb7159000)
                          libQt5Gui.so.5 => /home/infologic/Qt5.1.1/5.1.1/gcc/lib/libQt5Gui.so.5 (0xb6cee000)
                          libQt5Core.so.5 => /home/infologic/Qt5.1.1/5.1.1/gcc/lib/libQt5Core.so.5 (0xb686a000)
                          libGL.so.1 => /usr/lib/libGL.so.1 (0xb680b000)
                          libpthread.so.0 => /lib/libpthread.so.0 (0xb67f0000)
                          libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb6704000)
                          libm.so.6 => /lib/libm.so.6 (0xb66c2000)
                          libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb66a4000)
                          libc.so.6 => /lib/libc.so.6 (0xb6529000)
                          libvlccore.so.5 => /usr/lib/libvlccore.so.5 (0xb6429000)
                          libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0xb63da000)
                          libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0xb62dc000)
                          libX11.so.6 => /usr/lib/libX11.so.6 (0xb61a2000)
                          libicui18n.so.51 => /home/infologic/Qt5.1.1/5.1.1/gcc/lib/libicui18n.so.51 (0xb5f7f000)
                          libicuuc.so.51 => /home/infologic/Qt5.1.1/5.1.1/gcc/lib/libicuuc.so.51 (0xb5e06000)
                          libdl.so.2 => /lib/libdl.so.2 (0xb5e01000)
                          libgthread-2.0.so.0 => /usr/lib/libgthread-2.0.so.0 (0xb5dfe000)
                          librt.so.1 => /lib/librt.so.1 (0xb5df5000)
                          /lib/ld-linux.so.2 (0xb77c3000)
                          libglapi.so.0 => /usr/lib/libglapi.so.0 (0xb5dde000)
                          libXext.so.6 => /usr/lib/libXext.so.6 (0xb5dcb000)
                          libXdamage.so.1 => /usr/lib/libXdamage.so.1 (0xb5dc7000)
                          libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0xb5dc1000)
                          libX11-xcb.so.1 => /usr/lib/libX11-xcb.so.1 (0xb5dbe000)
                          libxcb-glx.so.0 => /usr/lib/libxcb-glx.so.0 (0xb5da4000)
                          libxcb.so.1 => /usr/lib/libxcb.so.1 (0xb5d81000)
                          libXxf86vm.so.1 => /usr/lib/libXxf86vm.so.1 (0xb5d7b000)
                          libdrm.so.2 => /usr/lib/libdrm.so.2 (0xb5d6d000)
                          libdbus-1.so.3 => /lib/libdbus-1.so.3 (0xb5d21000)
                          libffi.so.4 => /usr/lib/libffi.so.4 (0xb5d1a000)
                          libpcre.so.1 => /usr/lib/libpcre.so.1 (0xb5cb6000)
                          libicudata.so.51 => /home/infologic/Qt5.1.1/5.1.1/gcc/lib/libicudata.so.51 (0xb476d000)
                          libXau.so.6 => /usr/lib/libXau.so.6 (0xb4769000)

                          1 Reply Last reply
                          0
                          • H Offline
                            H Offline
                            hdehaan
                            wrote on last edited by
                            #15

                            While testing around I found out that the Qt4 is installed in /usr/include, /usr/lib and Qt5 not.
                            However, I do not see a possibility to install Qt5 in these directories. My KDE is using Qt4.

                            As above, how can I force to only use Qt5 in my demo program?
                            I also included the -I flag, but when checking the folders it still uses the /usr/include having the Qt4 files.

                            1 Reply Last reply
                            0
                            • SGaistS Offline
                              SGaistS Offline
                              SGaist
                              Lifetime Qt Champion
                              wrote on last edited by
                              #16

                              Please use codings tags when posting code/ldd output etc... It will make them readable.

                              Don't try to put the two sets of include/libraries in the same folders.

                              Qt 5 is good where it is. Try to run your program with QT_DEBUG_PLUGINS=1 to see what plugins are loaded (i.e. the theme plugin) and check them to see whether one of them pulls Qt4 in

                              Interested in AI ? www.idiap.ch
                              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                              1 Reply Last reply
                              0
                              • H Offline
                                H Offline
                                hdehaan
                                wrote on last edited by
                                #17

                                I have added the arguments, and the compile output gives:
                                g++ -c -pipe -g -Wall -W -D_REENTRANT -fPIE -DQT_DEBUG_PLUGINS=1

                                Running the application gives:

                                Starting /home/infologic/workspace/cpp/infologic/demo-player/demo-player...
                                Started
                                QMetaType::registerType: Binary compatibility break -- Size mismatch for type 'QPaintBufferCacheEntry' [1024]. Previously registered size 12, now registering size 0.
                                The program has unexpectedly finished.
                                /home/infologic/workspace/cpp/infologic/demo-player/demo-player exited with code 0

                                It seems it crashes before loading the plugins.

                                I managed to force Qt to only use include files from Qt5.

                                1 Reply Last reply
                                0
                                • SGaistS Offline
                                  SGaistS Offline
                                  SGaist
                                  Lifetime Qt Champion
                                  wrote on last edited by
                                  #18

                                  Not build, run your program with QT_DEBUG_PLUGINS=1

                                  Interested in AI ? www.idiap.ch
                                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                  1 Reply Last reply
                                  0
                                  • H Offline
                                    H Offline
                                    hdehaan
                                    wrote on last edited by
                                    #19

                                    I have found the reason. I created a new project, and that one gave me a backtrack.
                                    It's loading the libqt4_plugin.so, which is causing the troubles.
                                    Removing this file from the plugins dir solves the crash!

                                    I copied the plugins dir, removed the gui subdir and set the environment var VLC_PLUGIN_PATH=<new dir>

                                    1 Reply Last reply
                                    0
                                    • SGaistS Offline
                                      SGaistS Offline
                                      SGaist
                                      Lifetime Qt Champion
                                      wrote on last edited by
                                      #20

                                      That might indeed happen with all libraries that uses Qt (qca comes into mind)

                                      Glad you found out.

                                      Happy coding :)

                                      Interested in AI ? www.idiap.ch
                                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                      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