Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation Fault When Resetting Animation Overrides #2255

Closed
theashraf opened this issue May 8, 2024 · 4 comments
Closed

Segmentation Fault When Resetting Animation Overrides #2255

theashraf opened this issue May 8, 2024 · 4 comments
Assignees
Labels
bug Something isn't working lottie Lottie animation showstopper Regression bugs / Critical errors
Milestone

Comments

@theashraf
Copy link
Member

I am encountering a segmentation fault error in dotlottie-rs when trying to reset the applied slots overrides object for this Lottie animation: favorites_active.json.

The applied slots overrides are as follows:

{
    "lottie-icon-outline": {
        "p": {
            "a": 0,
            "k": [1, 1, 0]
        }
    },
    "lottie-icon-solid": {
        "p": {
            "a": 0,
            "k": [0, 0, 1]
        }
    }
}

Related Issue issue #188 in the dotlottie-web

Please note that the lottie-icon-solid property is animated color in the provided animation with keyframes. Changing it to non-animated in the overrides could be causing the issue 👀 ?

@tinyjin tinyjin self-assigned this May 8, 2024
@tinyjin tinyjin added bug Something isn't working showstopper Regression bugs / Critical errors lottie Lottie animation and removed bug Something isn't working labels May 8, 2024
@tinyjin
Copy link
Member

tinyjin commented May 8, 2024

Thanks, @theashraf. We will have a look on this as soon as possible.

@hermet hermet added the bug Something isn't working label May 9, 2024
@hermet hermet added this to the 0.14 milestone May 9, 2024
@tinyjin
Copy link
Member

tinyjin commented May 9, 2024

Hello @theashraf.
I tested Slot override & reset. In ThorVG on my machine, I did not encounter segmentation fault error.

I don't find any relevance to segmentation fault from dotlottie-rs.

We also noticed a bug in Slot resetting in this file. After resetting the slot, the styles do not render to their original color(blue), it's rendering a black star, which is not the original look.

Perhaps, some sort of bugs affecting the color could cause segmentation fault in dotlottie-rs, not sure yet. I'll keep track on the resetting bug.

[Original]
CleanShot 2024-05-09 at 15 27 04

[Slot Overrien]
CleanShot 2024-05-09 at 15 34 05

[After resetting]
CleanShot 2024-05-09 at 15 30 14

@hermet
Copy link
Member

hermet commented May 9, 2024

@tinyjin did you check with sanitizer?

@tinyjin
Copy link
Member

tinyjin commented May 10, 2024

@hermet Ooops.
I've got a heap UAF with sanitizer. I'll take care of it. This might be potential crash in Rust system.

CleanShot 2024-05-10 at 20 24 54

tinyjin added a commit to tinyjin/thorvg that referenced this issue May 13, 2024
When resetting back to animated property, system causes an UAF because frames have been freed.

Mark frames in nullptr at the case, so it doesn't use frame data after freed.

Issue: thorvg#2255
hermet pushed a commit that referenced this issue May 13, 2024
When resetting back to animated property, system causes an UAF because frames have been freed.

Mark frames in nullptr at the case, so it doesn't use frame data after freed.

Issue: #2255
@hermet hermet closed this as completed May 13, 2024
hermet pushed a commit that referenced this issue May 17, 2024
When resetting back to animated property, system causes an UAF because frames have been freed.

Mark frames in nullptr at the case, so it doesn't use frame data after freed.

Issue: #2255
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working lottie Lottie animation showstopper Regression bugs / Critical errors
Projects
Status: Done 0.14
Development

No branches or pull requests

3 participants