Description
Resizing the browser window horizontally for a plot created using the code in the following codepen appears to occasionally result in a very specific case of the issue reported in #3561 :
https://codepen.io/alanjmac/pen/oraKpR
The combination of layout options I found that will cause the stack overflow exception is when the xaxis has automargin: true
and default values are also given for the plot margins, e.g.
margin: { t: 30, b: 55, l: 20, r: 20 }
If the right margin is set to null then I no longer experience the stack exception.
I am specifying the margins because the default values leave too much space around the plot for my needs. Then automargin is required so that the axis titles do not overflow or overlap the axes labels.
The following GIF demonstrates how resizing the window leads to the mentioned exception (reproduced in Chrome and Firefox browsers on Ubuntu 18.04):
The following "Uncaught RangeError: Maximum call stack size exceeded" exception appears to be due to an infinite loop originating in or related to the doAutoMargin method:
plotly-latest.js:115686 Uncaught RangeError: Maximum call stack size exceeded
at Object.exports.drawMarginPushers (plotly-latest.js:115686)
at marginPushers (plotly-latest.js:110092)
at Object.lib.syncOrAsync (plotly-latest.js:104804)
at plot (plotly-latest.js:110174)
at Object.exports.call (plotly-latest.js:144186)
at plots.doAutoMargin (plotly-latest.js:137223)
at Object.lib.syncOrAsync (plotly-latest.js:104804)
at plot (plotly-latest.js:110174)
at Object.exports.call (plotly-latest.js:144186)
at plots.doAutoMargin (plotly-latest.js:137223)
Occasionally this is followed by one of the following other exceptions:
plotly-latest.js:105176 Uncaught TypeError: Cannot read property 'select' of undefined
at Object.lib.ensureSingle (plotly-latest.js:105176)
at Object.drawing.initGradients (plotly-latest.js:87445)
at plot (plotly-latest.js:109966)
at Object.exports.call (plotly-latest.js:144186)
at exports.layoutReplot (plotly-latest.js:115489)
at Object.lib.syncOrAsync (plotly-latest.js:104804)
at relayout (plotly-latest.js:111688)
at Object.exports.call (plotly-latest.js:144186)
at plotly-latest.js:135385
Uncaught TypeError: fullLayout._has is not a function
at _relayout (plotly-latest.js:112043)
at relayout (plotly-latest.js:111652)
at Object.exports.call (plotly-latest.js:144186)
at plotly-latest.js:135385