Canvas memory leak in Safari
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 52/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- react, typescript
- Ambito
- frontend, performance
Direzione di ricerca
Start with the linked rive-memory-leak reproduction and compare the heap snapshots after repeatedly mounting and unmounting @rive-app/react-canvas. Trace the canvas references retained by the React package in Safari; done means repeated remounts no longer leave extra canvas elements accumulating in memory.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Submission checklist
- I have confirmed the issue is present in the latest version of
@rive-app/react-canvasor@rive-app/react-webgl2(or the renderer variant I'm using) - I have searched the documentation and forums and could not find an answer
- I have searched existing issues and this is not a duplicate
Description
We are finding instances in our app of dangling references to canvas elements after rive elements have been unmounted. This is causing a growing memory problem that gets worse over time. It's definitely an issue in safari, possibly an issue in chromium based browsers but more difficult to reproduce.
I've created a repo that makes this reproducible - by mounting and un-mounting the rive component about 100 times I end up with two or three extra canvas elements in the memory snapshot. In our actual app with multiple different animations on various routes, we can sometimes see 10s or 100s of canvas elements accruing over time. With large animations this puts a real strain on memory and performance.
https://github.com/melodicdan/rive-memory-leak
Reproduction steps / code
https://github.com/melodicdan/rive-memory-leak
Atached are two heap snapshots, one with the single mounted canvas element and one after re-mounting ~100 times
Upload your reproduction files / stack trace
heap snapshot 1.json
heap snapshot 2.json
Rive React package version
"@rive-app/react-canvas": "^4.33.0",
Source .riv / .rev file
No response
Screenshots / video
No response
Browser & version
Safari 26.0.1
Operating system & version
macOS 15.7.1
Additional context
No response
- Lingua principale
- TypeScript
- Stelle
- 1.2k
- Fork
- 58
- Merge medio
- 52m
- PR unite (30g)
- 4
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di rive-app/rive-react
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 38/100
rive-app/rive-react#410 · 1 commento ·
-
Fit.Layout doesn't reflow elements in canvas-liteForse già presa @usero-agent l’ha presa 128 giorni fa. Apertaenhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 42/100
rive-app/rive-react#409 · 3 commenti ·
-
Issue: Re-mount RiveComponent multiple times cause web page laggyForse già presa @usero-agent l’ha presa 128 giorni fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 30/100
rive-app/rive-react#400 ·
-
triage
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
rive-app/rive-react#392 ·
-
Rive storybook url gives 404Apertatriage
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 55/100
rive-app/rive-react#386 · 1 reazione ·
Tutte le issue di rive-app/rive-react
Issue simili
-
Add: VIVE TVApertaapproved check:passed streams:add
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
iptv-org/iptv#55293 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
Fission-AI/OpenSpec#2084 ·
I maintainer di solito rispondono entro 2 giorni
-
Contrib indemnité de départ à la retraite : faire le pont avec le simulateur sur la page génériqueApertaP1
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
SocialGouv/code-du-travail-numerique#7561 ·
I maintainer di solito rispondono entro 1 giorno
-
beginner bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
hiero-ledger/hiero-sdk-js#4517 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
kubernetes-sigs/headlamp#7950 ·
I maintainer di solito rispondono entro 3 giorni