a914-gowtham / android-video-trimmer

Helps to trim local videos with compress option on Android applications using Exoplayer 2 and FFmpeg.
Other
380 stars 117 forks source link

Fatal Exception: java.lang.IllegalArgumentException #35

Closed lijusparkt closed 3 years ago

lijusparkt commented 3 years ago

Hello,

This sdk is working fne. in debug mode and release mode. But when we add proguard rules and set minifyEnabled = true App is crashing when we start trim process (trimmer view - click -> tick mark) This crash is happening for all devices.

i already added the proguard rules { -dontwarn com.gowtham.library -keep class com.gowtham.library { *; } -keep interface com.gowtham.library* { ; } }

Crash catch in crash analytics

com.gowtham.library.ui.ActVideoTrimmer.getCompressionCommand android.media.MediaMetadataRetriever.setDataSource (MediaMetadataRetriever.java:77) com.gowtham.library.ui.ActVideoTrimmer.getCompressionCommand (ActVideoTrimmer.java:502) com.gowtham.library.ui.ActVideoTrimmer.validateVideo (ActVideoTrimmer.java:485) com.gowtham.library.ui.ActVideoTrimmer.onOptionsItemSelected (ActVideoTrimmer.java:456) android.app.Activity.onMenuItemSelected (Activity.java:4137) androidx.fragment.app.FragmentActivity.onMenuItemSelected (FragmentActivity.java:383) androidx.appcompat.app.AppCompatActivity.onMenuItemSelected (AppCompatActivity.java:219) androidx.appcompat.view.WindowCallbackWrapper.onMenuItemSelected (WindowCallbackWrapper.java:109) androidx.appcompat.view.WindowCallbackWrapper.onMenuItemSelected (WindowCallbackWrapper.java:109) androidx.appcompat.app.ToolbarActionBar$2.onMenuItemClick (ToolbarActionBar.java:64) androidx.appcompat.widget.Toolbar$1.onMenuItemClick (Toolbar.java:207) androidx.appcompat.widget.ActionMenuView$MenuBuilderCallback.onMenuItemSelected (ActionMenuView.java:781) androidx.appcompat.view.menu.MenuBuilder.dispatchMenuItemSelected (MenuBuilder.java:840) androidx.appcompat.view.menu.MenuItemImpl.invoke (MenuItemImpl.java:158) androidx.appcompat.view.menu.MenuBuilder.performItemAction (MenuBuilder.java:991) androidx.appcompat.view.menu.MenuBuilder.performItemAction (MenuBuilder.java:981) androidx.appcompat.widget.ActionMenuView.invokeItem (ActionMenuView.java:625) androidx.appcompat.view.menu.ActionMenuItemView.onClick (ActionMenuItemView.java:151) android.view.View.performClick (View.java:7140) android.view.View.performClickInternal (View.java:7117) android.view.View.access$3500 (View.java:801) android.view.View$PerformClick.run (View.java:27355) android.os.Handler.handleCallback (Handler.java:883) android.os.Handler.dispatchMessage (Handler.java:100) android.os.Looper.loop (Looper.java:214) android.app.ActivityThread.main (ActivityThread.java:7397) java.lang.reflect.Method.invoke (Method.java) com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:492) com.android.internal.os.ZygoteInit.main (ZygoteInit.java:935)

a914-gowtham commented 3 years ago

Add these snippets build.gradle(app level) inside the android tag. Refer

sourceSets.main {
        assets.srcDirs = ['assets']
        jni.srcDirs = [] //disable automatic ndk-build
        jniLibs.srcDirs = ['libs']
    }

    sourceSets {
        main {
            assets.srcDirs = ['src/main/assets', 'src/main/assets/']
            res.srcDirs = ['src/main/res', 'src/main/res/drawable']
        }
    }
a914-gowtham commented 3 years ago

And can you share the library dependency version and the videotrim options you used

lijusparkt commented 3 years ago

Hi, I have added the below snippets //USE THIS sourceSets.main { assets.srcDirs = ['assets'] jni.srcDirs = [] //disable automatic ndk-build jniLibs.srcDirs = ['libs'] }

//USE THIS TOO sourceSets { main { assets.srcDirs = ['src/main/assets', 'src/main/assets/'] res.srcDirs = ['src/main/res', 'src/main/res/drawable'] } }

But the the issue is still there. with proguard.

Library Version: implementation 'com.github.a914-gowtham:Android-video-trimmer:1.5.2' Compress option TrimVideo.activity(String.valueOf(contentURI)) .setHideSeekBar(true) .setDestination(wallpaperDirectory.toString()) //default output path /storage/emulated/0/DOWNLOADS .setFileName("video_001") .setCompressOption(new CompressOption(30, "1M", 460, 320)) .start(this);

Result if (requestCode == TrimVideo.VIDEO_TRIMMER_REQ_CODE && data != null) { contentURI = Uri.parse(TrimVideo.getTrimmedVideoPath(data)); cv_video.setVisibility(View.VISIBLE); }

            **Error Log**

E/mobile-ffmpeg: OnLoad thread failed to GetStaticMethodID for log. 2021-03-03 13:59:36.816 19967-20230/<>: java_vm_ext.cc:570] JNI DETECTED ERROR IN APPLICATION: JNI NewGlobalRef called with pending exception java.lang.NoSuchMethodError: no static method "Lcom/arthenica/mobileffmpeg/Config;.log(JI[B)V" 2021-03-03 13:59:36.816 19967-20230/<>: java_vm_ext.cc:570] at java.lang.String java.lang.Runtime.nativeLoad(java.lang.String, java.lang.ClassLoader, java.lang.Class) (Runtime.java:-2) 2021-03-03 13:59:36.816 19967-20230/<>: java_vm_ext.cc:570] at java.lang.String java.lang.Runtime.nativeLoad(java.lang.String, java.lang.ClassLoader) (Runtime.java:1115) 2021-03-03 13:59:36.816 19967-20230/<>: java_vm_ext.cc:570] at void java.lang.Runtime.loadLibrary0(java.lang.ClassLoader, java.lang.Class, java.lang.String) (Runtime.java:1069) 2021-03-03 13:59:36.816 19967-20230/<>: java_vm_ext.cc:570] at void java.lang.Runtime.loadLibrary0(java.lang.Class, java.lang.String) (Runtime.java:1007) 2021-03-03 13:59:36.816 19967-20230/<>: java_vm_ext.cc:570] at void java.lang.System.loadLibrary(java.lang.String) (System.java:1667) 2021-03-03 13:59:36.816 19967-20230/<>: java_vm_ext.cc:570] at void com.arthenica.mobileffmpeg.Config.() (SourceFile:133) 2021-03-03 13:59:36.816 19967-20230/<>: java_vm_ext.cc:570] at int com.arthenica.mobileffmpeg.Config.b(long, java.lang.String[]) (SourceFile:623) 2021-03-03 13:59:36.816 19967-20230/<>: java_vm_ext.cc:570] at java.lang.Integer c.b.a.b.a() (SourceFile:54) 2021-03-03 13:59:36.816 19967-20230/<>: java_vm_ext.cc:570] at java.lang.Object c.b.a.b.doInBackground(java.lang.Object[]) (SourceFile:29) 2021-03-03 13:59:36.816 19967-20230/<>: java_vm_ext.cc:570] at java.lang.Object android.os.AsyncTask$3.call() (AsyncTask.java:378) 2021-03-03 13:59:36.816 19967-20230/<>: java_vm_ext.cc:570] at void java.util.concurrent.FutureTask.run() (FutureTask.java:266) 2021-03-03 13:59:36.816 19967-20230/<>: java_vm_ext.cc:570] at void java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) (ThreadPoolExecutor.java:1167) 2021-03-03 13:59:36.816 19967-20230/<>: java_vm_ext.cc:570] at void java.util.concurrent.ThreadPoolExecutor$Worker.run() (ThreadPoolExecutor.java:641) 2021-03-03 13:59:36.816 19967-20230/<>: java_vm_ext.cc:570] at void java.lang.Thread.run() (Thread.java:919) 2021-03-03 13:59:36.816 19967-20230/<>: java_vm_ext.cc:570] 2021-03-03 13:59:36.816 19967-20230/<>: java_vm_ext.cc:570] in call to NewGlobalRef 2021-03-03 13:59:36.816 19967-20230/<>: java_vm_ext.cc:570] from java.lang.String java.lang.Runtime.nativeLoad(java.lang.String, java.lang.ClassLoader, java.lang.Class) 2021-03-03 13:59:36.897 19967-20230/<>: thread.cc:2348] No pending exception expected: java.lang.NoSuchMethodError: no static method "Lcom/arthenica/mobileffmpeg/Config;.log(JI[B)V" 2021-03-03 13:59:36.897 19967-20230/<>: thread.cc:2348] at java.lang.String java.lang.Runtime.nativeLoad(java.lang.String, java.lang.ClassLoader, java.lang.Class) (Runtime.java:-2) 2021-03-03 13:59:36.897 19967-20230/<>: thread.cc:2348] at java.lang.String java.lang.Runtime.nativeLoad(java.lang.String, java.lang.ClassLoader) (Runtime.java:1115) 2021-03-03 13:59:36.897 19967-20230/<>: thread.cc:2348] at void java.lang.Runtime.loadLibrary0(java.lang.ClassLoader, java.lang.Class, java.lang.String) (Runtime.java:1069) 2021-03-03 13:59:36.897 19967-20230/<>: thread.cc:2348] at void java.lang.Runtime.loadLibrary0(java.lang.Class, java.lang.String) (Runtime.java:1007) 2021-03-03 13:59:36.897 19967-20230/<>: thread.cc:2348] at void java.lang.System.loadLibrary(java.lang.String) (System.java:1667) 2021-03-03 13:59:36.897 19967-20230/<>: thread.cc:2348] at void com.arthenica.mobileffmpeg.Config.() (SourceFile:133) 2021-03-03 13:59:36.897 19967-20230/<>: thread.cc:2348] at int com.arthenica.mobileffmpeg.Config.b(long, java.lang.String[]) (SourceFile:623) 2021-03-03 13:59:36.897 19967-20230/<>: thread.cc:2348] at java.lang.Integer c.b.a.b.a() (SourceFile:54) 2021-03-03 13:59:36.897 19967-20230/<>: thread.cc:2348] at java.lang.Object c.b.a.b.doInBackground(java.lang.Object[]) (SourceFile:29) 2021-03-03 13:59:36.897 19967-20230/<>: thread.cc:2348] at java.lang.Object android.os.AsyncTask$3.call() (AsyncTask.java:378) 2021-03-03 13:59:36.897 19967-20230/<>: thread.cc:2348] at void java.util.concurrent.FutureTask.run() (FutureTask.java:266) 2021-03-03 13:59:36.897 19967-20230/<>: thread.cc:2348] at void java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) (ThreadPoolExecutor.java:1167) 2021-03-03 13:59:36.897 19967-20230/<>: thread.cc:2348] at void java.util.concurrent.ThreadPoolExecutor$Worker.run() (ThreadPoolExecutor.java:641) 2021-03-03 13:59:36.897 19967-20230/<>: thread.cc:2348] at void java.lang.Thread.run() (Thread.java:919) 2021-03-03 13:59:36.897 19967-20230/<>: thread.cc:2348] 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] Runtime aborting --- recursively, so no thread-specific detail! 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #00 pc 0000000000410910 /apex/com.android.runtime/lib64/libart.so (art::DumpNativeStack(std::1::basic_ostream<char, std::__1::char_traits>&, int, BacktraceMap, char const, art::ArtMethod, void, bool)+140) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #01 pc 00000000004b7ff8 /apex/com.android.runtime/lib64/libart.so (art::Runtime::Abort(char const)+1372) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #02 pc 000000000000b458 /system/lib64/libbase.so (android::base::LogMessage::~LogMessage()+580) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #03 pc 00000000004fd4b4 /apex/com.android.runtime/lib64/libart.so (art::Thread::AssertNoPendingException() const+1136) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #04 pc 0000000000165a4c /apex/com.android.runtime/lib64/libart.so (art::ClassLinker::FindClass(art::Thread, char const*, art::Handle)+64) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #05 pc 0000000000152a48 /apex/com.android.runtime/lib64/libart.so (art::ClassLinker::DoResolveType(art::dex::TypeIndex, art::Handle, art::Handle)+184) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #06 pc 000000000052527c /apex/com.android.runtime/lib64/libart.so (_ZN3art8verifier4impl12_GLOBALN_114MethodVerifierILb0EE6VerifyEv$09bf97eb2c0d684adb6d215f7005036e+1540) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #07 pc 0000000000528df0 /apex/com.android.runtime/lib64/libart.so (art::verifier::MethodVerifier::FindLocksAtDexPc(art::ArtMethod, unsigned int, std::1::vector<art::verifier::MethodVerifier::DexLockInfo, std::1::allocator>, unsigned int)+648) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #08 pc 000000000040e1b0 /apex/com.android.runtime/lib64/libart.so (art::Monitor::VisitLocks(art::StackVisitor, void ()(art::ObjPtr, void), void, bool)+820) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #09 pc 000000000040f148 /apex/com.android.runtime/lib64/libart.so (art::MonitorObjectsStackVisitor::VisitFrame()+164) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #10 pc 00000000004daa8c /apex/com.android.runtime/lib64/libart.so (_ZN3art12StackVisitor9WalkStackILNS0_16CountTransitionsE0EEEvb+1644) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #11 pc 00000000004fc218 /apex/com.android.runtime/lib64/libart.so (art::Thread::DumpJavaStack(std::1::basic_ostream<char, std::__1::char_traits>&, bool, bool) const+452) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #12 pc 00000000004f8088 /apex/com.android.runtime/lib64/libart.so (art::Thread::DumpStack(std::1::basic_ostream<char, std::1::char_traits>&, bool, BacktraceMap, bool) const+536) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #13 pc 00000000005129ac /apex/com.android.runtime/lib64/libart.so (art::DumpCheckpoint::Run(art::Thread)+828) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #14 pc 000000000050bb34 /apex/com.android.runtime/lib64/libart.so (art::ThreadList::RunCheckpoint(art::Closure, art::Closure)+1324) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #15 pc 000000000050acb4 /apex/com.android.runtime/lib64/libart.so (art::ThreadList::Dump(std::__1::basic_ostream<char, std::1::char_traits>&, bool)+1964) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #16 pc 00000000004b8048 /apex/com.android.runtime/lib64/libart.so (art::Runtime::Abort(char const)+1452) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #17 pc 000000000000b458 /system/lib64/libbase.so (android::base::LogMessage::~LogMessage()+580) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #18 pc 0000000000377110 /apex/com.android.runtime/lib64/libart.so (art::JavaVMExt::JniAbort(char const, char const)+1584) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #19 pc 0000000000377334 /apex/com.android.runtime/lib64/libart.so (art::JavaVMExt::JniAbortV(char const, char const, std::__va_list)+108) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #20 pc 000000000036975c /apex/com.android.runtime/lib64/libart.so (art::(anonymous namespace)::ScopedCheck::AbortF(char const, ...)+136) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #21 pc 0000000000368230 /apex/com.android.runtime/lib64/libart.so (art::(anonymous namespace)::ScopedCheck::CheckPossibleHeapValue(art::ScopedObjectAccess&, char, art::(anonymous namespace)::JniValueType)+1144) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #22 pc 0000000000367618 /apex/com.android.runtime/lib64/libart.so (art::(anonymous namespace)::ScopedCheck::Check(art::ScopedObjectAccess&, bool, char const, art::(anonymous namespace)::JniValueType)+652) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #23 pc 0000000000369ba4 /apex/com.android.runtime/lib64/libart.so (art::(anonymous namespace)::CheckJNI::NewRef(char const, _JNIEnv, _jobject, art::IndirectRefKind)+664) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #24 pc 0000000000500f5c /apex/com.android.runtime/lib64/libart.so (art::Thread::SetClassLoaderOverride(_jobject)+64) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #25 pc 000000000037ad0c /apex/com.android.runtime/lib64/libart.so (art::JavaVMExt::LoadNativeLibrary(_JNIEnv, std::1::basic_string<char, std::__1::char_traits, std::1::allocator> const&, _jobject, _jclass, std::1::basic_string<char, std::__1::char_traits, std::1::allocator>)+3344) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #26 pc 00000000000050e0 /apex/com.android.runtime/lib64/libopenjdkjvm.so (JVM_NativeLoad+412) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #27 pc 00000000000b9af4 /system/framework/arm64/boot.oat (art_jni_trampoline+228) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #28 pc 00000000001365b8 /apex/com.android.runtime/lib64/libart.so (art_quick_invoke_static_stub+568) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #29 pc 000000000014500c /apex/com.android.runtime/lib64/libart.so (art::ArtMethod::Invoke(art::Thread, unsigned int, unsigned int, art::JValue, char const)+276) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #30 pc 00000000002e281c /apex/com.android.runtime/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread, art::ArtMethod, art::ShadowFrame, unsigned short, art::JValue)+384) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #31 pc 00000000002dda7c /apex/com.android.runtime/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod, art::Thread, art::ShadowFrame&, art::Instruction const, unsigned short, art::JValue)+892) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #32 pc 00000000005a27b0 /apex/com.android.runtime/lib64/libart.so (MterpInvokeStatic+372) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #33 pc 0000000000130994 /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_static+20) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #34 pc 00000000000e266a /apex/com.android.runtime/javalib/core-oj.jar (java.lang.Runtime.nativeLoad+2) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #35 pc 00000000005a2a4c /apex/com.android.runtime/lib64/libart.so (MterpInvokeStatic+1040) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #36 pc 0000000000130994 /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_static+20) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #37 pc 00000000000e2b6e /apex/com.android.runtime/javalib/core-oj.jar (java.lang.Runtime.loadLibrary0+46) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #38 pc 00000000005a22a8 /apex/com.android.runtime/lib64/libart.so (MterpInvokeDirect+1100) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #39 pc 0000000000130914 /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_direct+20) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #40 pc 00000000000e2b28 /apex/com.android.runtime/javalib/core-oj.jar (java.lang.Runtime.loadLibrary0+8) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #41 pc 000000000059ff9c /apex/com.android.runtime/lib64/libart.so (MterpInvokeVirtual+1352) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #42 pc 0000000000130814 /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_virtual+20) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #43 pc 00000000000e80cc /apex/com.android.runtime/javalib/core-oj.jar (java.lang.System.loadLibrary+16) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #44 pc 00000000005a2a4c /apex/com.android.runtime/lib64/libart.so (MterpInvokeStatic+1040) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #45 pc 0000000000130994 /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_static+20) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #46 pc 00000000001e0614 [anon:dalvik-classes.dex extracted in memory from /data/app/<>-EixoAEDMfdCXpDgkB3fefQ==/base.apk] (com.arthenica.mobileffmpeg.Config.+136) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #47 pc 00000000002b3b30 /apex/com.android.runtime/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEbb.llvm.3147032852921045542+240) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #48 pc 0000000000591244 /apex/com.android.runtime/lib64/libart.so (artQuickToInterpreterBridge+1032) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #49 pc 000000000013f468 /apex/com.android.runtime/lib64/libart.so (art_quick_to_interpreter_bridge+88) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #50 pc 00000000001365b8 /apex/com.android.runtime/lib64/libart.so (art_quick_invoke_static_stub+568) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #51 pc 000000000014500c /apex/com.android.runtime/lib64/libart.so (art::ArtMethod::Invoke(art::Thread, unsigned int, unsigned int, art::JValue, char const)+276) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #52 pc 00000000001713b4 /apex/com.android.runtime/lib64/libart.so (art::ClassLinker::InitializeClass(art::Thread, art::Handle, bool, bool)+2312) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #53 pc 000000000015bed8 /apex/com.android.runtime/lib64/libart.so (art::ClassLinker::EnsureInitialized(art::Thread, art::Handle, bool, bool)+92) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #54 pc 00000000002b99dc /apex/com.android.runtime/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread, art::CodeItemDataAccessor const&, art::ShadowFrame, art::JValue)+384) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #55 pc 00000000002dda5c /apex/com.android.runtime/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod, art::Thread, art::ShadowFrame&, art::Instruction const, unsigned short, art::JValue)+860) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #56 pc 00000000005a27b0 /apex/com.android.runtime/lib64/libart.so (MterpInvokeStatic+372) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #57 pc 0000000000130994 /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_static+20) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #58 pc 00000000001e03f2 [anon:dalvik-classes.dex extracted in memory from /data/app/<>-EixoAEDMfdCXpDgkB3fefQ==/base.apk] (c.b.a.b.a+18) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #59 pc 000000000059ff9c /apex/com.android.runtime/lib64/libart.so (MterpInvokeVirtual+1352) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #60 pc 0000000000130814 /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_virtual+20) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #61 pc 00000000001e0418 [anon:dalvik-classes.dex extracted in memory from /data/app/<>-EixoAEDMfdCXpDgkB3fefQ==/base.apk] (c.b.a.b.doInBackground+4) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #62 pc 000000000059ff9c /apex/com.android.runtime/lib64/libart.so (MterpInvokeVirtual+1352) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #63 pc 0000000000130814 /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_virtual+20) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #64 pc 00000000002e03f4 /system/framework/framework.jar (android.os.AsyncTask$3.call+40) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #65 pc 00000000005a17bc /apex/com.android.runtime/lib64/libart.so (MterpInvokeInterface+1788) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #66 pc 0000000000130a14 /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_interface+20) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #67 pc 00000000001ed13a /apex/com.android.runtime/javalib/core-oj.jar (java.util.concurrent.FutureTask.run+62) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #68 pc 00000000005a17bc /apex/com.android.runtime/lib64/libart.so (MterpInvokeInterface+1788) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #69 pc 0000000000130a14 /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_interface+20) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #70 pc 00000000001f8182 /apex/com.android.runtime/javalib/core-oj.jar (java.util.concurrent.ThreadPoolExecutor.runWorker+158) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #71 pc 000000000059ff9c /apex/com.android.runtime/lib64/libart.so (MterpInvokeVirtual+1352) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #72 pc 0000000000130814 /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_virtual+20) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #73 pc 00000000001f6f30 /apex/com.android.runtime/javalib/core-oj.jar (java.util.concurrent.ThreadPoolExecutor$Worker.run+4) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #74 pc 00000000005a17bc /apex/com.android.runtime/lib64/libart.so (MterpInvokeInterface+1788) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #75 pc 0000000000130a14 /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_interface+20) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #76 pc 00000000000ea988 /apex/com.android.runtime/javalib/core-oj.jar (java.lang.Thread.run+8) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #77 pc 00000000002b3b30 /apex/com.android.runtime/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEbb.llvm.3147032852921045542+240) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #78 pc 0000000000591244 /apex/com.android.runtime/lib64/libart.so (artQuickToInterpreterBridge+1032) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #79 pc 000000000013f468 /apex/com.android.runtime/lib64/libart.so (art_quick_to_interpreter_bridge+88) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #80 pc 0000000000136334 /apex/com.android.runtime/lib64/libart.so (art_quick_invoke_stub+548) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #81 pc 0000000000144fec /apex/com.android.runtime/lib64/libart.so (art::ArtMethod::Invoke(art::Thread, unsigned int, unsigned int, art::JValue, char const)+244) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #82 pc 00000000004afc44 /apex/com.android.runtime/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod, art::(anonymous namespace)::ArgArray, art::JValue, char const)+104) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #83 pc 00000000004b0d58 /apex/com.android.runtime/lib64/libart.so (art::InvokeVirtualOrInterfaceWithJValues(art::ScopedObjectAccessAlreadyRunnable const&, _jobject, _jmethodID, jvalue const)+416) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #84 pc 00000000004f1718 /apex/com.android.runtime/lib64/libart.so (art::Thread::CreateCallback(void)+1176) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #85 pc 00000000000e6890 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void)+36) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] #86 pc 0000000000084b6c /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:630] 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:638] No pending exception expected: java.lang.NoSuchMethodError: no static method "Lcom/arthenica/mobileffmpeg/Config;.log(JI[B)V" 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:638] at java.lang.String java.lang.Runtime.nativeLoad(java.lang.String, java.lang.ClassLoader, java.lang.Class) (Runtime.java:-2) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:638] at java.lang.String java.lang.Runtime.nativeLoad(java.lang.String, java.lang.ClassLoader) (Runtime.java:1115) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:638] at void java.lang.Runtime.loadLibrary0(java.lang.ClassLoader, java.lang.Class, java.lang.String) (Runtime.java:1069) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:638] at void java.lang.Runtime.loadLibrary0(java.lang.Class, java.lang.String) (Runtime.java:1007) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:638] at void java.lang.System.loadLibrary(java.lang.String) (System.java:1667) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:638] at void com.arthenica.mobileffmpeg.Config.() (SourceFile:133) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:638] at int com.arthenica.mobileffmpeg.Config.b(long, java.lang.String[]) (SourceFile:623) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:638] at java.lang.Integer c.b.a.b.a() (SourceFile:54) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:638] at java.lang.Object c.b.a.b.doInBackground(java.lang.Object[]) (SourceFile:29) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:638] at java.lang.Object android.os.AsyncTask$3.call() (AsyncTask.java:378) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:638] at void java.util.concurrent.FutureTask.run() (FutureTask.java:266) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:638] at void java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) (ThreadPoolExecutor.java:1167) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:638] at void java.util.concurrent.ThreadPoolExecutor$Worker.run() (ThreadPoolExecutor.java:641) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:638] at void java.lang.Thread.run() (Thread.java:919) 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:638]

--------- beginning of crash

2021-03-03 13:59:36.958 19967-20230/<> A/libc: Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 20230 (AsyncTask #2), pid 19967 () 2021-03-03 13:59:36.957 19967-20230/<>: runtime.cc:638]

a914-gowtham commented 3 years ago

Issue #605 is the reason of this issue. mobile-ffmpeg mavenCentral version has this issue for the workaround, I tried .aar file of mobile-ffmpeg lib as a workaround it solves the issue. but, I can't host the library on jitpack because it becomes aar(mobile-ffmpeg) inside the aar(videotrimmer library). hence, I have created a demo repo

a914-gowtham commented 3 years ago

Fixed on latest release implementation 'com.github.a914-gowtham:Android-video-trimmer:1.6.1'

lijusparkt commented 3 years ago

Hello Gautham, I think setDestination("path") is not working in this new version {'com.github.a914-gowtham:Android-video-trimmer:1.6.0'}

a914-gowtham commented 3 years ago

Yes, it has been removed. because of the android 11 storage update .now trimmed videos will be stored in /emulated/0/Android/data/com.yourapppackagename

lijusparkt commented 3 years ago

Thanks for the update Gautham, Now its working in debug & release build with proguard (minifyEnabled true). The apk size is increased from 28 MB to 61 MB

a914-gowtham commented 3 years ago

Thanks for the update Gautham, Now its working in debug & release build with proguard (minifyEnabled true). The apk size is increased from 28 MB to 61 MB

use 'com.github.a914-gowtham:Android-video-trimmer:1.6.1' and app bundle, app bundle will ignore unused ABIs . This demo app has been published as app bundle