ember-table
ember-table copied to clipboard
Error: loop count exceeded guard while distributing width
Hi,
I'm seeing reports of this error from our app:
loop count exceeded guard while distributing width
I tracked it down to these line in ember-table: https://github.com/Addepar/ember-table/blob/a323756dd350b866dc1acffbf4c0da02df4b411d/addon/-private/column-tree.js#L459-L461
This lead me to the following PR: https://github.com/Addepar/ember-table/pull/530
I'm not sure I understand the issue enough to decide how to handle this error. It is normal for the error to happen sometimes, and can it be ignored, or am I using the library incorrectly and something needs to be resolved to prevent the error?
Any help is appreciated. Thanks in advance!
I have more information now on this. The error occurs after upgrading Ember-Table's dependency version in package.json from 2.2.3 to 3.0.1.
This broke some functionality in our app, so not an ignorable error after all. For now we've reverted to the previous ember-table version. The original reason for updating was for fixes such as the sendAction deprecation.
Now my question is, how should we proceed? If I understand correctly, rolling back is not a good solution because that just means the infinite loop could still be happening in width detection, the only difference is that it doesn't throw an error?
Thanks
@xtagon - We've encountered same error in our app. We found that the error seemed to occur exclusively on table instances with widthContraint value set to eq-container. We changed value to gte-container globally and that seemed to avoid error. Have you tried the above or found anything similar?
@mjzefeldt Thanks for the tip, we tried it and confirmed it works! 👍
It's a suitable workaround for us, but I'll leave this ticket open as it's not truly a fix.