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

Crash on startup on 32-bit iOS device with Qt Quick Compiler

    XMLWordPrintable

Details

    • iOS/tvOS/watchOS

    Description

      My Qt app crashes during startup in QQmlTypeLoader::Blob::addImport method on some iOS devices (see attachment for full crashlog).
      In order for this crash to happen my app neds to be compiled:

      • in release mode;
      • with use of Qt Quick Compiler;
      • with use of Qt 5.8.

      If any of above condition is not fulfilled crash does not happen. Of course it's problematic as above conditions are exact production ones.

      I have tested it on many devices:

      Crashes on:

      • iPad Mini (iOS 9.3.5)
      • iPhone 5 (iOS 9.1)
      • iPhone 4S (iOS 9.3.5)
      • iPad 3 (iOS 9.3.5)
      • iPad 2 (iOS 9.3.5)

      Not crashes on:

      • iPhone 6 (iOS 10.2)
      • iPhone 5S (iOS 10.0.1)
      • iPad Air 2 (iOS 10.2)

      Above list makes me think it is connected either with iOS version (9 / 10) or with 32/64-bit support, as all affected devices support armv7 (32-bit) only and non-affected support arm64 (64-bit) architecture also. After this idea came to my mind I explicitely disabled arm64 architecture in Xcode for my project and indeed it started to crash on every device so this have to be it.

      As it happens only in release compilation I cannot give you line numbers for Qt source.

      I cannot reproduce this issue on empty project (with all above conditions met), so there must be further conditions to be met, but in my case it's 100% reproducible.

      I tried to make minimal-(not)-working-example, but after few hours I gave up - in order to be fully sure about a cause I need to rebuild my project each time which is lasting about 15mins per build (see i.e. QTBUG-58018, QTBUG-58008).

      Please look at it as it definitely prevents me from switching to Qt 5.8.

      EDIT:
      I've found minimal test case, attached it zipped + screenshots of exact crash message in Xcode and 512B of memory around given address.

      Attachments

        1. crash_asm.png
          246 kB
          Maciej Węglarczyk
        2. crash_memory.png
          119 kB
          Maciej Węglarczyk
        3. iOSCrashTest.zip
          3 kB
          Maciej Węglarczyk
        4. QQmlTypeLoader_Blob_addImport_CRASH.txt
          16 kB
          Maciej Węglarczyk

        Issue Links

          Activity

            People

              shausman Simon Hausmann
              maciej_gamedesire Maciej Węglarczyk
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: