Before you continue
Before submitting a bug report, please review our troubleshooting documentation at Troubleshoot Issues | Vega Troubleshooting
If you still want to file a bug report, please make sure to fill in all the details below and provide the necessary information.
NOTE: PLEASE ONLY REPORT A SINGLE BUG USING THIS TEMPLATE.
If you’re experiencing multiple issues, please file a separate report for each.
Bug Description
1. Summary
Calling setTimeout(func, delay, arg) where arg is an object containing circular references causes an infinite recursion in volta::react::Utils::nativeTypeFromValue (libkeplerscript-2.so.2), resulting in a stack overflow and SIGSEGV crash on the JS thread.
The Vega MCP server was very helpful in determining the root cause. We have a current workaround, but wanted to report the issue.
App Name:
App Link on Amazon Appstore (found through Developer Console → Actions column in App List → View on Amazon.com):
Bug Severity
Select one that applies
- Impacts operation of app
- Blocks current development
- Improvement suggestion
- Issue with documentation (If selected, please share the doc link and describe the issue)
- Other
2. Steps to Reproduce
-
Start video playback with Shaka Player -
Add the following event listener to a Shaka player instance after it has loaded a manifest: -
// After shaka player has loaded content: player.addEventListener('trackschanged', (event) => { // This crashes — the event object has circular references // (event.target → player → listeners → handler → ...) // and setTimeout passes it through the native bridge where // nativeTypeFromValue recurses infinitely trying to serialize it. setTimeout(() => { console.log('tracks changed'); }, 25, event); // ← passing event as extra setTimeout arg triggers crash }); -
This can be reproduced with any object containing a circular reference:
// Create an object with a circular reference
const obj: any = { name: ‘test’ };
obj.self = obj; // circular reference
// This will crash with SIGSEGV
setTimeout(() => {
console.log(‘callback’);
}, 100, obj);
3. Observed Behavior
Explain what actually happened, noting any discrepancies or malfunctions.
SIGSEGV app crash
4. Expected Behavior
Describe what you expected the SDK to do under normal operation.
setTimeout should either:
Store extra arguments as opaque JS references (without serializing/traversing them), or
Detect circular references in nativeTypeFromValue and handle them gracefully (e.g., skip, truncate, or throw a JS exception)
4.a Possible Root Cause & Temporary Workaround
Fill out anything you have tried. If you don’t know, N/A is acceptable
CrashLang: Native
CrashReason: SIGSEGV
CrashDescriptor: 29c006260e29b2e85195c1db2066ad93
#0 libhermes-0.12.0.so.0.12.0
#1 libhermes-0.12.0.so.0.12.0
...
#8 libreact-native-0.72.so.0.72
#9 volta::react::Utils::nativeTypeFromValue(...) — libkeplerscript-2.so.2
#10 volta::react::Utils::nativeTypeFromValue(...) — libkeplerscript-2.so.2
... (90+ identical recursive frames)
Workaround: Wrap the function call in a closure so the complex object stays in JS scope and is never passed through the native bridge.
// Instead of:
setTimeout(func, delay, event);
// Use:
setTimeout(() => func(event), delay);
5. Logs or crash report
(Please make sure to provide relevant logs as attachment)
62_JSThread2.acr (511.2 KB)
63_JSThread.acr (514.2 KB)
For crash issues, please refer this guide for faster troubleshooting: Detect Where the App Crash Originates | Design and Develop Vega Apps
-
For issues with Vega Studio Extension, please share log files from below folders:
For v0.22+:~/.vscode/extensions/amazon.vega-extension-<version>/ExtensionLogs ~/.vscode/extensions/amazon.vega-ui-extension-<version>/ExtensionLogsFor v0.21 and earlier:
~/.vscode/extensions/amazon.kepler-extension-<version>/ExtensionLogs ~/.vscode/extensions/amazon.kepler-ui-extension-<version>/ExtensionLogs
6. Environment
Please fill out the fields related to your bug below:
-
SDK Version: 0.22.6150
-
App State:
[Foreground] -
OS Information: Please ssh into the device via
vega exec vda shell(orkepler exec vda shellfor v0.21 and earlier) and copy the output fromcat /etc/os-releaseinto the answer section below. Note, if you don’t have a simulator running or device attached, the command will respond withvda: no devices/emulators foundNAME="OS" OE_VERSION="4.0.0" OS_MAJOR_VERSION="1" OS_MINOR_VERSION="1" RELEASE_ID="14" OS_VERSION="1.1" BRANCH_CODE="TV Ship day60" BUILD_DESC="OS 1.1 (TV Ship day60/101)" BUILD_FINGERPRINT="4.0.249302.0(3072cab629675a74)/101N:user/release-keys" BUILD_VARIANT="user" BUILD_TAGS="release-keys" BUILD_DATE="Sat Mar 14 22:24:12 UTC 2026" BUILD_TIMESTAMP="1773527052" VERSION_NUMBER="1401010010120"
7. Example Code Snippet / Screenshots / Screengrabs
Include any relevant code or component setup in React Native that can help reproduce the bug.
see above
Playback Issues
If this is a playback issue, please provide your content URL, any pre-conditions (like geo-location), and let us know if it’s x86 or arm7.
see above
Please share the following details in addition:_
- Player SDK:
[Shaka] - Player SDK Version:
[4.8.5]- Audio Codecs:
[AAC] - Video Codecs:
[h.264] - Manifest Types:
[m3u8, dash]
- Audio Codecs:
Q: If applicable, please provide your media/content url
If this is created dynamically, tokenized, etc please provide a way for us to access it
[N/A or Content / Media Url for testing]
Q: Are there any special headers required to reproduce the issue you are facing?
[N/A or Insert Headers]
Additionally please provide the following if possible
Provide Screenshots / Screengrabs / Logs. Please include as much information as you can that will help debug.
<!-- Answer here if applicable -->
Additional Context
Any Additional Context you would like to provide?
Add any other relevant information, such as recent updates to the SDK, dependencies, or device OS that may affect the bug.
<!-- Answer here if applicable -->