The application crashes if the “<” character is present in the subtitles

:backhand_index_pointing_right: Bug Description


1. Summary

We are noticing a player crash related to VTT subtitles when a subtitle containing the < character is displayed. The issue occurs when using Shaka subtitles. We do not encounter the problem with the native player’s subtitle engine.

Bug Severity

  • 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

  1. Load video with subtitle tracks containing the “<” char. For example:
    12
    00:02:53.240 --> 00:02:55.280
    - <Buon Natale.
    - Grazie, dottoressa.
    
  2. Turn on subtitles
  3. Go to the moment when the caption containing the “<” character is displayed.

3. Observed Behavior

The application crashes when it tries to render a caption containing the “<” character.

4. Expected Behavior

The application correctly displays the caption without any crashes.

4.a Possible Root Cause & Temporary Workaround

The crash occurs in the TimeMarchesOnAlgo class of @amzn/react-native-w3cmedia, when executing the renderActiveCues method. It appears that the rendering engine interprets the “<” character as the opening of an HTML tag that is not closed.

We tried using the native player subtitles as an alternative, but as reported in this task, it does not support switching between multiple subtitle tracks.

5. Logs or crash report

Crash report:
11817#crash_1765905331_5000_5000_25753_145689511_Toolkit-UI.acr (657,6 KB)

6. Environment

Please fill out the fields related to your bug below:

  • SDK Version: 0.20.3067

  • App State: Foreground

  • OS Information

      NAME="OS"
      OE_VERSION="4.0.0"
      OS_MAJOR_VERSION="1"
      OS_MINOR_VERSION="1"
      RELEASE_ID="10"
      OS_VERSION="1.1"
      BRANCH_CODE="TV Ship"
      BUILD_DESC="OS 1.1 (TV Ship/4446)"
      BUILD_FINGERPRINT="4.0.184842.0(3072cab629675a74)/4446N:user-external/release-keys"
      BUILD_VARIANT="user-external"
      BUILD_TAGS="release-keys"
      BUILD_DATE="Sun Nov 16 06:26:48 UTC 2025"
      BUILD_TIMESTAMP="1763274408"
      VERSION_NUMBER="1001010444650"
    

7. Example Code Snippet / Screenshots / Screengrabs

Include any relevant code or component setup in React Native that can help reproduce the bug.

import { ExampleComponent } from 'custom-sdk';

<ExampleComponent config={{ key: 'value' }} />

:backhand_index_pointing_right: Playback Issues


Please share the following details in addition:_

  • Player SDK: Shaka
  • Player SDK Version: 4.6.18, 4.8.5
  • Video Codecs: h.264
  • Manifest Types: dash
  • Subtitles Format: text/vtt
  • @amzn/react-native-w3cmedia: 2.1.80, 2.1.87

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 --> 

:backhand_index_pointing_right: 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  --> 

HI @MDSBD_Operation,

Thank you for the detailed bug report on the application crash when the “<” character is present in VTT subtitles. We appreciate you providing the crash report and reproduction steps.

Our team is investigating this issue and will provide an update as soon as we have more information.

Thanks for helping us improve the Vega platform.

Best regards,
Aishwarya

Hi @MDSBD_Operation

Can you please share the app name and ASIN for us to deep dive into this?

Warm regards,
Ivy

Hi @Ivy_Mahajan,
I sent you a private message with the requested information.

Best regards.

1 Like

Thanks @MDSBD_Operation , I’ll update you with my findings ASAP.

Hi @Ivy_Mahajan,
do you have any updates regarding this issue?

Best regards.

Hi @MDSBD_Operation

We are still checking on this, it’s taking a bit longer than expected.

Warm regards,
Ivy

Hi @MDSBD_Operation

Added captions starting with ‘<’ and I can see the crash happening.
The crash happens when the caption is provided for render. Somehow the ‘<’ is not decoded during text parsing.

I did try to hardcode a caption with ‘<’ during parsing but don’t see the same issue.

We are still working on this, it’s taking some time. Thank you for your patience. Just wanted to update you on the progress.

Warm regards,
Ivy