srplab/starcore_for_flutter

ERROR in example

dheerajbred opened this issue · 5 comments

I am runny the same example
python

√ Built build\app\outputs\apk\debug\app-debug.apk.
I/starflutexampl( 4536): Background concurrent copying GC freed 5768(1576KB) AllocSpace objects, 0(0B) LOS objects, 57% free, 1133KB/2MB, paused 415us total 120.439ms
I/skeletonproc_module,32041( 4536): create service group[0], community 32bit version[3.5.0.260] @www.srplab.com
I/skeletonproc_module,32044( 4536): "SetRegisterCode" function can be used to change it to professional version dynamically
I/skeletonproc_module,32089( 4536): lua engine[Lua 5.3.5  Copyright (C) 1994-2018 Lua.org, PUC-Rio]
Syncing files to device SM J600G...                                     
D/ViewRootImpl@9f8914b[MainActivity]( 4536): MSG_WINDOW_FOCUS_CHANGED 1 1
D/InputMethodManager( 4536): prepareNavigationBarInfo() DecorView@15930e[MainActivity]
D/InputMethodManager( 4536): getNavigationBarColor() -855310
E/AccessibilityBridge( 4536): VirtualView node must not be the root node.
I/skeletonproc_module,1592( 4536): create service success[test] 
D/ViewRootImpl@9f8914b[MainActivity]( 4536): MSG_WINDOW_FOCUS_CHANGED 0 1
D/InputMethodManager( 4536): prepareNavigationBarInfo() DecorView@15930e[MainActivity]
D/InputMethodManager( 4536): getNavigationBarColor() -855310    
I/flutter ( 4536): docPath = /data/data/com.srplab.starflutexample/files
I/flutter ( 4536): resPath2 = /data/data/com.srplab.starflutexample/files
D/ViewRootImpl@9f8914b[MainActivity]( 4536): stopped(false) old=false
D/ViewRootImpl@9f8914b[MainActivity]( 4536): Relayout returned: old=[0,0][720,1480] new=[0,0][720,1480] result=0x1 surface={true 3298818048} changed=false
I/flutter ( 4536): -1  1   load library [/data/app/com.srplab.starflutexample-_80F-RLXZMX3Vuzoip2EAQ==/lib/arm/libstar_python36.so] success....   6
I/skeletonproc_module,48689( 4536): load library [/data/app/com.srplab.starflutexample-_80F-RLXZMX3Vuzoip2EAQ==/lib/arm/libstar_python36.so] success....
D/starcore( 4536): Begin call _PyCodecRegistry_Init
D/starcore( 4536): import encodings failed....
D/starcore( 4536): ZipImportError("can't decompress data; zlib not available",)
D/starcore( 4536): /data/data/com.srplab.starflutexample/files:/data/data/com.srplab.starflutexample/files/python3.6.zip:/data/data/com.srplab.starflutexample/files/libs:/data/data/com.googlecode.pythonforandroid/files:/sdcard/com.googlecode.pythonforandroid/extras/python:/data/data/com.googlecode.pythonforandroid/files/python/lib/python2.6/lib-dynload:/data/data/com.googlecode.pythonforandroid/files/python/lib/python2.6:/data/data/com.googlecode.pythonforandroid/files/python/lib/python26.zip
D/starcore( 4536): Py_Initialize: unable to load the file system codec
F/libc    ( 4536): Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 4887 (Thread-6), pid 4536 (starflutexample) 
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'samsung/j6ltedx/j6lte:9/PPR1.180610.011/J600GDXU4BSI2:user/release-keys'
Revision: '2'
ABI: 'arm'
pid: 4536, tid: 4887, name: Thread-6  >>> com.srplab.starflutexample <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
    r0  00000000  r1  00001317  r2  00000006  r3  00000008
    r4  000011b8  r5  00001317  r6  c007d2b4  r7  0000010c
    r8  c007d2dc  r9  c007d2d8  r10 c007d2d4  r11 bf991c91
    ip  00000041  sp  c007d2a0  lr  e5c34115  pc  e5c2afce
backtrace:
    #00 pc 0001cfce  /system/lib/libc.so (abort+58)
    #01 pc 0015c0d0  /data/app/com.srplab.starflutexample-_80F-RLXZMX3Vuzoip2EAQ==/lib/arm/libpython3.6m.so (Py_FatalError+40)
Lost connection to device.
Could not update files on device: HttpException: Connection closed before full header was received, uri = http://127.0.0.1:61772/DXSyxhcSW9Y=/
Syncing files to device SM J600G...
PS E:\Flutter Apps\Anime Prime\Downloads exper\starcore_for_flutter-master\example>

Do the files unicodedata.cpython-36m.so and zlib.cpython-36m.so exist under the android / app / src / main / assets / directory?

Yes, I didn't remove or add any file. Just selected python code to execute. Rest all are the same, as it is.

image

When the app starts, the function in main.dart copies zlib.cpython-36m.so to the "/files" directory of the device's APP, as follows:
await Starflut.copyFileFromAssets ("zlib.cpython-36m.so", null, null);

This function is in the "starflut / android / src / main / java / com / srplab / starflut /StarflutPlugin.java" file.

You can use android studio to open the project and track whether it is successful

Same issue, no idea what's possibly wrong!

If you are using android emulator to test the app, then it won't work because the libraries are for arm processors and intel is x86 architecture, so test it on a real device.