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

Crash in QCoreApplication::translate() function

    XMLWordPrintable

    Details

      Description

      The translate () function may crash early in the boottime.

      However, this class is called when QQuickView is initialized.
      This sentence(QQmlImportsPrivate::resolveType) does not need to be translated.

      bool QQmlImportsPrivate::resolveType(const QHashedStringRef& type, int *vmajor, int *vminor,
                                           QQmlType** type_return, QList<QQmlError> *errors)
      {
          QQmlImportNamespace *s = 0;
          int dot = type.indexOf(Dot);
          if (dot >= 0) {
              QHashedStringRef namespaceName(type.constData(), dot);
              s = findQualifiedNamespace(namespaceName);
              if (!s) {
                  if (errors) {
                      QQmlError error;
                      error.setDescription(QQmlImportDatabase::tr("- %1 is not a namespace").arg(namespaceName.toString()));
      ...
                      error.setDescription(QQmlImportDatabase::tr("- nested namespaces not allowed"));
      ...
      

      Also, the crash actually occurred like below trace.

      PC: /usr/lib/libQt5Core.so.5.4.1 [0x7538ee2a]
      LR: [0x0]
      
      Backtrace: tid = 1366
      /usr/lib/libQt5Core.so.5.4.1 (_ZN16QCoreApplication9translateEPKcS1_S1_i+0x85) [0x7538ee2a]
      /usr/lib/libQt5Qml.so.5.4.1 (_ZNK11QQmlImports15resolvedScriptsEv+0x936) [0x75704ca3]
      /usr/lib/libQt5Qml.so.5.4.1 (_ZNK11QQmlImports11resolveTypeEP19QQmlImportNamespaceRK16QHashedStringRefPP8QQmlTypePiS8_+0x10c) [0x75704fc5]
      /usr/lib/libQt5Qml.so.5.4.1 (_ZNK11QQmlImports11resolveTypeERK16QHashedStringRefPP8QQmlTypePiS6_PP19QQmlImportNamespaceP5QListI9QQmlErrorE+0x48) [0x7570516d]
      /usr/lib/libQt5Qml.so.5.4.1 (_ZN14QQmlTypeLoader4Blob18dependencyCompleteEP12QQmlDataBlob+0x85c) [0x756e7659]
      /usr/lib/libQt5Qml.so.5.4.1 (_ZN14QQmlTypeLoader4Blob18dependencyCompleteEP12QQmlDataBlob+0xe52) [0x756e7c4f]
      /usr/lib/libQt5Qml.so.5.4.1 (_ZN12QQmlDataBlob8setErrorERK5QListI9QQmlErrorE+0x862) [0x756e37fb]
      /usr/lib/libQt5Qml.so.5.4.1 (_ZN12QQmlDataBlob8setErrorERK5QListI9QQmlErrorE+0x902) [0x756e389b]
      /usr/lib/libQt5Qml.so.5.4.1 (_ZN14QQmlTypeLoader4Blob9addPragmaERKN5QmlIR6PragmaEP5QListI9QQmlErrorE+0x9d8) [0x756e4a61]
      /usr/lib/libQt5Qml.so.5.4.1 (_ZN14QQmlTypeLoader4Blob9addPragmaERKN5QmlIR6PragmaEP5QListI9QQmlErrorE+0xd46) [0x756e4dcf]
      /usr/lib/libQt5Qml.so.5.4.1 (_ZN14QQmlTypeLoader4Blob9addPragmaERKN5QmlIR6PragmaEP5QListI9QQmlErrorE+0xe20) [0x756e4ea9]
      /usr/lib/libQt5Qml.so.5.4.1 (_ZN14QQmlTypeLoader4Blob18dependencyCompleteEP12QQmlDataBlob+0x898) [0x756e7695]
      /usr/lib/libQt5Qml.so.5.4.1 (_ZN14QQmlTypeLoader4Blob18dependencyCompleteEP12QQmlDataBlob+0xe52) [0x756e7c4f]
      /usr/lib/libQt5Qml.so.5.4.1 (_ZN12QQmlDataBlob8setErrorERK5QListI9QQmlErrorE+0x862) [0x756e37fb]
      /usr/lib/libQt5Qml.so.5.4.1 (_ZN12QQmlDataBlob8setErrorERK5QListI9QQmlErrorE+0x902) [0x756e389b]
      /usr/lib/libQt5Qml.so.5.4.1 (_ZN14QQmlTypeLoader4Blob9addPragmaERKN5QmlIR6PragmaEP5QListI9QQmlErrorE+0x9d8) [0x756e4a61]
      /usr/lib/libQt5Qml.so.5.4.1 (_ZN14QQmlTypeLoader4Blob9addPragmaERKN5QmlIR6PragmaEP5QListI9QQmlErrorE+0xd46) [0x756e4dcf]
      /usr/lib/libQt5Qml.so.5.4.1 (_ZN14QQmlTypeLoader4Blob9addPragmaERKN5QmlIR6PragmaEP5QListI9QQmlErrorE+0xe20) [0x756e4ea9]
      /usr/lib/libQt5Qml.so.5.4.1 (_ZN14QQmlTypeLoader4Blob18dependencyCompleteEP12QQmlDataBlob+0x898) [0x756e7695]
      /usr/lib/libQt5Qml.so.5.4.1 (_ZN14QQmlTypeLoader4Blob18dependencyCompleteEP12QQmlDataBlob+0xe52) [0x756e7c4f]
      /usr/lib/libQt5Qml.so.5.4.1 (_ZN12QQmlDataBlob8setErrorERK5QListI9QQmlErrorE+0x862) [0x756e37fb]
      /usr/lib/libQt5Qml.so.5.4.1 (_ZN12QQmlDataBlob8setErrorERK5QListI9QQmlErrorE+0x902) [0x756e389b]
      /usr/lib/libQt5Qml.so.5.4.1 (_ZN14QQmlTypeLoader4Blob9addPragmaERKN5QmlIR6PragmaEP5QListI9QQmlErrorE+0x9d8) [0x756e4a61]
      /usr/lib/libQt5Qml.so.5.4.1 (_ZN14QQmlTypeLoader4Blob9addPragmaERKN5QmlIR6PragmaEP5QListI9QQmlErrorE+0xcaa) [0x756e4d33]
      /usr/lib/libQt5Qml.so.5.4.1 (_ZN14QQmlTypeLoader4Blob9addImportEPKN3QV412CompiledData6ImportEP5QListI9QQmlErrorE+0x131a) [0x756e99af]
      /usr/lib/libQt5Qml.so.5.4.1 (_ZN8QQmlPool5clearEv+0x2cc) [0x75720c69]
      /usr/lib/libQt5Qml.so.5.4.1 (_ZN8QQmlPool5clearEv+0x6a0) [0x7572103d]
      /usr/lib/libQt5Core.so.5.4.1 (_ZN23QCoreApplicationPrivate13notify_helperEP7QObjectP6QEvent+0x2a) [0x7538ebbf]
      /usr/lib/libQt5Core.so.5.4.1 (_ZN16QCoreApplication6notifyEP7QObjectP6QEvent+0x30) [0x7538ebf1]
      /usr/lib/libQt5Core.so.5.4.1 (_ZN16QCoreApplication14notifyInternalEP7QObjectP6QEvent+0x40) [0x7538ea15]
      /usr/lib/libQt5Core.so.5.4.1 (_ZN23QCoreApplicationPrivate16sendPostedEventsEP7QObjectiP11QThreadData+0x14a) [0x753904cb]
      /usr/lib/libQt5Core.so.5.4.1 (_ZN27QEventDispatcherGlibPrivate31runTimersOnceWithNormalPriorityEv+0x1c) [0x753c937d]
      /usr/lib/libglib-2.0.so.0.4000.0 (g_main_context_dispatch+0x264) [0x76e68578]
      /usr/lib/libglib-2.0.so.0.4000.0 (g_main_context_dispatch+0x488) [0x76e6879c]
      /usr/lib/libglib-2.0.so.0.4000.0 (g_main_context_iteration+0x2c) [0x76e68848]
      /usr/lib/libQt5Core.so.5.4.1 (_ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE+0x2e) [0x753c8d93]
      /usr/lib/libQt5Core.so.5.4.1 (_ZN10QEventLoop13processEventsE6QFlagsINS_17ProcessEventsFlagEE+0x10) [0x7538d3a5]
      /usr/lib/libQt5Core.so.5.4.1 (_ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE+0xe2) [0x7538d657]
      /usr/lib/libQt5Core.so.5.4.1 (_ZN7QThread4execEv+0x58) [0x7522b51d]
      /usr/lib/libQt5Qml.so.5.4.1 (_ZN8QQmlPool5clearEv+0xa6) [0x75720a43]
      /usr/lib/libQt5Core.so.5.4.1 (_ZN7QThread21setTerminationEnabledEb+0x1ea) [0x7522e86f]
      /lib/libpthread-2.19.so (start_thread+0xb8) [0x74f4be64]
      /lib/libc-2.19.so (clone+0x80) [0x7506b160]
      

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              shausman Simon Hausmann
              Reporter:
              aram.so Aram So
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes