RocketChat / Rocket.Chat.iOS

Legacy mobile Rocket.Chat client in Swift for iOS
https://rocket.chat
MIT License
1.04k stars 438 forks source link

[BUG] Crash when too many animated Gifs are shown #2420

Open farmio opened 5 years ago

farmio commented 5 years ago

The app becomes unresponsive and crashes somtimes when messages with too many animated gifs are shown. I have some animated gifs as custom emojis loaded to my server (party parrots).

When someone sends a message containing a lot of them (about 160 - can be all the same emoji) the app becomes unresponsive, scrolls slow and eventually crashes when the message is in the viewport.

Rocket Chat Experimental iOs App handles this without problems.

rafaelks commented 5 years ago

@farmio Can you please try our TestFlight build with the same thing? https://testflight.apple.com/join/3gcYeoMr

farmio commented 5 years ago

Same issue with TestFlight build 3.2.0 (220).

rafaelks commented 5 years ago

@farmio Crash seems to be related to markdown... could you please post here the message that you're sending so we can make some experiments?

farmio commented 5 years ago

It's just ":partyparrot: :partyparrot:" repeated several times (from the emoji selector of the Android app). With partyparrot being the name of a custom emoji I have uploaded. The crash doesn't occur on sending, but on viewing the message. The custom emoji is just like the :party_parrot: on open.rocket.chat

Here is the file I have uploaded for the custom emoji: partyparrot

farmio commented 5 years ago

Its still the same with 3.3.0 (224) TestFlight version. Edit: Error persists in Build 233

Latest Rocket.Chat Experimental iOS (1.7.1.5384) scrolls smoothly over loads of parrots. No more problems here.

cardoso commented 5 years ago

Have you reproduced this @rafaelks ? Maybe we should start pooling the EmojiView objects 🤔

farmio commented 5 years ago

They all seem to be loaded individually since the animations don't start simultaneously.