Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Button Segmentation fault Qt 6.3.1
Qt 6.11 is out! See what's new in the release blog

Button Segmentation fault Qt 6.3.1

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
6 Posts 6 Posters 1.2k 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.
  • J Offline
    J Offline
    JonC
    wrote on last edited by
    #1

    Hello,

    I just try a simple qml application with a button but I get a segmentation fault immediately.
    Below my sample code :

    import QtQuick
    import QtQuick.Controls 6.3
    
    Window {
        id: window
        width: 600
        height: 1000
        visible: true
        title: qsTr("Hello World")
    
        Button {
            id: button
            x: 116
            y: 214
            width: 136
            height: 70
            text: "Button"
        }
    }
    

    The segmentation fault is in qquickicon.cpp, the name is not available.

    QString QQuickIcon::name() const
    {
        return d->name;
    }
    

    Thanks for your help

    1 Reply Last reply
    0
    • N Offline
      N Offline
      NYBL
      wrote on last edited by
      #2

      runs fine for me in Qt 6.3.1, maybe something with your build.
      note that you don't need to specify import version.

      1 Reply Last reply
      0
      • T Offline
        T Offline
        Thomas Meilleroux
        wrote on last edited by
        #3

        Same for me: the sigsegv appears in Qt 6.3.1 in Debug Mode only, using QtCreator's debugView.
        Compiling in MinGW-64Bit.
        Stops at line 130 of Qt\6.3.1\Src\qtdeclarative\src\quicktemplates2\qquickicon.cpp.

        1 Reply Last reply
        0
        • jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Could be a bug, worth checking https://bugreports.qt.io/secure/Dashboard.jspa

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • E Offline
            E Offline
            Eden2004
            wrote on last edited by
            #5

            I experience it too. My program was working just fine in 6.2 but after upgrading to 6.3.1 this week-end, it is as described by Thomas: SegFault, only in debug builds, after using F5 in Qt Creator. It happens both with MinGW and MSVC.
            The QQuickIcon of a QML Button seems uninitialized (and the button has only text). I don't think the sigv happens all the time but when it does, it does often.

            	this	@0x1ade02a9330	QQuickIcon
            		d	@0x1ade02a9330	QExplicitlySharedDataPointer<QQuickIconPrivate>
            			d	@0x7ffd946c4cb0	QQuickIconPrivate
            				[QSharedData]	ref: -1807034576	QSharedData
            				color	@0x7ffd946c4ce8	QColor
            					cspec	2488347376 (2488347376)	QColor::Spec
            					ct	@0x7ffd946c4cec	QColor::CT
            				height	32765	int
            				name	<inaccessible>	QString
            				ownerAndCache	@0x7ffd946c4cf8	QTaggedPointer<QObject, QQuickIconPrivate::CacheStatus>
            				resolveMask	32765	int
            				resolvedSource	<inaccessible>	QUrl
            				source	<inaccessible>	QUrl
            				width	-1806619952	int
            
            1  QArrayDataPointer<char16_t>::ref               qarraydatapointer.h            325  0x7ffda6a4632c 
            2  QArrayDataPointer<char16_t>::QArrayDataPointer qarraydatapointer.h            71   0x7ffda6a4632c 
            3  QString::QString                               qstring.h                      1242 0x7ffda6a4632c 
            4  QQuickIcon::name                               qquickicon.cpp                 130  0x7ffda6a4632c 
            5  QQuickIcon::qt_static_metacall                 moc_qquickicon_p.cpp           88   0x7ffda6a4632c 
            6  QMetaProperty::read                            qmetaobject.cpp                3079 0x7ffd947e80dd 
            7  QQmlWatchProxy::notifyValueChanged             qqmlwatcher.cpp                112  0x7ffdfd3b86f0 
            8  QQmlWatcher::addPropertyWatch                  qqmlwatcher.cpp                178  0x7ffdfd3b91d4 
            9  QQmlWatcher::addWatch                          qqmlwatcher.cpp                128  0x7ffdfd3b931c 
            10 QQmlEngineDebugServiceImpl::processMessage     qqmlenginedebugservice.cpp     574  0x7ffdfd3b76fb 
            11 QtPrivate::QSlotObjectBase::call               qobjectdefs_impl.h             399  0x7ffd9480f592 
            12 QMetaCallEvent::placeMetaCall                  qobject.cpp                    624  0x7ffd9480f592 
            13 QObject::event                                 qobject.cpp                    1356 0x7ffd9480fdc4 
            14 QApplicationPrivate::notify_helper             qapplication.cpp               3350 0x7ffd93c653b6 
            15 QCoreApplication::notifyInternal2              qcoreapplication.cpp           1067 0x7ffd947d91fd 
            16 QCoreApplication::sendEvent                    qcoreapplication.cpp           1483 0x7ffd947dcad9 
            17 QCoreApplicationPrivate::sendPostedEvents      qcoreapplication.cpp           1845 0x7ffd947dcad9 
            18 QEventDispatcherWin32::sendPostedEvents        qeventdispatcher_win.cpp       905  0x7ffd9495a37c 
            19 QWindowsGuiEventDispatcher::sendPostedEvents   qwindowsguieventdispatcher.cpp 79   0x7ffd928dd6ce 
            20 QEventDispatcherWin32::processEvents           qeventdispatcher_win.cpp       474  0x7ffd9495dfa8 
            21 QWindowsGuiEventDispatcher::processEvents      qwindowsguieventdispatcher.cpp 72   0x7ffd928dd6b5 
            22 QEventLoop::processEvents                      qeventloop.cpp                 136  0x7ffd947e40d4 
            23 QEventLoop::exec                               qeventloop.cpp                 218  0x7ffd947e40d4 
            24 QCoreApplication::exec                         qflags.h                       110  0x7ffd947e2719 
            25 QGuiApplication::exec                          qguiapplication.cpp            1887 0x7ffd925b65ff 
            26 QApplication::exec                             qapplication.cpp               2631 0x7ffd93c65327 
            27 qMain                                          main.cpp                       57   0x7ff731bb1c6b 
            28 WinMain                                        qtentrypoint_win.cpp           50   0x7ff731bc4852 
            29 __tmainCRTStartup                                                                  0x7ff731bb1395 
            30 WinMainCRTStartup                                                                  0x7ff731bb14c6
            

            Found no bug in the database.

            1 Reply Last reply
            0
            • J Offline
              J Offline
              Jeff_X
              wrote on last edited by
              #6

              Any updates to this bug? I'm experiencing it in 6.4 only in debugger mode when I press F5 which makes it so impossible to debug the application

              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