bluebubbles-app icon indicating copy to clipboard operation
bluebubbles-app copied to clipboard

Having many attachments downloaded in a chat causes crashes when opening the chat

Open Jakeahorner opened this issue 3 years ago • 7 comments

When many attachments are sent in one chat, once the chat is opened the app slows down, then crashes

Jakeahorner avatar May 23 '22 15:05 Jakeahorner

This is known, currently it's just an issue with flutter (which is the sdk the app is coded with). Best solution would be to delete these from your Mac for the time being, and reset your Android app for the deleted messages to take effect

tneotia avatar May 23 '22 16:05 tneotia

This is known, currently it's just an issue with flutter (which is the sdk the app is coded with). Best solution would be to delete these from your Mac for the time being, and reset your Android app for the deleted messages to take effect

Is it because of an unsupported image type? Or how we load them client side?

zlshames avatar May 29 '22 13:05 zlshames

It's just when the app gets out of memory. With a bunch of images or videos (15+) at the same time, the app surpasses 2gb ram usage and some phones decide to kill the app or they just run out of memory.

tneotia avatar May 29 '22 13:05 tneotia

It's just when the app gets out of memory. With a bunch of images or videos (15+) at the same time, the app surpasses 2gb ram usage and some phones decide to kill the app or they just run out of memory.

Wouldn't that take like 100 images to cause a crash? Is the issue that we load them all at the same time? Cuz I'm sure we can fix that by loading them in batches. Which we should do anyways to reduce lag as much as possible

zlshames avatar May 29 '22 13:05 zlshames

So that's just flutter being flutter. iirc flutter has a quirk where it loads jpegs multiple times because it converts it into a different format before rendering it on screen. Plus we have our keepalives so even when images are off screen, they're still taking up memory being rendered. So loading in batches won't help if all of them will eventually be rendered in the background

tneotia avatar May 29 '22 13:05 tneotia

So that's just flutter being flutter. iirc flutter has a quirk where it loads jpegs multiple times because it converts it into a different format before rendering it on screen. Plus we have our keepalives so even when images are off screen, they're still taking up memory being rendered. So loading in batches won't help if all of them will eventually be rendered in the background

Do you think we can remove the keepalives with flutter 3? Something we'd have to test. I assume not, but just a thought

zlshames avatar May 29 '22 13:05 zlshames

Moving this to v1.10 so this can be investigated later. Right now we believe it's a flutter "bug", so we'll see if there is anything we can do to mitigate it

zlshames avatar Jun 02 '22 13:06 zlshames

Best solution would be to delete these from your Mac for the time being

FWIW, I don't think this is a great solution. I don't want to delete messages from any of my chats.

ameyp avatar Nov 08 '22 21:11 ameyp

FWIW, I don't think this is a great solution. I don't want to delete messages from any of my chats.

I understand that. I said for the time being :)

This is being actively worked on and hopefully we can come up with a proper solution, though we are limited in some ways by how performant the Flutter framework itself is.

tneotia avatar Nov 08 '22 21:11 tneotia

Completed in full rewrite

tneotia avatar Nov 22 '22 06:11 tneotia

When will the new, fully-rewritten version be released? I still see 1.10.1 on the Google Play Store

ameyp avatar Nov 22 '22 16:11 ameyp

When will the new, fully-rewritten version be released? I still see 1.10.1 on the Google Play Store

This is our current running checklist for it: https://github.com/BlueBubblesApp/bluebubbles-app/issues/2283 We plan on releasing an alpha in the coming weeks I think

zlshames avatar Nov 22 '22 17:11 zlshames