Bug? SHA512 [native lib]

T201016

Active Member
Licensed User
Longtime User
Lib SHA512 - Ninja Dynamics 1.01 does not want to work with the SQLCipher 1.50 library, why?
B4X:
Sub Class_Globals
Dim sh As SHA512
...

Sub test()
     Dim sql1 as SQLCipher
     sql1.Initialize(...)   'error!
End sub
 

T201016

Active Member
Licensed User
Longtime User
Which error do you get?

The application is stopped (without the specific error indication given). Besides, I just need to include the SHA512 library into the project. I do not even have to use it. When I unplug this biblitekę, everything returns to action. I was surprised myself. This is the first time I have ever experienced such a thing. I tested it on Android 6.0.
 

T201016

Active Member
Licensed User
Longtime User
When an application stops there must be an error message in the logs.

In this example, you can even see that I do not use the library SHA512 v1.01 but only it is included in the list. When I remove the SHa512 library from the list. The compilation and execution of the test is correct.


B4X:
Sub Process_Globals
    'These global variables will be declared once when the application starts.
    'These variables can be accessed from all modules.

End Sub

Sub Globals
    'These global variables will be redeclared each time the activity is created.
    'These variables can only be accessed from this module.

End Sub

Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
    Try
        Private SQLcipher As SQLCipher

        #Region *** Reads the SQL2 data base ***
        '     Reads the SQL2 data base
        SQLcipher.Initialize(File.DirDefaultExternal, "db_testing.db", True, "1234567890", File.DirAssets)
#End Region

        If SQLcipher.IsInitialized Then
            ToastMessageShow("IsInitialized",True)
            SQLcipher.Close
        End If
    Catch
        Log(LastException.Message)
        If SQLcipher.IsInitialized Then SQLcipher.Close
    End Try
End Sub

Sub Activity_Resume

End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub


LogCat connected to:
--------- beginning of /dev/log/main--------- beginning of /dev/log/system~i:** Service (starter) Create **
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
main_activity_create (java line: 325)
java.lang.UnsatisfiedLinkError: Couldn't load sqlcipher from loader dalvik.system.PathClassLoader[dexPath=/data/app/b4a.example-1.apk,libraryPath=/data/app-lib/b4a.example-1]: findLibrary returned null
at java.lang.Runtime.loadLibrary(Runtime.java:355)
at java.lang.System.loadLibrary(System.java:525)
at net.sqlcipher.database.SQLiteDatabase$1.loadLibraries(SQLiteDatabase.java:213)
at net.sqlcipher.database.SQLiteDatabase.loadLibs(SQLiteDatabase.java:230)
at net.sqlcipher.database.SQLiteDatabase.loadLibs(SQLiteDatabase.java:209)
at net.sqlcipher.database.SQLiteDatabase.loadLibs(SQLiteDatabase.java:202)
at anyhwheresoftware.b4a.objects.sqlcipher.SQLCipher.Initialize(SQLCipher.java:51)
at b4a.example.main._activity_create(main.java:325)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:187)
at b4a.example.main.afterFirstLayout(main.java:102)
at b4a.example.main.access$000(main.java:17)
at b4a.example.main$WaitForLayout.run(main.java:80)
at android.os.Handler.handleCallback(Handler.java:730)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:176)
at android.app.ActivityThread.main(ActivityThread.java:5419)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1046)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:862)
at dalvik.system.NativeStart.main(Native Method)
 

Attachments

  • 2018-04-08_Libraries Manager.png
    2 KB · Views: 254
Last edited:

T201016

Active Member
Licensed User
Longtime User
Great, I'll check at the earliest opportunity. Thanks Erel.
 
Last edited:
Cookies are required to use this site. You must accept them to continue using the site. Learn more…