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

[AIR 50.2.4.3+] App crash when create dinamically a Bitmap with a background worker #3072

Open
esdebon opened this issue Feb 17, 2024 · 3 comments
Labels

Comments

@esdebon
Copy link

esdebon commented Feb 17, 2024

I have an app that by using a background worker dynamically builds a Bitmap, the app uses many bitmadata objects to do this construction. I recently recompile to Android targetSdkVersion 33 using the version AIR SDK_50.2.4.3 and the app crash.

In the catlog I get:

BugAIR BugAIR2

This does not happen with version AIR SDK_50.2.3.5 or earlier

@esdebon esdebon added the Bug label Feb 17, 2024
@esdebon esdebon changed the title App crash when create dinamically a Bitmap (with a background worker) App crash when create dinamically a Bitmap with a background worker (AIR SDK_50.2.4.3) Feb 17, 2024
@esdebon
Copy link
Author

esdebon commented Feb 19, 2024

I just tested with version 50.2.4.4 and the result is the same, it seems that now there is a limit for memory usage that did not exist before.

@ajwfrost
Copy link
Collaborator

Is this running on a different Android version than before? The messages in that log are showing bitmaps that are being created in order to display text fields, and those are very large text fields! But to render text beyond Android 12 (iirc) we are using the Java Android APIs to create a canvas and draw the text into it, so we have to allocate the appropriate sized canvas in order to ensure it all displays properly.

If you've not got any text fields that are 2880x1335 then we may have another issue..! but it would be best if you're able to use smaller text fields...?

@esdebon
Copy link
Author

esdebon commented Feb 20, 2024

The app has some years in google play and appstore and has worked. I'm just optimizing the code because it is true that it consumes a lot of memory, but on three devices it works with older versions of the AIR SDK, but not with the last two (50.2.4.3, 50.2.4.4).

The app uses small texts and with those it builds "big" images, the size 2880x1335 is the final canvas size, not a textfield size.

But I insist, on the same devices it does work with older versions of the AIR SDK

@esdebon esdebon changed the title App crash when create dinamically a Bitmap with a background worker (AIR SDK_50.2.4.3) [AIR 50.2.4.3+] App crash when create dinamically a Bitmap with a background worker Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants