Error in Activity.LoadLayout

dimartinoentertainment

Member
Licensed User
Longtime User
Hi

Everything has worked fine before Basic4Android v2.7.
Now, when I try to call an activity using CallSubDelayed, the app sometimes crashes with the following error:


I've absolutely no idea what causes it. The error often occures when I try to close the activity and then immediately try to call it again.


Thanks in advance!
 

dimartinoentertainment

Member
Licensed User
Longtime User

This is the unfiltered output right before the crash.
I see: "Out of memory on a 5139472-byte allocation."
Does it mean that the device has runned out of memory ? Or is this something else ?


Thanks.
 
Upvote 0

dimartinoentertainment

Member
Licensed User
Longtime User
Yes, I've tested some things and it seems indeed that it has to do with loading a large image.

Is there a limit in size or dimension of images ?


Thanks in advance.
 
Upvote 0

dimartinoentertainment

Member
Licensed User
Longtime User
Just to let you know: I've solved the problem by recyling the large bitmap which I"m loading (by using a Reflector).
My app was using between 90%-100% of the available memory. By recyling all the large bitmaps each time the activity closes, the used memory has been reduced to an average of 65%.
 
Upvote 0

thehe

Member
Licensed User
Longtime User
I have the problem with ver3 It away PAUSE at
Activity.LoadLayout("Main")
I tried with simple button CLICK to display a message or to a label.
the program was run on tablet connected to PC with window 7-64
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…