Title: Automargin call stack size exceeded exception when resizing window · Issue #4028 · plotly/plotly.js · GitHub
Open Graph Title: Automargin call stack size exceeded exception when resizing window · Issue #4028 · plotly/plotly.js
X Title: Automargin call stack size exceeded exception when resizing window · Issue #4028 · plotly/plotly.js
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 combin...
Open Graph 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://c...
X 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://c...
Opengraph URL: https://github.com/plotly/plotly.js/issues/4028
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Automargin call stack size exceeded exception when resizing window","articleBody":"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 :\r\nhttps://codepen.io/alanjmac/pen/oraKpR\r\n\r\nThe 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.\r\n`margin: {\r\n t: 30,\r\n b: 55,\r\n l: 20,\r\n r: 20\r\n}`\r\nIf the right margin is set to null then I no longer experience the stack exception.\r\nI 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.\r\n\r\nThe following GIF demonstrates how resizing the window leads to the mentioned exception (reproduced in Chrome and Firefox browsers on Ubuntu 18.04):\r\n\r\n\r\nThe 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:\r\n\r\n> plotly-latest.js:115686 Uncaught RangeError: Maximum call stack size exceeded\r\n at Object.exports.drawMarginPushers (plotly-latest.js:115686)\r\n at marginPushers (plotly-latest.js:110092)\r\n at Object.lib.syncOrAsync (plotly-latest.js:104804)\r\n at plot (plotly-latest.js:110174)\r\n at Object.exports.call (plotly-latest.js:144186)\r\n at plots.doAutoMargin (plotly-latest.js:137223)\r\n at Object.lib.syncOrAsync (plotly-latest.js:104804)\r\n at plot (plotly-latest.js:110174)\r\n at Object.exports.call (plotly-latest.js:144186)\r\n at plots.doAutoMargin (plotly-latest.js:137223)\r\n\r\nOccasionally this is followed by one of the following other exceptions:\r\n> plotly-latest.js:105176 Uncaught TypeError: Cannot read property 'select' of undefined\r\n at Object.lib.ensureSingle (plotly-latest.js:105176)\r\n at Object.drawing.initGradients (plotly-latest.js:87445)\r\n at plot (plotly-latest.js:109966)\r\n at Object.exports.call (plotly-latest.js:144186)\r\n at exports.layoutReplot (plotly-latest.js:115489)\r\n at Object.lib.syncOrAsync (plotly-latest.js:104804)\r\n at relayout (plotly-latest.js:111688)\r\n at Object.exports.call (plotly-latest.js:144186)\r\n at plotly-latest.js:135385\r\n\r\n> Uncaught TypeError: fullLayout._has is not a function\r\n at _relayout (plotly-latest.js:112043)\r\n at relayout (plotly-latest.js:111652)\r\n at Object.exports.call (plotly-latest.js:144186)\r\n at plotly-latest.js:135385\r\n\r\n","author":{"url":"https://github.com/AlanJMac","@type":"Person","name":"AlanJMac"},"datePublished":"2019-07-08T14:06:38Z","url":"https://github.com/plotly/plotly.js/issues/4028"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:4506bec2-089c-257a-8490-d6bd024c136d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8E6C:3A73AA:18116E7:1E750B3:6B017BC2 |
| html-safe-nonce | 1dfcf56fee91a372a2e4085a5fd274a151eb6bab70734c911b2c04712aa1b54e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RTZDOjNBNzNBQToxODExNkU3OjFFNzUwQjM6NkIwMTdCQzIiLCJ2aXNpdG9yX2lkIjoiMTI4NzY0Njk1NTM3MTA2ODM1NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | f04999c30adef45a5f675d1cedb85bb1257e10be4f5cbf1ddfd5749b785c8c70 |
| hovercard-subject-tag | issue:465278501 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/plotly/plotly.js/4028/issue_layout |
| twitter:image | https://opengraph.githubassets.com/350d30025887c4daad3ffe6a7ef8d5ab5a5fc4aae8a4b4dae5ff0f63ba76fb0b/plotly/plotly.js/issues/4028 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/350d30025887c4daad3ffe6a7ef8d5ab5a5fc4aae8a4b4dae5ff0f63ba76fb0b/plotly/plotly.js/issues/4028 |
| og:image:alt | 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://c... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | AlanJMac |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/plotly/plotly.js git https://github.com/plotly/plotly.js.git |
| octolytics-dimension-user_id | 5997976 |
| octolytics-dimension-user_login | plotly |
| octolytics-dimension-repository_id | 45646037 |
| octolytics-dimension-repository_nwo | plotly/plotly.js |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 45646037 |
| octolytics-dimension-repository_network_root_nwo | plotly/plotly.js |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width