Android Question Out of meory

Status
Not open for further replies.

nicolino33

Active Member
Licensed User
Longtime User
Hello all, this is the problem when I take big video with CameraView in high middle resolution (1080P):

java.lang.OutOfMemoryError: Failed to allocate a 268435468 byte allocation with 4190288 free bytes and 109MB until OOM

any idea for resolve? I'v already insert "SetApplicationAttribute(android:largeHeap, "true")" in the manifest.
 

nicolino33

Active Member
Licensed User
Longtime User
Worth testing with Camera2

The problem of out of memory is in all method to read file, not only camera, for example if I read file over 30MB with file.openinput I'v the same error. Another question: is there a script in B4A that automatically inserts apps into ProtectedApps in huawei?
 
Upvote 0

npsonic

Active Member
Licensed User
Could you give some example of the code that will give you exception java.lang.OutOfMemoryError?
Huawei phones aren't most reliable ones out there and if you search "Out Of Memory + Huawei" you see that you are not the only one with this problem.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Another question: is there a script in B4A that automatically inserts apps into ProtectedApps in huawei?
Always start a new thread for a new question.

There are many things that can cause an out of memory error. Reading a 30mb file at once is one of those things. If you want us to help you, you should better explain what you are trying to do.
 
Upvote 0

nicolino33

Active Member
Licensed User
Longtime User
I need to open files and encrypt them by changing the value of some bytes. The problem arises when I try to open large files.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
I'm sorry but I cannot help you. You started the thread with:
Hello all, this is the problem when I take big video with CameraView in high middle resolution (1080P):

How is this related to:
I need to open files and encrypt them by changing the value of some bytes. The problem arises when I try to open large files.

Where is the relevant code?

You need to help us help you. We cannot guess what you are doing...

For further discussion start a new thread.
 
Upvote 0
Status
Not open for further replies.
Top