Skip to content

Error "Invalid number!" for very large thread IDs #38

@oliver

Description

@oliver

When loading a JSON file in Trace Event Format where the tid (thread id) values are very large (larger than 42,949,672,959, i.e. (2**32)*10 ?), Spall shows an error message ("Oof. We're dead!"), and the JS console shows the error messages "Invalid number!" and "RuntimeError: unreachable executed". If I replace the tid values in the JSON file with smaller values, the file is loaded correctly.

Attached are two files (in ZIP files, since Github does not allow JSONs) which demonstrate the problem:

I tried this with the current version of https://gravitymoth.com/spall/spall-web.html .

In the chrome://tracing/ viewer in Chromium, both files are displayed correctly.

I encountered this problem when viewing trace files created by an in-house C++ tool. The tid values come from std::this_thread::get_id() and have values like 140339968804608 .

Btw. for the record, I had encountered problems with large thread IDs (larger than 2**32 ?) also in Perfetto (see google/perfetto#522), but they didn't want to fix that problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions