New issue
Advanced search Search tips

Issue 913109 link

Starred by 1 user

Issue metadata

Status: Untriaged
Owner: ----
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

FrameViewer trace recording fails with "Invalid array buffer length"

Project Member Reported by jeremya@chromium.org, Dec 7

Issue description

RangeError: Invalid array buffer length
    at new ArrayBuffer (<anonymous>)
    at chrome://tracing/tracing.js:1522:267

Chrome version: 73.0.3633.0 (Official Build) canary (64-bit)
Revision	c972e8079a1fb95f6cb7c3afc162ea473384c3b1-refs/branch-heads/3633@{#1}

OS: macOS High Sierra 10.13.6

Unfortunately I don't have a simple repro for this error, but it _is_ a reliable one:

0. Start chrome with --enable-skia-benchmarking
1. Sign in to a Slack team
2. Open the search UI by clicking on the search box in the top-right
3. Search for something that produces several pages of results ("cake" produces several such results on the team I'm using)
4. Open chrome://tracing and start a recording with the 'Frame Viewer' category
5. Switch back to the Slack tab and scroll the search results rapidly (so that some "grey screen" shows)
6. Switch back to chrome://tracing and stop the recording

The chrome://tracing tab often crashes with "Aw, Snap" at this point, but sometimes it produces the above ArrayBuffer-related error.
 
It looks like the exception is probably being thrown at xhr_based_tracing_controller_client.html:64 [1].

The error message "Invalid array buffer length" is thrown when the length passed to `new ArrayBuffer` is outside the range [0, std::numeric_limits<size_t>::max()]:

> new ArrayBuffer(Math.pow(2,63))
RangeError: Array buffer allocation failed
    at new ArrayBuffer (<anonymous>)
> new ArrayBuffer(Math.pow(2,64))
RangeError: Invalid array buffer length
    at new ArrayBuffer (<anonymous>)
> new ArrayBuffer(0)
ArrayBuffer { byteLength: 0 }
> new ArrayBuffer(-1)
RangeError: Invalid array buffer length
    at new ArrayBuffer (<anonymous>)

[1]: https://cs.chromium.org/chromium/src/third_party/catapult/tracing/tracing/ui/extras/about_tracing/xhr_based_tracing_controller_client.html?q=xhr_based&sq=package:chromium&g=0&l=64

Sign in to add a comment