Results 1 to 4 of 4

Thread: QMetaType::registerType: Binary compatibility break -- Size mismatch for type 'QPaint

  1. #1
    Join Date
    Jun 2015
    Posts
    2
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11

    Lightbulb QMetaType::registerType: Binary compatibility break -- Size mismatch for type 'QPaint

    Dear all

    I manage to compile my code with Qt 5 but when I run the program and encountered the following error:

    QMetaType::registerType: Binary compatibility break -- Size mismatch for type 'QPaintBufferCacheEntry' [1024]. Previously registered size 0, now registering size 16.
    Aborted (core dumped)
    I have googled for a few days and did not find any luck. Anyone could help me with this? Thanks in advance. I am running Qt5 on ubuntu 14.04 64bit.

    The source code is simple from sample code of the marble library (a globe map library):

    Qt Code:
    1. #include <QtWidgets/QApplication>
    2. #include <marble/MarbleWidget.h>
    3.  
    4. int main(int argc, char** argv)
    5. {
    6. QApplication app(argc, argv);
    7.  
    8. // Load Marble using OpenStreetMap in Mercator projection
    9. Marble::MarbleWidget *mapWidget = new Marble::MarbleWidget;
    10. mapWidget->setProjection(Marble::Mercator);
    11. mapWidget->setMapThemeId("earth/openstreetmap/openstreetmap.dgml");
    12.  
    13. mapWidget->setWindowTitle("Hello Marble!");
    14. mapWidget->show();
    15. return app.exec();
    16. }
    To copy to clipboard, switch view to plain text mode 

    My cmake file to build is below:
    Qt Code:
    1. CMAKE_MINIMUM_REQUIRED (VERSION 2.8.11)
    2. SET (TARGET hello-marble)
    3. PROJECT (${TARGET})
    4.  
    5. # Find includes in corresponding build directories
    6. set(CMAKE_INCLUDE_CURRENT_DIR ON)
    7. # Instruct CMake to run moc automatically when needed.
    8. set(CMAKE_AUTOMOC ON)
    9.  
    10. # Find the Qt modules library
    11. find_package(Qt5Widgets REQUIRED)
    12.  
    13. SET (QT_LIBRARIES ${QT_LIBRARIES} Qt5::Widgets)
    14. SET (MARBLE_LIBRARIES ${MARBLE_LIBRARIES} marblewidget)
    15. SET (LIBS ${LIBS} ${MARBLE_LIBRARIES} ${QT_LIBRARIES})
    16.  
    17. ADD_EXECUTABLE (${TARGET} marble_test.cpp)
    18. TARGET_LINK_LIBRARIES (${TARGET} ${LIBS})
    To copy to clipboard, switch view to plain text mode 

    My gdb traceback of my code is:

    Qt Code:
    1. Program received signal SIGABRT, Aborted.
    2. 0x00007ffff56d1cc9 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
    3. 56 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
    4. (gdb) bt
    5. #0 0x00007ffff56d1cc9 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
    6. #1 0x00007ffff56d50d8 in __GI_abort () at abort.c:89
    7. #2 0x00007ffff600ab76 in QMessageLogger::fatal(char const*, ...) const () from /home/zq/Qt5.4.0/5.4/gcc_64/lib/libQt5Core.so.5
    8. #3 0x00007ffff6266175 in QMetaType::registerNormalizedType(QByteArray const&, void (*)(void*), void* (*)(void const*), void (*)(void*), void* (*)(void*, void const*), int, QFlags<QMetaType::TypeFlag>, QMetaObject const*) ()
    9. from /home/zq/Qt5.4.0/5.4/gcc_64/lib/libQt5Core.so.5
    10. #4 0x00007ffff677dc5a in ?? () from /home/zq/Qt5.4.0/5.4/gcc_64/lib/libQt5Gui.so.5
    11. #5 0x00007ffff7dea13a in call_init (l=<optimized out>, argc=argc@entry=1, argv=argv@entry=0x7fffffffdb58, env=env@entry=0x7fffffffdb68) at dl-init.c:78
    12. #6 0x00007ffff7dea223 in call_init (env=<optimized out>, argv=<optimized out>, argc=<optimized out>, l=<optimized out>) at dl-init.c:36
    13. #7 _dl_init (main_map=0x7ffff7ffe1c8, argc=1, argv=0x7fffffffdb58, env=0x7fffffffdb68) at dl-init.c:126
    14. #8 0x00007ffff7ddb30a in _dl_start_user () from /lib64/ld-linux-x86-64.so.2
    15. #9 0x0000000000000001 in ?? ()
    16. #10 0x00007fffffffdf7a in ?? ()
    17. #11 0x0000000000000000 in ?? ()
    To copy to clipboard, switch view to plain text mode 
    Last edited by dalishi; 24th June 2015 at 07:05.

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QMetaType::registerType: Binary compatibility break -- Size mismatch for type 'QP

    Check the build output, maybe you are accidentally linking against an incompatible version of Marble, e.g. its Qt4 version.

    Cheers,
    _

  3. #3
    Join Date
    Jun 2015
    Posts
    2
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11

    Default Re: QMetaType::registerType: Binary compatibility break -- Size mismatch for type 'QP

    Thanks anda

    I compiled marble with Qt4 instead and it worked. Maybe the marble now does not support Qt5.

  4. #4
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QMetaType::registerType: Binary compatibility break -- Size mismatch for type 'QP

    I am pretty sure it can be built with both Qt versions.
    Its CMakeList.txt file has sections for each version
    https://projects.kde.org/projects/kd...CMakeLists.txt

    Cheers,
    _

Similar Threads

  1. Replies: 5
    Last Post: 22nd February 2013, 13:11
  2. Replies: 2
    Last Post: 13th October 2012, 16:58
  3. Replies: 3
    Last Post: 21st June 2011, 06:25
  4. Replies: 4
    Last Post: 12th May 2011, 10:06
  5. Replies: 13
    Last Post: 10th March 2011, 07:35

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.