Bug 306210

Summary: UnsatisfiedLinkError when running application
Product: [Applications] Necessitas Reporter: BogDan Vatra <bogdan>
Component: Android Qt4Assignee: BogDan Vatra <bogdan>
Status: RESOLVED FIXED    
Severity: critical CC: anjin_lu, china.david.liu, jon
Priority: HI    
Version: alpha4   
Target Milestone: Alpha 4   
Platform: Android   
OS: Android 4.x   
Latest Commit: Version Fixed In:

Description BogDan Vatra 2012-09-03 18:01:54 UTC
Using the alpha 4 release of the Necessitas suite, following error occurs when running the attached sample application on an Android device:
I/Qt (30549): qt start
D/dalvikvm(30549): Trying to load lib /data/data/org.kde.necessitas.example.link_problem/lib/liblink-problem.so 0x40d75910
D/AndroidRuntime(30549): Shutting down VM
W/dalvikvm(30549): threadid=1: thread exiting with uncaught exception (group=0x40a4f1f8)
E/AndroidRuntime(30549): FATAL EXCEPTION: main
E/AndroidRuntime(30549): java.lang.UnsatisfiedLinkError: Cannot load library: reloc_library1314: 1872 cannot locate '__gnu_thumb1_case_uqi'...
The attached archive includes a README on how to reproduce the error and a description under which circumstances the error does not appear.

Reproducible: Always

Steps to Reproduce:
testclass.h:
class TestClass
{
public:
    explicit TestClass(int iTest);
    virtual ~TestClass();

private:
    int m_member;
};
testclass.cpp:
#include "testclass.h"

TestClass::TestClass(int iTest)
{
    switch (iTest) {
    case 0: m_member = 0; break;
    case 1: m_member = 1; break;
    case 2: m_member = 2; break;
    case 3: m_member = 3; break;
    default: ;
    }
}

TestClass::~TestClass()
{
}
Comment 1 BogDan Vatra 2012-09-04 19:33:52 UTC
Git commit ebab12678bd0dde27c8ebd2d32a60b5c31e3bc41 by BogDan Vatra.
Committed on 04/09/2012 at 21:10.
Pushed by vatra into branch 'alpha4'.

Fix atomics for armv5 thumb architectue, move libgcc first.

M  +2    -2    mkspecs/android-g++/qmake.conf
M  +4    -20   src/corelib/arch/arm/qatomic_android.cpp
M  +0    -23   src/corelib/arch/qatomic_android.h

http://commits.kde.org/android-qt/ebab12678bd0dde27c8ebd2d32a60b5c31e3bc41
Comment 2 anjin_lu 2012-09-04 22:06:20 UTC
Hi BogDan Vatra,
I encounterred this issuem, when will your patch be made in the next build? Will the patch be fixed in the Ministro in the "testing" repository or will it be fixed in the SDK?

Thanks.
Comment 3 BogDan Vatra 2012-09-05 05:14:52 UTC
We are planning to release an update for alpha4 sdk in a few days.
Comment 4 BogDan Vatra 2012-09-05 05:14:52 UTC
We are planning to release an update for alpha4 sdk in a few days.
Comment 5 BogDan Vatra 2012-09-05 05:14:52 UTC
We are planning to release an update for alpha4 sdk in a few days.
Comment 6 BogDan Vatra 2012-09-11 07:03:01 UTC
*** Bug 306579 has been marked as a duplicate of this bug. ***
Comment 7 david 2013-03-13 02:28:04 UTC
The attached archive includes a README on how to reproduce the error and a description under which circumstances the error does not appear.

David>> Would you please let me know under which circumstances the error does not appear?
Becasue I also meet such issue, and I don't know how to fix it. thanks a lot!

(In reply to comment #0)
> Using the alpha 4 release of the Necessitas suite, following error occurs
> when running the attached sample application on an Android device:
> I/Qt (30549): qt start
> D/dalvikvm(30549): Trying to load lib
> /data/data/org.kde.necessitas.example.link_problem/lib/liblink-problem.so
> 0x40d75910
> D/AndroidRuntime(30549): Shutting down VM
> W/dalvikvm(30549): threadid=1: thread exiting with uncaught exception
> (group=0x40a4f1f8)
> E/AndroidRuntime(30549): FATAL EXCEPTION: main
> E/AndroidRuntime(30549): java.lang.UnsatisfiedLinkError: Cannot load
> library: reloc_library1314: 1872 cannot locate '__gnu_thumb1_case_uqi'...
> The attached archive includes a README on how to reproduce the error and a
> description under which circumstances the error does not appear.
> 
> Reproducible: Always
> 
> Steps to Reproduce:
> testclass.h:
> class TestClass
> {
> public:
>     explicit TestClass(int iTest);
>     virtual ~TestClass();
> 
> private:
>     int m_member;
> };
> testclass.cpp:
> #include "testclass.h"
> 
> TestClass::TestClass(int iTest)
> {
>     switch (iTest) {
>     case 0: m_member = 0; break;
>     case 1: m_member = 1; break;
>     case 2: m_member = 2; break;
>     case 3: m_member = 3; break;
>     default: ;
>     }
> }
> 
> TestClass::~TestClass()
> {
> }