Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Large files crash on Android 13 not on 12. #47

Open
AbidR-S2 opened this issue Jul 7, 2023 · 2 comments
Open

Large files crash on Android 13 not on 12. #47

AbidR-S2 opened this issue Jul 7, 2023 · 2 comments

Comments

@AbidR-S2
Copy link

AbidR-S2 commented Jul 7, 2023

Selecting any type of large file (have tried mp4 and apk files) causes a crash right after selection.
This doesn't happen on Android 12 and lower.

Crash log is:
FATAL EXCEPTION: main Process: com.s2.riskwise.hybrid, PID: 8320 java.lang.OutOfMemoryError: Failed to allocate a 301989896 byte allocation with 25149440 free bytes and 266MB until OOM, target footprint 282076024, growth limit 536870912 at java.util.Arrays.copyOf(Arrays.java:3766) at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:125) at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:650) at java.lang.StringBuilder.append(StringBuilder.java:203) at org.json.JSONStringer.string(JSONStringer.java:354) at org.json.JSONStringer.value(JSONStringer.java:261) at org.json.JSONObject.writeTo(JSONObject.java:734) at org.json.JSONObject.toString(JSONObject.java:702) at com.cyph.cordova.Chooser.onActivityResult(Chooser.java:138) at org.apache.cordova.CordovaInterfaceImpl.onActivityResult(CordovaInterfaceImpl.java:160) at com.getcapacitor.Bridge.onActivityResult(Bridge.java:1025) at com.getcapacitor.BridgeActivity.onActivityResult(BridgeActivity.java:215) at android.app.Activity.dispatchActivityResult(Activity.java:8951) at android.app.ActivityThread.deliverResults(ActivityThread.java:5987) at android.app.ActivityThread.handleSendResult(ActivityThread.java:6033) at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:67) at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2574) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loopOnce(Looper.java:226) at android.os.Looper.loop(Looper.java:313) at android.app.ActivityThread.main(ActivityThread.java:8757) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)

My Android manifest does have the android:largeHeap="true" addition.

@vishwanath1004
Copy link

Any updates on this.

@AbidR-S2
Copy link
Author

AbidR-S2 commented Oct 9, 2023

I decided to use the awesome-cordova-plugins/chooser instead (v6.3.0) and that has been working fine for me with large file types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants