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

Can not load large external resource files on Android

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4: Low
    • None
    • 5.5.0
    • Core: Resource System
    • None
    • Android 5.0+
    • Android

    Description

      When developing for Android the size limit of the executable is 50MB (soon 100MB). One can add one or two additional files (expansion files) of up to 4GB. These files will be downloaded with the app from the Google Play Store.

      If one has many files, it must be packaged somehow and either used directly by the app or first unpacked and then used. The downside of unpacking is the additional complexity, the user gets easy access to the unpacked files and the needed space on the device. It is also not recommended to remove the expansion file after an eventual unpacking, which results in the app using at least twice the size of the expansion files. This can be critical if a expansion file is large.

      A different solution is to read and use the data of the packaged expansion file directly. This does work using an external Qt resource file compiled with the RCC tool bundled with Qt, but when the expansion/external resource file get too large an exception is thrown by the Android OS (see the attachement). It seems like the Android OS is preventing the Android app allocating more memory and this results in a crash when the external resource file is loaded with the QResource::registerResource() function.

      This might not be classified as a "bug", but how can one else solve this problem using Qt/QML/C++?

      Attachments

        Issue Links

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

          Activity

            People

              rampe Rami Potinkara
              phataas Patrick Hisni Brataas
              Votes:
              2 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes