Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Android app crashes at startup

Android app crashes at startup

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
5 Posts 4 Posters 2.8k Views
  • 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
    jons101
    wrote on last edited by
    #1

    Hi,

    Having trouble deploying app on client's android device, a Sony Xperia X Compact running Android 7. The app runs fine on all other devices I have tested. Unfortunately I do not have access to the device as the client is a few hundred miles away. Has anyone experienced a similar problem?

    The app is a Qt Quick 2 application and does use multimedia ( which I suspected may be a problem ) but I have tried a minimal Qt Quick app and still no luck.

    Any pointers would be welcome

    1 Reply Last reply
    0
    • S Offline
      S Offline
      Schluchti
      wrote on last edited by Schluchti
      #2

      Is your client tech-savvy? If so, you could ask him to start adb logcat before he starts the application. That probably gives you some indication why the app is crashing.

      Does the app crash right at the beginning or after some user action? If the app crashes after the user does some action, you could also add a bunch of debugging messages to the app which get written to a file. That might help you to track the error.

      Another possibility is to add google breakpad which writes a crash dump to a file. However, for this it is necessary that the app at least gets to the point where google breakpad gets initialized. I implemented something similar in my app where every crash dump gets sent to Hockeyapp. So it's definitely doable. with Qt.

      Want to read more about Qt?

      https://gympulsr.com/blog/qt/

      Latest Article: https://gympulsr.com/blog/qt/2017/06/14/ios-background-music-qt.html

      J 1 Reply Last reply
      0
      • S Schluchti

        Is your client tech-savvy? If so, you could ask him to start adb logcat before he starts the application. That probably gives you some indication why the app is crashing.

        Does the app crash right at the beginning or after some user action? If the app crashes after the user does some action, you could also add a bunch of debugging messages to the app which get written to a file. That might help you to track the error.

        Another possibility is to add google breakpad which writes a crash dump to a file. However, for this it is necessary that the app at least gets to the point where google breakpad gets initialized. I implemented something similar in my app where every crash dump gets sent to Hockeyapp. So it's definitely doable. with Qt.

        J Offline
        J Offline
        jons101
        wrote on last edited by
        #3

        @Schluchti said in Android app crashes at startup:

        breakpad

        Thanks for your response Schluchti

        It is crashing before any user action.

        I will try what you suggest

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mvuori
          wrote on last edited by
          #4

          Just my 3 cents...

          1. While the problem shows only on the Sony , it could as well be about something like an uninitialised variable that just happens to work everywhere else, but the Sony... I have noticed that sometimes problems take their time to show themselves.

          So even though you might send a logging-enabled version to the customer, I'd check the code once more for any generic problem -- most critically initialisation, values and usage of every variable.

          1. The Sony seems to have very high pixel density, and one should suspect anything that is different to other devices... Perhaps there are some assumptions in the code that are not valid with the Sony.

          2. You don't mention Qt version. I think it would be natural to think that the later releases should be able to handle any problems with new devices better than the old ones.

          1 Reply Last reply
          0
          • S Offline
            S Offline
            SamGrant
            wrote on last edited by
            #5

            Google removed SSL stuff from Android 7. My apps worked fine on Android 6, but crashed immediately on Android 7.

            I ended up following this (which worked without issue):

            https://forum.qt.io/topic/77150/qt-5-8-qnam-openssl-crash-openssl_threads

            https://forum.qt.io/topic/76978/android-how-to-install-so-file

            --Sam

            1 Reply Last reply
            1

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved