-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Table is stuck in an infinite loop sometimes #27083
Comments
Looks similar to #23723 |
Do you also get an exception? |
@zoechi No, it just loops infinitely because the condition is never satisfied (rounding with doubles problem, I guess). |
And of course, app becomes unresponsive due to this loop. |
Also, I'd push fix for this one sooner, not just "Goals" in coming years. Not because of me, well, also, but because this bug is insidious and happens only on certain screen size combinations. Imagine having an app in production and it becomes unresponsive for random customers/devices without any feedback. |
We've had similar rounding issues in slivers, we should use a small delta for our while-loop |
I was able to reproduce this almost immediately, will have PR up shortly |
Instead of using a small delta (how small should be the challenge - are you sure it will cover all values?), perhaps you might consider checking whether deficit changed in a last loop, or something slightly more reliable. |
Feel free to comment on PR |
@zoechi You're right, that's different. |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
Steps to Reproduce
DefaultTabController->Scaffold->TabBarView
it might get stuck in an infinite loop.It gets stuck in
RenderTable._computeColumnWidths
method, specifically in this while loop:The problem is that deficit is a really small value
2.842170943040401e-14
and it won't get to or below0
.Other values are:
Basically
newWidth <= minWidths[x]
is always false and deficit doesn't decrease becausewidths[x] - newWidth
is always0
.This problem happens only on some screens and it is consistent when it starts (i.e. works on emulator and not on device - Nexus 6, or the other way round).
Logs
No useful logs (when it gets stuck nothing is reported).
No issues found! (ran in 3.4s)
The text was updated successfully, but these errors were encountered: