rive-ios icon indicating copy to clipboard operation
rive-ios copied to clipboard

Pink rectangle after minimizing the application

Open brianvar opened this issue 2 years ago • 4 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.

brianvar avatar Oct 11 '22 13:10 brianvar

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

zplata avatar Oct 14 '22 14:10 zplata

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

toniarr avatar Oct 17 '22 16:10 toniarr

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 avatar Oct 17 '22 18:10 duncandoit

@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?

brianvar avatar Oct 18 '22 11:10 brianvar

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 [email protected]

mjtalbot avatar May 17 '23 10:05 mjtalbot

@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.

brianvar avatar May 30 '23 09:05 brianvar

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

mjtalbot avatar May 30 '23 11:05 mjtalbot