rive-app/rive-ios

Pink rectangle after minimizing the application

Closed this issue · 7 comments

Description

Hello, I recently started using Rive, made an animation and integrated it into the application using rive-ios. I had no problems until I accidentally noticed this bug: when I minimize the application, the animated object turns into a pink rectangle. Riv file has two animations: for light and dark theme.

Provide a Repro

Piece of code: https://pastebin.com/Qtp1PsnC
Video: https://imgur.com/a/vVq5dZ7

Source .riv/.rev file

I can provide it privately if needed

Expected behavior

The animation continues to display correctly

Screenshots

image

Device & Versions (please complete the following information)

  • Device: iOS Simulator, iPhone 13
  • iOS version iOS 16

Additional context

if you call onTapGesture (click on the animation) before minimizing the application, the chance of the animation turning pink is greatly reduced. After a click (probably a consequence of calling .play() the animation) I have only once seen this happen. However, I would like to point out that the problem also appears on the real device on a regular basis.

Hey @brianvar - thanks for reporting and sorry your an into this issue! Feel free to send the .rev file to https://rive-app.typeform.com/to/QdTi9zri so we can investigate a bit further

@duncandoit
I have the file. It's here in the ticket in HubSpot. I can send it to you in Slack as well.

I'm unable to repro this particular bug. I did notice in your code that you may want to change the way you handle the triggering of the different animations. Rather than creating two duplicate RiveViewModels for the same file you could use one viewmodel and just change the animation with the play func: .play(animationName: "animationDark")

I'd like to test something closer to your actual code. Are you able to share all or some of your project source?

@duncandoit yes, I also tried with the Example application and didn't notice this bug.

I did as you said earlier, but using animation: colorScheme == .dark ? "animationDark" : "animationLight". I made a solution with two variables because I thought that for some unknown reason the animation was unloaded from memory.

Can we contact via Telegram or mail?

Hi @brianvar, apologies for the radio silence on this, are you still experiencing this issue?

If you can share a repro of this issue with us that would be much appreciated, you can reach us via mail on support@rive.app

@mjtalbot Hello! No, I created a new project and the problem disappeared using the same animation. I'm not quite sure what the problem was, maybe I did something wrong in the last project. Thank you for your response.

Thanks for getting back on this one, I'm going to close the issue for now then, of course feel free to raise a new one if you experience this or other ones