Editor & Runtime BUG: PropertyTrigger addListener callback silently stops firing
Summary
`vm:getTrigger("name"):addListener(callback)` callbacks silently stop being invoked after an arbitrary number of trigger fires (observed: 6–21). No error is thrown. The script’s advance() continues running normally. The listener simply stops receiving events.
Severity
High — there is no workaround using the trigger API. The only reliable alternative is polling a boolean ViewModel property, which defeats the purpose of triggers.
Environment
Rive Editor (latest as of 2026-03-15)
Single artboard, single script instance, single node
Clean editor restart + cache clear between test runs
Reproduction
attached is a test project - listener-trigger-testing.rev
Minimal reproduction — the script does nothing except:
In init(): calls vm:getTrigger("testTrigger"):addListener(fn) where fn increments a counter and prints
In advance(): returns true every frame, logs a heartbeat every 300 frames (~5 seconds)
No property writes. No animation state. No side effects.
Steps
Create a new Rive file with the ViewModel setup above
Add a single node with the test script attached
Fire testTrigger repeatedly from the ViewModel panel
Observe console output
Expected
Every trigger fire produces a FIRED #N log line indefinitely.
Actual
Trigger fires produce FIRED #1 through FIRED #N (N varies: 6–21 observed), then the callback silently stops being called. Heartbeat logs continue, confirming advance() is still running.
Console output (actual reproduction)
tester:33 [TriggerTest] listener attached
tester:33 [TriggerTest] init OK
tester:33 [TriggerTest] FIRED #1
tester:33 [TriggerTest] FIRED #2
tester:33 [TriggerTest] FIRED #3
tester:33 [TriggerTest] FIRED #4
tester:33 [TriggerTest] FIRED #5
tester:33 [TriggerTest] FIRED #6
tester:33 [TriggerTest] FIRED #7
tester:33 [TriggerTest] FIRED #8
tester:33 [TriggerTest] heartbeat — advance #900, fires: 8
tester:33 [TriggerTest] heartbeat — advance #1200, fires: 8
tester:33 [TriggerTest] heartbeat — advance #1500, fires: 8
tester:33 [TriggerTest] heartbeat — advance #1800, fires: 8
tester:33 [TriggerTest] heartbeat — advance #2100, fires: 8
tester:33 [TriggerTest] heartbeat — advance #2400, fires: 8After fire #8, the trigger was fired many more times from the ViewModel panel. No further FIRED messages appeared. advance() heartbeats continued without interruption.
Analysis
The issue is NOT advance() stopping — heartbeats prove it runs continuously
The issue is NOT related to property writes — the test script writes nothing
The issue is NOT related to multiple script instances — single instance confirmed
The issue is NOT related to editor hot-reload — tested after clean restart + cache clear
It seems that the issue is the listener callback reference becoming disconnected from the PropertyTrigger’s internal listener list
Workaround
Replace the trigger with a boolean ViewModel property. The script polls it every frame in advance() and resets it to false after processing:
-- In advance():
if self._scoreChangeProp and self._scoreChangeProp.value then
-- process the event
self._scoreChangeProp.value = false -- reset after done
endThis is reliable but requires always-on polling and prevents using triggers for state machine transitions on the same frame (the script resets the boolean before the SM reads it — must delay the reset).
Not editor-specific — reproduces in exported runtime
The issue also reproduces in a standalone HTML demo using the WebGL2 runtime. The exported .riv file with the test script exhibits the same behavior: the fire counter stops incrementing after an arbitrary number of trigger fires. This confirms the bug is in the Rive runtime itself, not the editor.
Attached files
listener-trigger-testing.rev — Rive project with ViewModel and test script
listener-trigger-testing-riv-demo.html — standalone HTML demo (WebGL2 runtime) reproducing the same behavior