-
Notifications
You must be signed in to change notification settings - Fork 29.7k
[bug] Fix null check crash by ReorderableList #132153
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
Conversation
|
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!). If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
goderbauer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this change is also missing a test. Can you please add one to ensure that we never break this again? Thanks.
|
Looks like some checks are also failing. Can you please take a look at those? Thanks! |
Co-authored-by: Michael Goderbauer <[email protected]>
Co-authored-by: Michael Goderbauer <[email protected]>
|
Is something wrong with the tree? Many tests seem to be failing... I have written necessary tests and made modifications. I'll probably wait till the tree is green, then commit changes. |
Co-authored-by: Michael Goderbauer <[email protected]>
Co-authored-by: Michael Goderbauer <[email protected]>
|
Ready to merge, do review. @goderbauer |
|
@Piinks @goderbauer do review latest changes |
Piinks
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks for your patience, I was out of town. :)
|
@goderbauer can you provide a second review? |
|
@opxdelwin Can you please rebase this PR to make the Google testing check happy? |
goderbauer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
flutter/flutter@61b890b...58ba6c2 2023-09-14 [email protected] Roll Packages from 06cd9e9 to 275b76c (1 revision) (flutter/flutter#134734) 2023-09-14 [email protected] Update plugin_ffi generated file to match FFIgen 9.0.0 (flutter/flutter#134614) 2023-09-14 [email protected] LinkedText (Linkify) (flutter/flutter#125927) 2023-09-14 [email protected] _DayPicker should build days using separate stetefull widget _Day. (flutter/flutter#134607) 2023-09-13 [email protected] Remove `Path.combine` call from `CupertionoTextSelectionToolbar` (flutter/flutter#134369) 2023-09-13 [email protected] Update KeepAlive.debugTypicalAncestorWidgetClass (flutter/flutter#133498) 2023-09-13 [email protected] Fix null check crash by ReorderableList (flutter/flutter#132153) 2023-09-13 [email protected] Roll Flutter Engine from 154d6fd601a3 to cd90cc8469fb (3 revisions) (flutter/flutter#134691) 2023-09-13 49699333+dependabot[bot]@users.noreply.github.com Bump github/codeql-action from 2.21.5 to 2.21.6 (flutter/flutter#134692) 2023-09-13 [email protected] Roll Flutter Engine from b71b366e3de3 to 154d6fd601a3 (6 revisions) (flutter/flutter#134683) 2023-09-13 [email protected] [flutter_tools] Run ShutdownHooks when handling signals (flutter/flutter#134590) 2023-09-13 [email protected] Dispose routes in navigator when throwing exception (flutter/flutter#134596) 2023-09-13 [email protected] [framework] reduce ink sparkle uniform count. (flutter/flutter#133897) 2023-09-13 [email protected] Roll Flutter Engine from 5e671d5c90f9 to b71b366e3de3 (4 revisions) (flutter/flutter#134676) 2023-09-13 [email protected] Set the CONFIGURATION_BUILD_DIR in generated xcconfig when debugging core device (flutter/flutter#134493) 2023-09-13 [email protected] Bump gradle heap size limit in *everywhere* (flutter/flutter#134665) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
|
Thanks @opxdelwin for fixing this! 🙌🏻 |
Fix issue where if you drag the last element of `ReorderableList` and put it in the same index, a `Null check` error arises. This happens as index in `_items` is out of bounds (when `reverse: true`). Fix is to check if last element, dragged element and drop index is same, and return as nothing has changed. Find this video attached. https://github.com/flutter/flutter/assets/84124091/8043cac3-eb08-42e1-87e7-8095ecab09dc Fixes issue flutter#132077
Fix issue where if you drag the last element of
ReorderableListand put it in the same index, aNull checkerror arises. This happens as index in_itemsis out of bounds (whenreverse: true). Fix is to check if last element, dragged element and drop index is same, and return as nothing has changed. Find this video attached.2023-08-08.16-09-52.mp4
Fixes issue #132077
Pre-launch Checklist
///).