Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-101264

Crash when having many connections with multiple parameters in QML file

    XMLWordPrintable

Details

    • Android, Windows

    Description

      When having many (total 4k+ lines of code) connections in a QML file, application starts to crash with the following stack trace:

      1   QString::size                                                                qstring.h                 277  0x7ffff498f92d 
      2   QConcatenable<QString>::size                                                 qstringbuilder.h          269  0x7ffff7a1b954 
      3   QConcatenable<QStringBuilder<QStringBuilder<QString,QString>,QString>>::size qstringbuilder.h          424  0x7ffff7af06c8 
      4   QStringBuilder<QStringBuilder<QString,QString>,QString>::convertTo<QString>  qstringbuilder.h          111  0x7ffff7b36298 
      5   QStringBuilder<QStringBuilder<QString,QString>,QString>::operator QString    qstringbuilder.h          131  0x7ffff7b3f3bd 
      6   QV4::Function::updateInternalClass                                           qv4function.cpp           141  0x7ffff7b91a24 
      7   QQmlBoundSignalExpression::QQmlBoundSignalExpression                         qqmlboundsignal.cpp       134  0x7ffff7e14801 
      8   QQmlConnections::connectSignalsToMethods                                     qqmlconnections.cpp       328  0x7ffff7f622c6 
      9   QQmlConnections::connectSignals                                              qqmlconnections.cpp       280  0x7ffff7f61ec8 
      10  QQmlConnections::componentComplete                                           qqmlconnections.cpp       389  0x7ffff7f62a49 
      11  QQmlObjectCreator::finalize                                                  qqmlobjectcreator.cpp     1416 0x7ffff7ecb0f3 
      12  QQmlComponentPrivate::complete                                               qqmlcomponent.cpp         1002 0x7ffff7e01480 
      13  QQmlComponentPrivate::completeCreate                                         qqmlcomponent.cpp         1093 0x7ffff7e00359 
      14  QQmlComponent::completeCreate                                                qqmlcomponent.cpp         1080 0x7ffff7dfe392 
      15  QQmlComponent::create                                                        qqmlcomponent.cpp         826  0x7ffff7dfe11e 
      16  QQmlApplicationEnginePrivate::finishLoad                                     qqmlapplicationengine.cpp 148  0x7ffff7eba1b6 
      17  QQmlApplicationEnginePrivate::startLoad                                      qqmlapplicationengine.cpp 133  0x7ffff7eb9cd2 
      18  QQmlApplicationEngine::load                                                  qqmlapplicationengine.cpp 287  0x7ffff7eb90ed 
      19  main                                                                         main.cpp                  28   0x7ff78eb915db 
      20  WinMain                                                                      qtmain_win.cpp            97   0x7ff78ebab795 
      ... <More>                                                                                                                     
      

      QQmlBoundSignalExpression::QQmlBoundSignalExpression method refers to specific slot in the qml file, and after removing certain amount of seemingly random slots, the crash goes away. I could not deduce any logic in why those specific slots crash the application, as changing the amount of parameters and the code in those slots do not help, and also moving the slot code to different portion in code did not help.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            sami.shalayel Sami Shalayel
            jussi_witick Jussi Witick
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes