Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Flutter App crashed in release version only #266

Open
@baleksey

Description

@baleksey

Debug version works fine. But the same release version crashed on module = LiteModuleLoader.load(absPath); in MainActivity.java with errors:

E/AndroidRuntime(15751): FATAL EXCEPTION: main
E/AndroidRuntime(15751): Process: com.example.pyml, PID: 15751
E/AndroidRuntime(15751): java.lang.ExceptionInInitializerError
E/AndroidRuntime(15751):        at org.pytorch.c.a(Unknown Source:2)
E/AndroidRuntime(15751):        at com.example.pyml.MainActivity.P(Unknown Source:234)
E/AndroidRuntime(15751):        at com.example.pyml.MainActivity.O(Unknown Source:0)
E/AndroidRuntime(15751):        at i.a.a(Unknown Source:2)
E/AndroidRuntime(15751):        at x.j$a.a(Unknown Source:17)
E/AndroidRuntime(15751):        at l.c.k(Unknown Source:18)
E/AndroidRuntime(15751):        at l.c.l(Unknown Source:20)
E/AndroidRuntime(15751):        at l.c.h(Unknown Source:0)
E/AndroidRuntime(15751):        at l.b.run(Unknown Source:12)
E/AndroidRuntime(15751):        at android.os.Handler.handleCallback(Handler.java:938)
E/AndroidRuntime(15751):        at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(15751):        at android.os.Looper.loopOnce(Looper.java:226)
E/AndroidRuntime(15751):        at android.os.Looper.loop(Looper.java:313)
E/AndroidRuntime(15751):        at android.app.ActivityThread.main(ActivityThread.java:8669)
E/AndroidRuntime(15751):        at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(15751):        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
E/AndroidRuntime(15751):        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)
E/AndroidRuntime(15751): Caused by: java.lang.ClassNotFoundException: org.pytorch.PyTorchAndroid
E/AndroidRuntime(15751):        at java.lang.Runtime.nativeLoad(Native Method)
E/AndroidRuntime(15751):        at java.lang.Runtime.nativeLoad(Runtime.java:1121)
E/AndroidRuntime(15751):        at java.lang.Runtime.loadLibrary0(Runtime.java:1075)
E/AndroidRuntime(15751):        at java.lang.Runtime.loadLibrary0(Runtime.java:998)
E/AndroidRuntime(15751):        at java.lang.System.loadLibrary(System.java:1661)
E/AndroidRuntime(15751):        at j.c.a(Unknown Source:0)
E/AndroidRuntime(15751):        at j.a.c(Unknown Source:8)
E/AndroidRuntime(15751):        at org.pytorch.LiteNativePeer.<clinit>(Unknown Source:16)
E/AndroidRuntime(15751):        ... 17 more

Tried many org.pytorch:pytorch_android_lite versions - result always the same. Attaching the full and minimal Flutter project to reproduce the issue (24 Mb, model included). First try on debug - you'll receive "ML: SUCCESS" message on button press. Then on Release - app will instantly closes on loading the model.

mlfx_gt.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions