Skip to content
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

[data grid] detail panel + sortModel causes "Maximum call stack size exceeded" #13122

Closed
Thinkscape opened this issue May 14, 2024 · 4 comments
Closed
Labels
bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module! feature: Master-detail Related to the data grid Master-detail feature feature: Rendering layout Related to the data grid Rendering engine support: pro standard Support request from a Pro standard plan user. https://mui.com/legal/technical-support-sla/

Comments

@Thinkscape
Copy link

Thinkscape commented May 14, 2024

Steps to reproduce

Link to live example: https://stackblitz.com/edit/github-gbfkio?file=src%2Fdemo.tsx

Steps:

  1. Use DataGridPro
  2. Have a getDetailPanelContent which renders a component of non-zero height
  3. Have a client sortModel on any of the columns
  4. Expand one or more rows so that the height exceeds the container size

Current behavior

The getDetailPanelContent gets called a few hundred times and then this is thrown:

Uncaught RangeError: Maximum call stack size exceeded
    at eval (gridSortingSelector.js:14:55)
    at selector (createSelector.js:64:1)
    at dependenciesChecker (index.js:77:1)
    at memoized (defaultMemoize.js:123:1)
    at selector (createSelector.js:91:1)
    at dependenciesChecker (index.js:77:1)
    at memoized (defaultMemoize.js:123:1)
    at selector (createSelector.js:91:1)
    at dependenciesChecker (index.js:77:1)
    at memoized (defaultMemoize.js:123:1)
    at selector (createSelector.js:91:1)
    at selector (createSelector.js:63:1)
    at applySelector (useGridSelector.js:12:1)
    at eval (useGridSelector.js:39:1)
    at eval (Store.js:19:1)
    at Set.forEach (<anonymous>)
    at Store.update (Store.js:19:1)
    at Object.eval [as setState] (useGridStateInitialization.js:54:1)
    at eval (useGridDimensions.js:67:1)
    at eval (useEventCallback.js:18:18)
    at Object.eval [as current] (useGridDimensions.js:192:1)
    at EventManager.enhancedHandler (useGridApiEventHandler.js:32:1)
    at EventManager.emit (EventManager.js:51:1)
    at Object.eval [as publishEvent] (useGridApiInitialization.js:88:1)
    at eval (useGridColumns.js:46:1)
    at Object.handleGridSizeChange [as current] (useGridColumns.js:248:1)
    at EventManager.enhancedHandler (useGridApiEventHandler.js:32:1)
    at EventManager.emit (EventManager.js:57:1)
    at Object.eval [as publishEvent] (useGridApiInitialization.js:88:1)
    at Object.eval [as updateDimensions] (useGridDimensions.js:194:1)
    at Object.eval [as current] (useGridDetailPanel.js:155:1)
    at EventManager.enhancedHandler (useGridApiEventHandler.js:32:1)
    at EventManager.emit (EventManager.js:57:1)
    at Object.eval [as publishEvent] (useGridApiInitialization.js:88:1)
    at Object.eval [as applySorting] (useGridSorting.js:102:1)
    at Object.eval [as setSortModel] (useGridSorting.js:111:1)
    at Object.eval [as current] (useGridSorting.js:221:1)
    at EventManager.enhancedHandler (useGridApiEventHandler.js:32:1)
    at EventManager.emit (EventManager.js:57:1)
    at Object.eval [as publishEvent] (useGridApiInitialization.js:88:1)
    at eval (useGridColumns.js:46:1)
    at Object.handleGridSizeChange [as current] (useGridColumns.js:248:1)
    at EventManager.enhancedHandler (useGridApiEventHandler.js:32:1)
    at EventManager.emit (EventManager.js:57:1)
    at Object.eval [as publishEvent] (useGridApiInitialization.js:88:1)
    at Object.eval [as current] (useGridDimensions.js:194:1)
    at EventManager.enhancedHandler (useGridApiEventHandler.js:32:1)
    at EventManager.emit (EventManager.js:51:1)
    at Object.eval [as publishEvent] (useGridApiInitialization.js:88:1)
    at eval (useGridColumns.js:46:1)

Expected behavior

The components keeps functioning.

Context

N/A

Your environment

npx @mui/envinfo
  System:
    OS: macOS 14.4.1
    CPU: (16) arm64 Apple M3 Max
    Memory: 671.31 MB / 128.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.0.0 - /opt/homebrew/bin/node
    Yarn: 1.22.19 - /opt/homebrew/bin/yarn
    npm: 10.5.1 - /opt/homebrew/bin/npm
    pnpm: 8.3.1 - /opt/homebrew/bin/pnpm
    bun: 1.1.7 - /opt/homebrew/bin/bun
  Managers:
    Cargo: 1.67.1 - ~/.cargo/bin/cargo
    CocoaPods: 1.12.1 - /opt/homebrew/bin/pod
    Gradle: 8.7 - /opt/homebrew/bin/gradle
    Homebrew: 4.2.21 - /opt/homebrew/bin/brew
    pip3: 24.0 - /opt/homebrew/bin/pip3
    RubyGems: 3.0.3.1 - /usr/bin/gem
  Utilities:
    Make: 3.81 - /usr/bin/make
    GCC: 15.0.0 - /usr/bin/gcc
    Git: 2.39.3 - /usr/bin/git
    Clang: 15.0.0 - /usr/bin/clang
    FFmpeg: 7.0 - /opt/homebrew/bin/ffmpeg
    Curl: 8.7.1 - /opt/homebrew/bin/curl
    OpenSSL: 3.3.0 - /opt/homebrew/bin/openssl
  Servers:
    Apache: 2.4.58 - /usr/sbin/apachectl
  Virtualization:
    Docker: 26.0.0 - /usr/local/bin/docker
    Docker Compose: 2.26.1 - /usr/local/bin/docker-compose
  IDEs:
    Vim: 9.0 - /usr/bin/vim
    Xcode: /undefined - /usr/bin/xcodebuild
  Languages:
    Bash: 3.2.57 - /bin/bash
    Go: 1.20.1 - /opt/homebrew/bin/go
    Java: 21.0.2 - /opt/homebrew/opt/openjdk/bin/javac
    Perl: 5.34.1 - /usr/bin/perl
    Protoc: 25.1 - /opt/homebrew/bin/protoc
    Python3: 3.12.3 - /opt/homebrew/bin/python3
    Ruby: 2.6.10 - /usr/bin/ruby
    Rust: 1.67.1 - /Users/thinkscape/.cargo/bin/rustc
  Databases:
    SQLite: 3.43.2 - /usr/bin/sqlite3
  Browsers:
    Chrome: 124.0.6367.202
    Edge: 124.0.2478.97
    Safari: 17.4.1

Search keywords: datagrid, datagridpro, sortmodel, maximum,call,stack, exception
Order ID: 90183

Potentially related to #11483

@Thinkscape Thinkscape added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label May 14, 2024
@michelengelen michelengelen added bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module! feature: Rendering layout Related to the data grid Rendering engine feature: Master-detail Related to the data grid Master-detail feature support: pro standard Support request from a Pro standard plan user. https://mui.com/legal/technical-support-sla/ labels May 14, 2024
@michelengelen michelengelen changed the title [DataGridPro] detail panel + sortModel causes "Maximum call stack size exceeded" [data grid] detail panel + sortModel causes "Maximum call stack size exceeded" May 14, 2024
@michelengelen
Copy link
Member

Hey @Thinkscape ... this does indeed look as if it is related.
@mui/xgrid WDYT?

@michelengelen
Copy link
Member

It looks as if this is related to #11483

Lets close this one to keep track in a single issue.
Thanks for raising this anyways @Thinkscape

@michelengelen michelengelen closed this as not planned Won't fix, can't repro, duplicate, stale May 16, 2024
@michelengelen michelengelen removed the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label May 16, 2024
Copy link

⚠️ This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue.
Now, if you have additional information related to this issue or things that could help future readers, feel free to leave a comment.

@Thinkscape: How did we do? Your experience with our support team matters to us. If you have a moment, please share your thoughts in this short Support Satisfaction survey.

@Thinkscape
Copy link
Author

@michelengelen the issue, that my issue has been closed in favour of, doesn't have order id. Does that mean it effectively gets deprioritised? It also seems to be 6 months old, without a workaround or resolution, which worries me...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module! feature: Master-detail Related to the data grid Master-detail feature feature: Rendering layout Related to the data grid Rendering engine support: pro standard Support request from a Pro standard plan user. https://mui.com/legal/technical-support-sla/
Projects
None yet
Development

No branches or pull requests

2 participants