rive-app / rive-ios

iOS runtime for Rive
MIT License
462 stars 53 forks source link

Crash on setTextRunValue #286

Closed Masataka-n closed 6 months ago

Masataka-n commented 7 months ago

Description

The setTextRunValue now throws an error, but if you execute it with an incorrect textRunName, it doesn't throw an error, and a runtime error occurs. Help appreciate, thanks!

image

Device & Versions (please complete the following information)

zplata commented 7 months ago

Hi @Masataka-n - we should be throwing an error appropriately that the text run value couldn't be set if it cannot find the text run reference on the Artboard, so we'll take a look at our internal error catching there.

However, do you mind clarifying this part:

if you execute it with an incorrect textRunName, it doesn't throw an error

We expect an incorrect text run name to yield the error, and the correct text run name to propagate the value accordingly. If this isn't the case for you and you find the opposite happening on your end, it'd be great if you're able to provide a sample xcode project here so we can see if we can replicate on our end!

Masataka-n commented 7 months ago

Hi, @zplata This issue can be reproduced with the sample app provided in this repository.

The following is a modification made to SwiftTestText.swift. The RunName in setTextRunValue has been changed, and a do-catch block has been added.

When an incorrect RunName is specified, an error is not thrown; instead, it results in a RunTimeError.

Help appreciate, thanks!

https://github.com/rive-app/rive-ios/assets/14210434/cdb63095-4d72-433b-8ada-8cb5cfe8a014

zplata commented 7 months ago

Thanks @Masataka-n ! We've got a patch in the works. We'll update this thread when it lands in a release.

zplata commented 6 months ago

Hi @Masataka-n - this should be fixed in v5.7.0. Closing this but feel free to re-open if you're still encountering issues with the text runs