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
Failed run-time assertion due to RiveRenderObject.dispose() not calling super.dispose() at the end of the method #335
Comments
Hi @hugovangalen, thanks for the report. Interesting that this hasn't popped up before as an issue. This particular code has been there for a long time. Do you have a reproducible example that results in this crash? Regardless though we'll make the |
I do not have a small example (yet) that triggers this error. This occured in a larger project and haven't been succesful in isolating it, so I suspect at this time it may have to do something with multiple objects nested in the render tree or something... Admitted, I can't entirely eliminate user error, but the incorrect order in dispose() just stood out to me. If I can successfully isolate the issue, I'll add to this ticket. |
Thanks @hugovangalen . I'll let you know when this is updated |
Not sure when this started happening, as I've not seen it before, but it started happening for me today also. My project too I can't really isolate it as I've got a collection of Rive animations happening and it's when I'm switching between pages with rive animations running on both that it seems to happen. |
Fixes: #335 By calling `super.dispose()` at the end - as suggested in the Flutter docs for widgets + render objects. Added the same to the editor (for widgets + render objects) These changes _should_ not result in any issues. But I don't know if there are valid reasons for any of these to call super.dispose first - if yes, then we should investigate the underlying reason for that. Diffs= 913760d97 chore: end with call to dispose (#5703) Co-authored-by: Gordon <pggordonhayes@gmail.com>
Should be fixed in v0.11.9 - if the above was the cause of the problem. Please reopen if you encounter it again after bumping to this version. |
I am using Rive 0.11.6 and I noticed that RiveRenderObject.dispose() method isn't calling super.dispose() as the last method in the function, but as the first.
This causes the following failure:
The fix for this crash is to put super.dispose() at the end of the method, as per RenderBox documentation, like so:
The text was updated successfully, but these errors were encountered: