-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Automargin call stack size exceeded exception when resizing window #4028
Comments
Thanks for reporting! |
One more argument for starting work on #2704 |
Using 1c09a52 and https://codepen.io/etpinard/pen/qexqMm illustrates the problem a little better. Sometimes, the "margin diff" converges to a value other than zero. A few more notes,
|
I think this issue is related to a problem we've (i.e. @cldougl and @chriddyp) encountered in dash-enterprise docs. I've made a codepen here: https://codepen.io/wbrgss/pen/LYPryKO to illustrate the problem, which I don't think is necessarily related to resizing the window, but rather figures with small widths (which would result from resizing the window "horizontally"?). We can work around this for now, but it's a problem for responsive example plots in the DDK docs that would freeze the user's browser on smaller window widths. And of course it's a general problem for users with small figures. More context on how we came across this issue here: plotly/dash-design-kit#507 (private repo). If you think it's tangential or a separate issue I'm happy to post a new one @etpinard. |
Thanks @wbrgss - your codepen is essentially is (very) minimal example of the situation described in #2704 (comment) For example, setting the |
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:
Occasionally this is followed by one of the following other exceptions:
The text was updated successfully, but these errors were encountered: