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: dlopen failed: libqtforandroid.so crash on certain device.
Forum Updated to NodeBB v4.3 + New Features

Android: dlopen failed: libqtforandroid.so crash on certain device.

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
5 Posts 2 Posters 1.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.
  • L Offline
    L Offline
    lockheed
    wrote on last edited by
    #1

    I have and Android app, which is crashing during startup only on one certain device: Huawei Tablet AGS2-W09. How can I further examinate, what's causing the error, if I haven't got physical access to device?

    Qt version: 5.12.3 .

    Logcat:

    07-01 10:53:09.327  6135  6156 E AndroidRuntime: java.lang.UnsatisfiedLinkError: dlopen failed: file offset for the library "/data/data/pl.domain.appname/qt-reserved-files/plugins/platforms/android/libqtforandroid.so" >= file size: 0 >= 0
    07-01 10:53:09.327  6135  6156 E AndroidRuntime:    at java.lang.Runtime.load0(Runtime.java:928)
    07-01 10:53:09.327  6135  6156 E AndroidRuntime:    at java.lang.System.load(System.java:1624)
    07-01 10:53:09.327  6135  6156 E AndroidRuntime:    at org.qtproject.qt5.android.QtNative$2.run(QtNative.java:183)
    07-01 10:53:09.327  6135  6156 E AndroidRuntime:    at org.qtproject.qt5.android.QtThread$2.run(QtThread.java:87)
    07-01 10:53:09.327  6135  6156 E AndroidRuntime:    at org.qtproject.qt5.android.QtThread$1.run(QtThread.java:61)
    07-01 10:53:09.327  6135  6156 E AndroidRuntime:    at java.lang.Thread.run(Thread.java:784)
    07-01 10:53:09.330  1184  1922 W ActivityManager:   Force finishing activity pl.domain.appname/.AppActivity
    
    jsulmJ 1 Reply Last reply
    0
    • L lockheed

      I have and Android app, which is crashing during startup only on one certain device: Huawei Tablet AGS2-W09. How can I further examinate, what's causing the error, if I haven't got physical access to device?

      Qt version: 5.12.3 .

      Logcat:

      07-01 10:53:09.327  6135  6156 E AndroidRuntime: java.lang.UnsatisfiedLinkError: dlopen failed: file offset for the library "/data/data/pl.domain.appname/qt-reserved-files/plugins/platforms/android/libqtforandroid.so" >= file size: 0 >= 0
      07-01 10:53:09.327  6135  6156 E AndroidRuntime:    at java.lang.Runtime.load0(Runtime.java:928)
      07-01 10:53:09.327  6135  6156 E AndroidRuntime:    at java.lang.System.load(System.java:1624)
      07-01 10:53:09.327  6135  6156 E AndroidRuntime:    at org.qtproject.qt5.android.QtNative$2.run(QtNative.java:183)
      07-01 10:53:09.327  6135  6156 E AndroidRuntime:    at org.qtproject.qt5.android.QtThread$2.run(QtThread.java:87)
      07-01 10:53:09.327  6135  6156 E AndroidRuntime:    at org.qtproject.qt5.android.QtThread$1.run(QtThread.java:61)
      07-01 10:53:09.327  6135  6156 E AndroidRuntime:    at java.lang.Thread.run(Thread.java:784)
      07-01 10:53:09.330  1184  1922 W ActivityManager:   Force finishing activity pl.domain.appname/.AppActivity
      
      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @lockheed said in Android: dlopen failed: libqtforandroid.so crash on certain device.:

      /data/data/pl.domain.appname/qt-reserved-files/plugins/platforms/android/libqtforandroid.so

      The error says that the lib is either not there or empty. This is what you need to check.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      3
      • L Offline
        L Offline
        lockheed
        wrote on last edited by
        #3

        @jsulm Corrupted library is pretty obvious. Does it really matter, if it's missing or empty?

        I am more interested in why same build works on some devices, but not on others? Could the library in package be compatible only with one SoC architecture (like v7a), and fails on other (v8)? Is it problem with my code, my build and Gradle files, or something inside Qt?

        jsulmJ 1 Reply Last reply
        0
        • L lockheed

          @jsulm Corrupted library is pretty obvious. Does it really matter, if it's missing or empty?

          I am more interested in why same build works on some devices, but not on others? Could the library in package be compatible only with one SoC architecture (like v7a), and fails on other (v8)? Is it problem with my code, my build and Gradle files, or something inside Qt?

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @lockheed said in Android: dlopen failed: libqtforandroid.so crash on certain device.:

          Does it really matter, if it's missing or empty?

          Looks like it does, as it is being loaded at runtime using dlopen.
          Different (incompatible) architecture can be a problem as well.

          "Is it problem with my code, my build and Gradle files, or something inside Qt?" - no, it rather looks like corrupted/missing lib or maybe a lib for incompatible architecture.

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • L Offline
            L Offline
            lockheed
            wrote on last edited by
            #5

            @jsulm

            There is kirin 659 inside this tablet, which supports v7a. Moreover, I just realized, application was working fine on this device earlier. So, problem lies somewhere in my own code. I just have no idea, how to track it down. Tomorrow, I will try reproduce it inside Samsung Remote test lab, or AWS device farm. Then update/reinstall Qt, and move commit by commit from project beginning, to find out corrupted code.

            Btw, is it possible, to make in Qt application supporting multiple ABI inside one apk?

            1 Reply Last reply
            0

            • Login

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