Segmentation fault (core dumped)
-
wrote on 20 Feb 2024, 07:52 last edited by
I am trying to execute my builded project. But i have taken Segmentation Fault (Core Dumped). I'am using Arch Linux and i3.
This is my journalctl record:
systemd-coredump[43851]: [🡕] Process 43832 (SpeedMeterApp) of user 1000 dumped core. Stack trace of thread 43832: #0 0x0000779c99b32b1f _ZN18QWidgetTextControl14setCursorWidthEi (libQt6Widgets.so.6 + 0x332b1f) #1 0x0000779c99b277a4 _ZN18QWidgetTextControlC1EP7QObject (libQt6Widgets.so.6 + 0x3277a4) #2 0x0000779c99c7703c n/a (libQt6Widgets.so.6 + 0x47703c) #3 0x0000779c99c777b1 _ZNK17QGraphicsTextItem8documentEv (libQt6Widgets.so.6 + 0x4777b1) #4 0x0000779c9a0d8432 n/a (libQt6Charts.so.6 + 0xd8432) #5 0x0000779c9a0d9b00 _ZNK17ChartThemeManager13decorateChartEP6QChartP10ChartTheme (libQt6Charts.so.6 + 0xd9b00) #6 0x0000779c9a0da6ed _ZN17ChartThemeManager8setThemeEN6QChart10ChartThemeE (libQt6Charts.so.6 + 0xda6ed) #7 0x0000779c9a10103c _ZN13QChartPrivate4initEv (libQt6Charts.so.6 + 0x10103c) #8 0x0000779ca015c5d9 _ZN16DeclarativeChart9initChartEN6QChart9ChartTypeE (libQt6ChartsQml.so.6 + 0x2d5d9) #9 0x0000779ca017546a n/a (libQt6ChartsQml.so.6 + 0x4646a) #10 0x0000779ca6310ef2 _ZNK8QQmlType6createEPPvm (libQt6Qml.so.6 + 0x310ef2) #11 0x0000779ca6310ff2 _ZNK8QQmlType18createWithQQmlDataEv (libQt6Qml.so.6 + 0x310ff2) #12 0x0000779ca62dafff _ZN17QQmlObjectCreator14createInstanceEiP7QObjectb (libQt6Qml.so.6 + 0x2dafff) #13 0x0000779ca62ded34 n/a (libQt6Qml.so.6 + 0x2ded34) #14 0x0000779ca62dae85 _ZN17QQmlObjectCreator14createInstanceEiP7QObjectb (libQt6Qml.so.6 + 0x2dae85) #15 0x0000779ca62dc7c4 _ZN17QQmlObjectCreator18setPropertyBindingEPK16QQmlPropertyDataPKN3QV412CompiledData7BindingE (libQt6Qml.so.6 + 0x2dc7c4) #16 0x0000779ca62d4ece _ZN17QQmlObjectCreator13setupBindingsE6QFlagsINS_11BindingModeEE (libQt6Qml.so.6 + 0x2d4ece) #17 0x0000779ca62d8f8b _ZN17QQmlObjectCreator16populateInstanceEiP7QObjectS1_PK16QQmlPropertyDataPKN3QV412CompiledData7BindingE (libQt6Qml.so.6 + 0x2d8f8b) #18 0x0000779ca62dabb6 _ZN17QQmlObjectCreator14createInstanceEiP7QObjectb (libQt6Qml.so.6 + 0x2dabb6) #19 0x0000779ca62ded34 n/a (libQt6Qml.so.6 + 0x2ded34) #20 0x0000779ca62dae85 _ZN17QQmlObjectCreator14createInstanceEiP7QObjectb (libQt6Qml.so.6 + 0x2dae85) #21 0x0000779ca62dc7c4 _ZN17QQmlObjectCreator18setPropertyBindingEPK16QQmlPropertyDataPKN3QV412CompiledData7BindingE (libQt6Qml.so.6 + 0x2dc7c4) #22 0x0000779ca62d4ece _ZN17QQmlObjectCreator13setupBindingsE6QFlagsINS_11BindingModeEE (libQt6Qml.so.6 + 0x2d4ece) #23 0x0000779ca62d8f8b _ZN17QQmlObjectCreator16populateInstanceEiP7QObjectS1_PK16QQmlPropertyDataPKN3QV412CompiledData7BindingE (libQt6Qml.so.6 + 0x2d8f8b) #24 0x0000779ca62dabb6 _ZN17QQmlObjectCreator14createInstanceEiP7QObjectb (libQt6Qml.so.6 + 0x2dabb6) #25 0x0000779ca62ded34 n/a (libQt6Qml.so.6 + 0x2ded34) #26 0x0000779ca62dae85 _ZN17QQmlObjectCreator14createInstanceEiP7QObjectb (libQt6Qml.so.6 + 0x2dae85) #27 0x0000779ca62dc7c4 _ZN17QQmlObjectCreator18setPropertyBindingEPK16QQmlPropertyDataPKN3QV412CompiledData7BindingE (libQt6Qml.so.6 + 0x2dc7c4) #28 0x0000779ca62d4ece _ZN17QQmlObjectCreator13setupBindingsE6QFlagsINS_11BindingModeEE (libQt6Qml.so.6 + 0x2d4ece) #29 0x0000779ca62d8f8b _ZN17QQmlObjectCreator16populateInstanceEiP7QObjectS1_PK16QQmlPropertyDataPKN3QV412CompiledData7BindingE (libQt6Qml.so.6 + 0x2d8f8b) #30 0x0000779ca62dabb6 _ZN17QQmlObjectCreator14createInstanceEiP7QObjectb (libQt6Qml.so.6 + 0x2dabb6) #31 0x0000779ca62ded34 n/a (libQt6Qml.so.6 + 0x2ded34) #32 0x0000779ca62dae85 _ZN17QQmlObjectCreator14createInstanceEiP7QObjectb (libQt6Qml.so.6 + 0x2dae85) #33 0x0000779ca62ded34 n/a (libQt6Qml.so.6 + 0x2ded34) #34 0x0000779ca625d838 _ZN20QQmlComponentPrivate11beginCreateE14QQmlRefPointerI15QQmlContextDataE (libQt6Qml.so.6 + 0x25d838) #35 0x0000779ca625479b _ZN20QQmlComponentPrivate13doBeginCreateEP13QQmlComponentP11QQmlContext (libQt6Qml.so.6 + 0x25479b) #36 0x0000779ca625857f _ZN20QQmlComponentPrivate20createWithPropertiesEP7QObjectRK4QMapI7QString8QVariantEP11QQmlContextNS_14CreateBehaviorE (libQt6Qml.so.6 + 0x25857f) #37 0x0000779ca623abe0 _ZN28QQmlApplicationEnginePrivate10finishLoadEP13QQmlComponent (libQt6Qml.so.6 + 0x23abe0) #38 0x0000779ca623c2c7 _ZN21QQmlApplicationEngine4loadERK4QUrl (libQt6Qml.so.6 + 0x23c2c7) #39 0x0000558120783595 n/a (/home/amore/Projects/qtProject/SpeedMeter2/build7/SpeedMeterApp + 0x17595) #40 0x0000779ca5243cd0 n/a (libc.so.6 + 0x25cd0) #41 0x0000779ca5243d8a __libc_start_main (libc.so.6 + 0x25d8a) #42 0x00005581207850a5 n/a (/home/amore/Projects/qtProject/SpeedMeter2/build7/SpeedMeterApp + 0x190a5) ELF object binary architecture: AMD x86-64
CMakeLists.txt:
cmake_minimum_required(VERSION 3.21.1) option(LINK_INSIGHT "Link Qt Insight Tracker library" ON) option(BUILD_QDS_COMPONENTS "Build design studio components" ON) project(SpeedMeterApp LANGUAGES CXX) set(CMAKE_AUTOMOC ON) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(QT_QML_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/qml) set(QML_IMPORT_PATH ${QT_QML_OUTPUT_DIRECTORY} CACHE STRING "Import paths for Qt Creator's code model" FORCE ) find_package(Qt6 6.2 REQUIRED COMPONENTS Core Gui Qml Quick) if (Qt6_VERSION VERSION_GREATER_EQUAL 6.3) qt_standard_project_setup() endif() qt_add_executable(SpeedMeterApp src/main.cpp) qt_add_resources(SpeedMeterApp "configuration" PREFIX "/" FILES qtquickcontrols2.conf ) target_link_libraries(SpeedMeterApp PRIVATE Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Gui Qt${QT_VERSION_MAJOR}::Quick Qt${QT_VERSION_MAJOR}::Qml ) if (BUILD_QDS_COMPONENTS) include(${CMAKE_CURRENT_SOURCE_DIR}/qmlcomponents) endif() include(${CMAKE_CURRENT_SOURCE_DIR}/qmlmodules) if (LINK_INSIGHT) include(${CMAKE_CURRENT_SOURCE_DIR}/insight) endif () include(GNUInstallDirs) install(TARGETS SpeedMeterApp BUNDLE DESTINATION . LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} )
main.cpp:
#include <QGuiApplication> #include <QQmlApplicationEngine> #include <QQmlContext> #include "app_environment.h" #include "import_qml_plugins.h" int main(int argc, char *argv[]) { set_qt_environment(); QGuiApplication app(argc, argv); QQmlApplicationEngine engine; QObject object; object.setProperty("message", "Merhaba Dünya"); engine.rootContext()->setContextProperty("cppObject", &object); engine.addImportPath(QStringLiteral("qrc:/")); engine.addImportPath(QStringLiteral("qml")); const QUrl url(QStringLiteral("qrc:/qt/qml/Main/main.qml")); engine.load(url); if (engine.rootObjects().isEmpty()) { return -1; } QObject::connect( &engine, &QQmlApplicationEngine::objectCreated, &app, [url](QObject *obj, const QUrl &objUrl) { if (!obj && url == objUrl) QCoreApplication::exit(-1); }, Qt::QueuedConnection); return app.exec(); }
coredumpctl:
43832 1000 1000 SIGSEGV present /home/amore/Projects/qtProject/SpeedMeter2/build7/SpeedMeterApp 4.3M
Thanks in advance.
-
I am trying to execute my builded project. But i have taken Segmentation Fault (Core Dumped). I'am using Arch Linux and i3.
This is my journalctl record:
systemd-coredump[43851]: [🡕] Process 43832 (SpeedMeterApp) of user 1000 dumped core. Stack trace of thread 43832: #0 0x0000779c99b32b1f _ZN18QWidgetTextControl14setCursorWidthEi (libQt6Widgets.so.6 + 0x332b1f) #1 0x0000779c99b277a4 _ZN18QWidgetTextControlC1EP7QObject (libQt6Widgets.so.6 + 0x3277a4) #2 0x0000779c99c7703c n/a (libQt6Widgets.so.6 + 0x47703c) #3 0x0000779c99c777b1 _ZNK17QGraphicsTextItem8documentEv (libQt6Widgets.so.6 + 0x4777b1) #4 0x0000779c9a0d8432 n/a (libQt6Charts.so.6 + 0xd8432) #5 0x0000779c9a0d9b00 _ZNK17ChartThemeManager13decorateChartEP6QChartP10ChartTheme (libQt6Charts.so.6 + 0xd9b00) #6 0x0000779c9a0da6ed _ZN17ChartThemeManager8setThemeEN6QChart10ChartThemeE (libQt6Charts.so.6 + 0xda6ed) #7 0x0000779c9a10103c _ZN13QChartPrivate4initEv (libQt6Charts.so.6 + 0x10103c) #8 0x0000779ca015c5d9 _ZN16DeclarativeChart9initChartEN6QChart9ChartTypeE (libQt6ChartsQml.so.6 + 0x2d5d9) #9 0x0000779ca017546a n/a (libQt6ChartsQml.so.6 + 0x4646a) #10 0x0000779ca6310ef2 _ZNK8QQmlType6createEPPvm (libQt6Qml.so.6 + 0x310ef2) #11 0x0000779ca6310ff2 _ZNK8QQmlType18createWithQQmlDataEv (libQt6Qml.so.6 + 0x310ff2) #12 0x0000779ca62dafff _ZN17QQmlObjectCreator14createInstanceEiP7QObjectb (libQt6Qml.so.6 + 0x2dafff) #13 0x0000779ca62ded34 n/a (libQt6Qml.so.6 + 0x2ded34) #14 0x0000779ca62dae85 _ZN17QQmlObjectCreator14createInstanceEiP7QObjectb (libQt6Qml.so.6 + 0x2dae85) #15 0x0000779ca62dc7c4 _ZN17QQmlObjectCreator18setPropertyBindingEPK16QQmlPropertyDataPKN3QV412CompiledData7BindingE (libQt6Qml.so.6 + 0x2dc7c4) #16 0x0000779ca62d4ece _ZN17QQmlObjectCreator13setupBindingsE6QFlagsINS_11BindingModeEE (libQt6Qml.so.6 + 0x2d4ece) #17 0x0000779ca62d8f8b _ZN17QQmlObjectCreator16populateInstanceEiP7QObjectS1_PK16QQmlPropertyDataPKN3QV412CompiledData7BindingE (libQt6Qml.so.6 + 0x2d8f8b) #18 0x0000779ca62dabb6 _ZN17QQmlObjectCreator14createInstanceEiP7QObjectb (libQt6Qml.so.6 + 0x2dabb6) #19 0x0000779ca62ded34 n/a (libQt6Qml.so.6 + 0x2ded34) #20 0x0000779ca62dae85 _ZN17QQmlObjectCreator14createInstanceEiP7QObjectb (libQt6Qml.so.6 + 0x2dae85) #21 0x0000779ca62dc7c4 _ZN17QQmlObjectCreator18setPropertyBindingEPK16QQmlPropertyDataPKN3QV412CompiledData7BindingE (libQt6Qml.so.6 + 0x2dc7c4) #22 0x0000779ca62d4ece _ZN17QQmlObjectCreator13setupBindingsE6QFlagsINS_11BindingModeEE (libQt6Qml.so.6 + 0x2d4ece) #23 0x0000779ca62d8f8b _ZN17QQmlObjectCreator16populateInstanceEiP7QObjectS1_PK16QQmlPropertyDataPKN3QV412CompiledData7BindingE (libQt6Qml.so.6 + 0x2d8f8b) #24 0x0000779ca62dabb6 _ZN17QQmlObjectCreator14createInstanceEiP7QObjectb (libQt6Qml.so.6 + 0x2dabb6) #25 0x0000779ca62ded34 n/a (libQt6Qml.so.6 + 0x2ded34) #26 0x0000779ca62dae85 _ZN17QQmlObjectCreator14createInstanceEiP7QObjectb (libQt6Qml.so.6 + 0x2dae85) #27 0x0000779ca62dc7c4 _ZN17QQmlObjectCreator18setPropertyBindingEPK16QQmlPropertyDataPKN3QV412CompiledData7BindingE (libQt6Qml.so.6 + 0x2dc7c4) #28 0x0000779ca62d4ece _ZN17QQmlObjectCreator13setupBindingsE6QFlagsINS_11BindingModeEE (libQt6Qml.so.6 + 0x2d4ece) #29 0x0000779ca62d8f8b _ZN17QQmlObjectCreator16populateInstanceEiP7QObjectS1_PK16QQmlPropertyDataPKN3QV412CompiledData7BindingE (libQt6Qml.so.6 + 0x2d8f8b) #30 0x0000779ca62dabb6 _ZN17QQmlObjectCreator14createInstanceEiP7QObjectb (libQt6Qml.so.6 + 0x2dabb6) #31 0x0000779ca62ded34 n/a (libQt6Qml.so.6 + 0x2ded34) #32 0x0000779ca62dae85 _ZN17QQmlObjectCreator14createInstanceEiP7QObjectb (libQt6Qml.so.6 + 0x2dae85) #33 0x0000779ca62ded34 n/a (libQt6Qml.so.6 + 0x2ded34) #34 0x0000779ca625d838 _ZN20QQmlComponentPrivate11beginCreateE14QQmlRefPointerI15QQmlContextDataE (libQt6Qml.so.6 + 0x25d838) #35 0x0000779ca625479b _ZN20QQmlComponentPrivate13doBeginCreateEP13QQmlComponentP11QQmlContext (libQt6Qml.so.6 + 0x25479b) #36 0x0000779ca625857f _ZN20QQmlComponentPrivate20createWithPropertiesEP7QObjectRK4QMapI7QString8QVariantEP11QQmlContextNS_14CreateBehaviorE (libQt6Qml.so.6 + 0x25857f) #37 0x0000779ca623abe0 _ZN28QQmlApplicationEnginePrivate10finishLoadEP13QQmlComponent (libQt6Qml.so.6 + 0x23abe0) #38 0x0000779ca623c2c7 _ZN21QQmlApplicationEngine4loadERK4QUrl (libQt6Qml.so.6 + 0x23c2c7) #39 0x0000558120783595 n/a (/home/amore/Projects/qtProject/SpeedMeter2/build7/SpeedMeterApp + 0x17595) #40 0x0000779ca5243cd0 n/a (libc.so.6 + 0x25cd0) #41 0x0000779ca5243d8a __libc_start_main (libc.so.6 + 0x25d8a) #42 0x00005581207850a5 n/a (/home/amore/Projects/qtProject/SpeedMeter2/build7/SpeedMeterApp + 0x190a5) ELF object binary architecture: AMD x86-64
CMakeLists.txt:
cmake_minimum_required(VERSION 3.21.1) option(LINK_INSIGHT "Link Qt Insight Tracker library" ON) option(BUILD_QDS_COMPONENTS "Build design studio components" ON) project(SpeedMeterApp LANGUAGES CXX) set(CMAKE_AUTOMOC ON) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(QT_QML_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/qml) set(QML_IMPORT_PATH ${QT_QML_OUTPUT_DIRECTORY} CACHE STRING "Import paths for Qt Creator's code model" FORCE ) find_package(Qt6 6.2 REQUIRED COMPONENTS Core Gui Qml Quick) if (Qt6_VERSION VERSION_GREATER_EQUAL 6.3) qt_standard_project_setup() endif() qt_add_executable(SpeedMeterApp src/main.cpp) qt_add_resources(SpeedMeterApp "configuration" PREFIX "/" FILES qtquickcontrols2.conf ) target_link_libraries(SpeedMeterApp PRIVATE Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Gui Qt${QT_VERSION_MAJOR}::Quick Qt${QT_VERSION_MAJOR}::Qml ) if (BUILD_QDS_COMPONENTS) include(${CMAKE_CURRENT_SOURCE_DIR}/qmlcomponents) endif() include(${CMAKE_CURRENT_SOURCE_DIR}/qmlmodules) if (LINK_INSIGHT) include(${CMAKE_CURRENT_SOURCE_DIR}/insight) endif () include(GNUInstallDirs) install(TARGETS SpeedMeterApp BUNDLE DESTINATION . LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} )
main.cpp:
#include <QGuiApplication> #include <QQmlApplicationEngine> #include <QQmlContext> #include "app_environment.h" #include "import_qml_plugins.h" int main(int argc, char *argv[]) { set_qt_environment(); QGuiApplication app(argc, argv); QQmlApplicationEngine engine; QObject object; object.setProperty("message", "Merhaba Dünya"); engine.rootContext()->setContextProperty("cppObject", &object); engine.addImportPath(QStringLiteral("qrc:/")); engine.addImportPath(QStringLiteral("qml")); const QUrl url(QStringLiteral("qrc:/qt/qml/Main/main.qml")); engine.load(url); if (engine.rootObjects().isEmpty()) { return -1; } QObject::connect( &engine, &QQmlApplicationEngine::objectCreated, &app, [url](QObject *obj, const QUrl &objUrl) { if (!obj && url == objUrl) QCoreApplication::exit(-1); }, Qt::QueuedConnection); return app.exec(); }
coredumpctl:
43832 1000 1000 SIGSEGV present /home/amore/Projects/qtProject/SpeedMeter2/build7/SpeedMeterApp 4.3M
Thanks in advance.
@Samed-Sucuk Run your app in debugger until it crashes and post the stack trace here
-
@Samed-Sucuk Run your app in debugger until it crashes and post the stack trace here
wrote on 20 Feb 2024, 10:59 last edited by@jsulm I build debug mode like this: "cmake -DCMAKE_BUILD_TYPE=Debug .." and "make --debug" didn't give error. But when i trying to ./SpeedMeterApp i take same error. I try to gdb ./SpeedMeterApp but does not give results.
-
@jsulm I build debug mode like this: "cmake -DCMAKE_BUILD_TYPE=Debug .." and "make --debug" didn't give error. But when i trying to ./SpeedMeterApp i take same error. I try to gdb ./SpeedMeterApp but does not give results.
@Samed-Sucuk said in Segmentation fault (core dumped):
gdb ./SpeedMeterApp
but do you also run the app then in GDB?
-
@Samed-Sucuk said in Segmentation fault (core dumped):
gdb ./SpeedMeterApp
but do you also run the app then in GDB?
wrote on 20 Feb 2024, 13:08 last edited by@jsulm Yes. Result is here:
Reading symbols from ./SpeedMeterApp... (gdb) run Starting program: /home/amore/Projects/qtProject/SpeedMeter2/debug2/SpeedMeterApp This GDB supports auto-downloading debuginfo from the following URLs: <https://debuginfod.archlinux.org> Enable debuginfod for this session? (y or [n]) y Debuginfod has been enabled. To make this setting permanent, add 'set debuginfod enabled on' to .gdbinit. Downloading separate debug info for system-supplied DSO at 0x7ffff7fc6000 [Thread debugging using libthread_db enabled] Using host libthread_db library "/usr/lib/libthread_db.so.1". Downloading separate debug info for /usr/lib/libb2.so.1 Downloading separate debug info for /usr/lib/libpsl.so.5 Downloading separate debug info for /usr/lib/libunistring.so.5 [New Thread 0x7ffff1a006c0 (LWP 1705)] [New Thread 0x7ffff10006c0 (LWP 1706)] [New Thread 0x7fffebe006c0 (LWP 1707)] [New Thread 0x7fffe90006c0 (LWP 1735)] [New Thread 0x7fffe1a006c0 (LWP 1736)] [New Thread 0x7fffe10006c0 (LWP 1737)] [New Thread 0x7fffd3a006c0 (LWP 1738)] [New Thread 0x7fffd30006c0 (LWP 1739)] [New Thread 0x7fffd26006c0 (LWP 1740)] [New Thread 0x7fffd1c006c0 (LWP 1741)] [New Thread 0x7fffd12006c0 (LWP 1742)] [New Thread 0x7fffcbe006c0 (LWP 1743)] [Thread 0x7fffcbe006c0 (LWP 1743) exited] [Thread 0x7fffd12006c0 (LWP 1742) exited] [Thread 0x7fffd1c006c0 (LWP 1741) exited] [New Thread 0x7fffd1c006c0 (LWP 1744)] [New Thread 0x7fffd12006c0 (LWP 1745)] [New Thread 0x7fffcbe006c0 (LWP 1746)] [New Thread 0x7fffcb4006c0 (LWP 1747)] [New Thread 0x7fffcaa006c0 (LWP 1748)] Downloading separate debug info for /usr/lib/libnss_resolve.so.2 Thread 1 "SpeedMeterApp" received signal SIGSEGV, Segmentation fault. 0x00007fffea532b1f in QWidgetTextControl::setCursorWidth (this=0x555556d6fe20, width=-1) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/widgets/widgets/qwidgettextcontrol.cpp:2473 Downloading source file /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/widgets/widgets/qwidgettextcontrol.cpp 2473 width = QApplication::style()->pixelMetric(QStyle::PM_TextCursorWidth, nullptr, qobject_cast<QWidget *>(parent()));
-
@jsulm Yes. Result is here:
Reading symbols from ./SpeedMeterApp... (gdb) run Starting program: /home/amore/Projects/qtProject/SpeedMeter2/debug2/SpeedMeterApp This GDB supports auto-downloading debuginfo from the following URLs: <https://debuginfod.archlinux.org> Enable debuginfod for this session? (y or [n]) y Debuginfod has been enabled. To make this setting permanent, add 'set debuginfod enabled on' to .gdbinit. Downloading separate debug info for system-supplied DSO at 0x7ffff7fc6000 [Thread debugging using libthread_db enabled] Using host libthread_db library "/usr/lib/libthread_db.so.1". Downloading separate debug info for /usr/lib/libb2.so.1 Downloading separate debug info for /usr/lib/libpsl.so.5 Downloading separate debug info for /usr/lib/libunistring.so.5 [New Thread 0x7ffff1a006c0 (LWP 1705)] [New Thread 0x7ffff10006c0 (LWP 1706)] [New Thread 0x7fffebe006c0 (LWP 1707)] [New Thread 0x7fffe90006c0 (LWP 1735)] [New Thread 0x7fffe1a006c0 (LWP 1736)] [New Thread 0x7fffe10006c0 (LWP 1737)] [New Thread 0x7fffd3a006c0 (LWP 1738)] [New Thread 0x7fffd30006c0 (LWP 1739)] [New Thread 0x7fffd26006c0 (LWP 1740)] [New Thread 0x7fffd1c006c0 (LWP 1741)] [New Thread 0x7fffd12006c0 (LWP 1742)] [New Thread 0x7fffcbe006c0 (LWP 1743)] [Thread 0x7fffcbe006c0 (LWP 1743) exited] [Thread 0x7fffd12006c0 (LWP 1742) exited] [Thread 0x7fffd1c006c0 (LWP 1741) exited] [New Thread 0x7fffd1c006c0 (LWP 1744)] [New Thread 0x7fffd12006c0 (LWP 1745)] [New Thread 0x7fffcbe006c0 (LWP 1746)] [New Thread 0x7fffcb4006c0 (LWP 1747)] [New Thread 0x7fffcaa006c0 (LWP 1748)] Downloading separate debug info for /usr/lib/libnss_resolve.so.2 Thread 1 "SpeedMeterApp" received signal SIGSEGV, Segmentation fault. 0x00007fffea532b1f in QWidgetTextControl::setCursorWidth (this=0x555556d6fe20, width=-1) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/widgets/widgets/qwidgettextcontrol.cpp:2473 Downloading source file /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/widgets/widgets/qwidgettextcontrol.cpp 2473 width = QApplication::style()->pixelMetric(QStyle::PM_TextCursorWidth, nullptr, qobject_cast<QWidget *>(parent()));
wrote on 20 Feb 2024, 17:45 last edited by JoeCFD@Samed-Sucuk As @GrecKo pointed out before, qml chart needs widgets module. Replacing QGuiApplication with QApplication will do the trick.
-
@Samed-Sucuk As @GrecKo pointed out before, qml chart needs widgets module. Replacing QGuiApplication with QApplication will do the trick.
wrote on 20 Feb 2024, 22:39 last edited by -
-
@jsulm Yes. Result is here:
Reading symbols from ./SpeedMeterApp... (gdb) run Starting program: /home/amore/Projects/qtProject/SpeedMeter2/debug2/SpeedMeterApp This GDB supports auto-downloading debuginfo from the following URLs: <https://debuginfod.archlinux.org> Enable debuginfod for this session? (y or [n]) y Debuginfod has been enabled. To make this setting permanent, add 'set debuginfod enabled on' to .gdbinit. Downloading separate debug info for system-supplied DSO at 0x7ffff7fc6000 [Thread debugging using libthread_db enabled] Using host libthread_db library "/usr/lib/libthread_db.so.1". Downloading separate debug info for /usr/lib/libb2.so.1 Downloading separate debug info for /usr/lib/libpsl.so.5 Downloading separate debug info for /usr/lib/libunistring.so.5 [New Thread 0x7ffff1a006c0 (LWP 1705)] [New Thread 0x7ffff10006c0 (LWP 1706)] [New Thread 0x7fffebe006c0 (LWP 1707)] [New Thread 0x7fffe90006c0 (LWP 1735)] [New Thread 0x7fffe1a006c0 (LWP 1736)] [New Thread 0x7fffe10006c0 (LWP 1737)] [New Thread 0x7fffd3a006c0 (LWP 1738)] [New Thread 0x7fffd30006c0 (LWP 1739)] [New Thread 0x7fffd26006c0 (LWP 1740)] [New Thread 0x7fffd1c006c0 (LWP 1741)] [New Thread 0x7fffd12006c0 (LWP 1742)] [New Thread 0x7fffcbe006c0 (LWP 1743)] [Thread 0x7fffcbe006c0 (LWP 1743) exited] [Thread 0x7fffd12006c0 (LWP 1742) exited] [Thread 0x7fffd1c006c0 (LWP 1741) exited] [New Thread 0x7fffd1c006c0 (LWP 1744)] [New Thread 0x7fffd12006c0 (LWP 1745)] [New Thread 0x7fffcbe006c0 (LWP 1746)] [New Thread 0x7fffcb4006c0 (LWP 1747)] [New Thread 0x7fffcaa006c0 (LWP 1748)] Downloading separate debug info for /usr/lib/libnss_resolve.so.2 Thread 1 "SpeedMeterApp" received signal SIGSEGV, Segmentation fault. 0x00007fffea532b1f in QWidgetTextControl::setCursorWidth (this=0x555556d6fe20, width=-1) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/widgets/widgets/qwidgettextcontrol.cpp:2473 Downloading source file /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.2/src/widgets/widgets/qwidgettextcontrol.cpp 2473 width = QApplication::style()->pixelMetric(QStyle::PM_TextCursorWidth, nullptr, qobject_cast<QWidget *>(parent()));
@Samed-Sucuk Just as a tip: your app did crash in GDB, to get the stack trace type "bt" in GDB after the crash.
1/8