[Development] QMetaType::registerType: Binary compatibility break -- Size mismatch for type 'QPaintBufferCacheEntry' [1024]. Previously registered size 0, now registering size 16. Aborted (core dumped)
Zhang Qun
zhangq.rhy at gmail.com
Wed Jun 24 08:03:07 CEST 2015
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:
Switch view
1. #include <QtWidgets/QApplication>
2. #include <marble/MarbleWidget.h>
3.
4. int main(int argc, char** argv)
5. {
6. QApplication
<http://qt-project.org/doc/qt-4.8/qapplication.html> 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:
Switch view
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})
The gdb traceback of my program is:
Program received signal SIGABRT, Aborted.
0x00007ffff56d1cc9 in __GI_raise (sig=sig at entry=6) at
../nptl/sysdeps/unix/sysv/linux/raise.c:56
56 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 0x00007ffff56d1cc9 in __GI_raise (sig=sig at entry=6) at
../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1 0x00007ffff56d50d8 in __GI_abort () at abort.c:89
#2 0x00007ffff600ab76 in QMessageLogger::fatal(char const*, ...)
const () from /home/zq/Qt5.4.0/5.4/gcc_64/lib/libQt5Core.so.5
#3 0x00007ffff6266175 in QMetaType::registerNormalizedType(QByteArray
const&, void (*)(void*), void* (*)(void const*), void (*)(void*),
void* (*)(void*, void const*), int, QFlags<QMetaType::TypeFlag>,
QMetaObject const*) ()
from /home/zq/Qt5.4.0/5.4/gcc_64/lib/libQt5Core.so.5
#4 0x00007ffff677dc5a in ?? () from
/home/zq/Qt5.4.0/5.4/gcc_64/lib/libQt5Gui.so.5
#5 0x00007ffff7dea13a in call_init (l=<optimized out>,
argc=argc at entry=1, argv=argv at entry=0x7fffffffdb58,
env=env at entry=0x7fffffffdb68) at dl-init.c:78
#6 0x00007ffff7dea223 in call_init (env=<optimized out>,
argv=<optimized out>, argc=<optimized out>, l=<optimized out>) at
dl-init.c:36
#7 _dl_init (main_map=0x7ffff7ffe1c8, argc=1, argv=0x7fffffffdb58,
env=0x7fffffffdb68) at dl-init.c:126
#8 0x00007ffff7ddb30a in _dl_start_user () from /lib64/ld-linux-x86-64.so.2
#9 0x0000000000000001 in ?? ()
#10 0x00007fffffffdf7a in ?? ()
#11 0x0000000000000000 in ?? ()
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20150624/04836f0e/attachment.html>
More information about the Development
mailing list