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

Catastrophic freeze in infinite loop when updating table context #2404

Closed
cdruck opened this issue Sep 2, 2020 · 15 comments · Fixed by #2510
Closed

Catastrophic freeze in infinite loop when updating table context #2404

cdruck opened this issue Sep 2, 2020 · 15 comments · Fixed by #2510
Labels
bug Something isn't working

Comments

@cdruck
Copy link

cdruck commented Sep 2, 2020

See SOF issue https://stackoverflow.com/questions/63602354/material-ui-react-table-hangs-on-switching-tabs

Describe the bug
Table crashes unforgivingly when trying to recalculate column widths on update. On debug, seems due to infinite loop in reducePercentsInCalc.

To Reproduce
https://codesandbox.io/s/winter-pond-1zsn3?file=/public/index.html

@cdruck cdruck added the bug Something isn't working label Sep 2, 2020
@cdruck
Copy link
Author

cdruck commented Sep 7, 2020

while (index !== -1) {
is the culprit as far as I can tell (infinite loop)

@ablontech
Copy link

Same issue here

@moussaidOualid
Copy link

I think the problem is in the new features in v 1.69.
Downgrading to 1.68.1 solved the problem for me

@cdruck
Copy link
Author

cdruck commented Sep 8, 2020

I think the problem is in the new features in v 1.69.
Downgrading to 1.68.1 solved the problem for me

1.68.0 (I don't know about 1.68.1) has other issues, with onBulkUpdate (even if you're not using that feature)

@pyrsv
Copy link

pyrsv commented Sep 29, 2020

same issue in 1.69
have table with local data and input that changes comment for every row
on first change it is ok, second update takes about 2 seconds, but third ....
photo_2020-09-29_10-56-35

@Denis-Step
Copy link

I have the same issue and will update with more info later. I am able to update context after the initial render ONCE. Subsequent changes to context cause an infinite loop.

@sabbaticaldev
Copy link

I have a similar issue and fixed it by removing (for now) React.StrictMode.

@marcespinoza
Copy link

I think the problem is in the new features in v 1.69.
Downgrading to 1.68.1 solved the problem for me

Thanks man, works for me too.

@eeropenttinen
Copy link

I have also the same issue with v 1.69. Downgrading to 1.68.1 solved the problem.

I think the problem is in the new features in v 1.69.
Downgrading to 1.68.1 solved the problem for me

Thanks man, resolved the issue for me.

@briankostar
Copy link

Same issue. Downgrading to 1.68 helped fixed it.

@cking27
Copy link

cking27 commented Nov 5, 2020

Also downgraded to 1.68.1 to resolve this issue. Helpful hint ( as I had to do a second pass to resolve). I had in my package.json "material-table": "^1.69.0". Note the Caret. It indicates "Compatible with version". To be sure you indeed just get 1.68.1 you may want to remove the Caret to: "material-table": "1.68.1"

@cristian-azocar
Copy link

If you don't want to downgrade, you can also set the width for each column to width: 'auto'. This fixed it for me and I'm using v1.69.1

@AshrinJose
Copy link

I think the problem is in the new features in v 1.69.
Downgrading to 1.68.1 solved the problem for me

Thanks man. This worked for me.

@peacechen
Copy link

Unfortunately mbrn is inactive and not merging PR's. Use the official community fork @material-table/core instead.

@nzayatz14
Copy link

I think the problem is in the new features in v 1.69.
Downgrading to 1.68.1 solved the problem for me

FWIW also worked for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.