ember-table icon indicating copy to clipboard operation
ember-table copied to clipboard

Error: loop count exceeded guard while distributing width

Open xtagon opened this issue 4 years ago • 3 comments

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!

xtagon avatar Aug 25 '21 17:08 xtagon

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 avatar Aug 25 '21 19:08 xtagon

@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 avatar Sep 27 '21 12:09 mjzefeldt

@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.

xtagon avatar Sep 29 '21 21:09 xtagon