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

Poor bitmap handling causes a java.lang.OutOfMemory error #40

Open
SniffyMcTasty opened this issue May 16, 2022 · 1 comment
Open

Poor bitmap handling causes a java.lang.OutOfMemory error #40

SniffyMcTasty opened this issue May 16, 2022 · 1 comment

Comments

@SniffyMcTasty
Copy link

Emulator: Nexus 6 API 30

This has only been observed on Android emulators, never tested on iOS for lack of access to it.

@SniffyMcTasty
Copy link
Author

SniffyMcTasty commented May 16, 2022

Managed to bypass the problem by adding to following line to the element of the Android App Manifest:

android:largeHeap="true"

However, this not optimal as it shows poor memory management (or maybe MIDI files being too large to load completely in memory at initialization). I also tried the following instead of loading the sf2 asset from rootBundle, but it requires the complete file path, which might be problematic when building on different devices:

ByteData _byte = File(hardToGetFilePath).readAsBytesSync.buffer.asByteData();

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

1 participant