Skip to content

plotly-gl3d.js - Javascript heap out of memory error #4495

@BenBagherian

Description

@BenBagherian

I'm using PowerBI custom visual library which uses Babel. Once I add gl3d library I get this error on compiling:

[BABEL] Note: The code generator has deoptimised the styling of C:\Users\.....\metricChart\node_modules\plotly.js\dist\plotly-gl3d.min.js as it exceeds the max of 500KB.

<--- Last few GCs --->

[11708:00000164B9A37930]    43867 ms: Scavenge 1384.0 (1423.7) -> 1383.8 (1426.2) MB, 6.3 / 0.0 ms  (average mu = 0.143, current mu = 0.036) allocation failure
[11708:00000164B9A37930]    45408 ms: Mark-sweep 1385.1 (1426.2) -> 1384.8 (1425.7) MB, 1537.6 / 0.0 ms  (average mu = 0.078, current mu = 0.010) allocation failure scavenge might not succeed


<--- JS stacktrace --->

==== JS stack trace =========================================

    0: ExitFrame [pc: 000001C418E5C5C1]
    1: StubFrame [pc: 000001C418E4FB9F]
Security context: 0x02cc45a9e6e1 <JSObject>
    2: replace [000002CC45A905E1](this=0x03dcf85e4469 <String[133]: C:\Users\[...]\metricChart\node_modules\plotly.js\dist\plotly-gl3d.min.js>,0x02e1e464a859 <JSRegExp <String[2]: \\>>,0x021f6e0af821 <String[1]: />)
    3: _append [000001DFE231E841] [C:\User...

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
 1: 00007FF6C7DE08AA v8::internal::GCIdleTimeHandler::GCIdleTimeHandler+4810
 2: 00007FF6C7DB9C46 node::MakeCallback+4518
 3: 00007FF6C7DBA630 node_module_register+2160
 4: 00007FF6C804AA4E v8::internal::FatalProcessOutOfMemory+846
 5: 00007FF6C804A97F v8::internal::FatalProcessOutOfMemory+639
 6: 00007FF6C8588984 v8::internal::Heap::MaxHeapGrowingFactor+11476
 7: 00007FF6C857F0E7 v8::internal::ScavengeJob::operator=+25543
 8: 00007FF6C857D65C v8::internal::ScavengeJob::operator=+18748
 9: 00007FF6C85865D7 v8::internal::Heap::MaxHeapGrowingFactor+2343
10: 00007FF6C8586656 v8::internal::Heap::MaxHeapGrowingFactor+2470
11: 00007FF6C8129457 v8::internal::Factory::NewFillerObject+55
12: 00007FF6C81C113A v8::internal::WasmJs::Install+29530
13: 000001C418E5C5C1

I import plotly this way:

import * as Plotly from 'plotly.js/dist/plotly-gl3d.min'

Then finally in the code:

Plotly.newPlot(this.target, data, layout);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions