Skip to content
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

Cannot read property 'numEvicted' of null #3323

Closed
matejpolak opened this issue Apr 12, 2021 · 4 comments
Closed

Cannot read property 'numEvicted' of null #3323

matejpolak opened this issue Apr 12, 2021 · 4 comments
Labels
status: archived Archived and locked; will not be updated

Comments

@matejpolak
Copy link

Have you read the FAQ and checked for duplicate open issues?
Yes

What version of Shaka Player are you using?

  • v3.0.10-uncompiled => Doesn't work
  • NIghtly => Doesn't work
  • v2.5.21-uncompiled => WORKS
  • v3.0.0 => WORKS
  • v3.0.4 => WORKS

Can you reproduce the issue with our latest release version?
Yes

Can you reproduce the issue with the latest code from master?
Yes

Are you using the demo app or your own custom app?
Both

If custom app, can you reproduce the issue using our demo app?
Yes

What browser and OS are you using?
Mozilla/5.0 (Macintosh; Intel Mac OS X 11_2_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.114 Safari/537.36

What are the manifest and license server URIs?

Send by email.

What configuration are you using? What is the output of player.getConfiguration()?

"{
  "drm": {
    "retryParameters": {
      "maxAttempts": 2,
      "baseDelay": 1000,
      "backoffFactor": 2,
      "fuzzFactor": 0.5,
      "timeout": 0
    },
    "servers": {},
    "clearKeys": {},
    "advanced": {},
    "delayLicenseRequestUntilPlayed": false,
    "logLicenseExchange": false,
    "updateExpirationTime": 1
  },
  "manifest": {
    "retryParameters": {
      "maxAttempts": 2,
      "baseDelay": 1000,
      "backoffFactor": 2,
      "fuzzFactor": 0.5,
      "timeout": 0
    },
    "availabilityWindowOverride": null,
    "disableAudio": false,
    "disableVideo": false,
    "disableText": false,
    "defaultPresentationDelay": 0,
    "dash": {
      "clockSyncUri": "",
      "ignoreDrmInfo": false,
      "xlinkFailGracefully": false,
      "ignoreMinBufferTime": false,
      "autoCorrectDrift": true,
      "initialSegmentLimit": 1000,
      "ignoreSuggestedPresentationDelay": false,
      "ignoreEmptyAdaptationSet": false
    },
    "hls": {
      "ignoreTextStreamFailures": true,
      "useFullSegmentsForStartTime": false
    }
  },
  "streaming": {
    "retryParameters": {
      "maxAttempts": 2,
      "baseDelay": 1000,
      "backoffFactor": 2,
      "fuzzFactor": 0.5,
      "timeout": 0
    },
    "rebufferingGoal": 2,
    "bufferingGoal": 10,
    "bufferBehind": 30,
    "ignoreTextStreamFailures": true,
    "alwaysStreamText": true,
    "startAtSegmentBoundary": false,
    "smallGapLimit": 0.5,
    "jumpLargeGaps": false,
    "durationBackoff": 1,
    "forceTransmuxTS": false,
    "safeSeekOffset": 5,
    "stallEnabled": true,
    "stallThreshold": 1,
    "stallSkip": 0.1,
    "useNativeHlsOnSafari": true,
    "inaccurateManifestTolerance": 2
  },
  "offline": {
    "usePersistentLicense": true
  },
  "abr": {
    "enabled": true,
    "defaultBandwidthEstimate": 10000000,
    "switchInterval": 8,
    "bandwidthUpgradeTarget": 0.85,
    "bandwidthDowngradeTarget": 0.95,
    "restrictions": {
      "minWidth": 0,
      "maxWidth": null,
      "minHeight": 0,
      "maxHeight": null,
      "minPixels": 0,
      "maxPixels": null,
      "minFrameRate": 0,
      "maxFrameRate": null,
      "minBandwidth": 0,
      "maxBandwidth": null
    }
  },
  "preferredAudioLanguage": "",
  "preferredTextLanguage": "",
  "preferredVariantRole": "",
  "preferredTextRole": "",
  "preferredAudioChannelCount": 2,
  "restrictions": {
    "minWidth": 0,
    "maxWidth": null,
    "minHeight": 0,
    "maxHeight": null,
    "minPixels": 0,
    "maxPixels": null,
    "minFrameRate": 0,
    "maxFrameRate": null,
    "minBandwidth": 0,
    "maxBandwidth": null
  },
  "playRangeStart": 0,
  "playRangeEnd": null
}"

What did you do?
Tried to load and play provided asset.

What did you expect to happen?
A loaded MPD stream without any TypeError.

What actually happened?

When loading the provided asset following exception is triggered: Cannot read property 'numEvicted' of null. The error message itself mentions at shaka.media.MetaSegmentIndex.appendSegmentIndex (segment_index.js:493).

Snímek obrazovky 2021-04-12 v 10 31 03

@matejpolak
Copy link
Author

We think the issue was introduced by this commit: 78357ed#diff-92459c1ec7439406243574f6cd8513afcce5b68cd6f2f14c549e25025677069c

@joeyparrish
Copy link
Member

@matejpolak, I get an HTTP 404 error when I try to load the content you sent us privately. Can you please check that it is still available?

@joeyparrish joeyparrish added the status: waiting on response Waiting on a response from the reporter(s) of the issue label Apr 16, 2021
@joeyparrish
Copy link
Member

Looking at the backtrace, it seems to be this assertion's reference to numEvicted in lib/media/segment_index.js that leads to the exception:

  appendSegmentIndex(segmentIndex) {
    goog.asserts.assert(
        this.indexes_.length == 0 || segmentIndex.numEvicted == 0,
        'Cannot have evicted segments in non-first Periods');
    this.indexes_.push(segmentIndex);
  }

Which is in turn called by this line in lib/util/periods.js:

    output.segmentIndex.appendSegmentIndex(input.segmentIndex);

This implies that calls to createSegmentIndex() are missing somewhere. This is supposed to be called before any segment indexes are handled in shaka.util.PeriodCombiner, to ensure they exist before they are referenced.

In fact, looking higher in the console, you can see the failed assertion "Input segment index should have been created by now!" Can you please provide us with a full log instead of just the end? The earlier failures are likely to be more closely tied to the root cause.

@shaka-bot
Copy link
Collaborator

Closing due to inactivity. If this is still an issue for you or if you have further questions, you can ask us to reopen or have the bot reopen it by including @shaka-bot reopen in a comment.

@shaka-bot shaka-bot removed needs triage status: waiting on response Waiting on a response from the reporter(s) of the issue labels Apr 23, 2021
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Jun 22, 2021
@shaka-project shaka-project locked and limited conversation to collaborators Jun 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: archived Archived and locked; will not be updated
Projects
None yet
Development

No branches or pull requests

3 participants