-
Notifications
You must be signed in to change notification settings - Fork 26.7k
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
Issues in updating flutter from 3.19.6 to 3.22.0 #148664
Comments
@emanuelzallikodelabs |
This comment was marked as outdated.
This comment was marked as outdated.
@emanuelzallikodelabs |
It is very very very WEIRD. I has that error on flutter 3.22, when on earlier version 3.19.2 works stable. to be more exactly:
Apparently, the ScrollController calls the dispose method, or some other destructor of some sort, when the scrollview is not in the screen's scope. And since I have two scrollviews used on the same page, it seems that some mechanisms for re-initializing the final scrollcontroller are not called, (this is my hypothesis). I tried to solve it by making the ScrollController static final - this caused interesting behavior, because if the ScrollView did not crash the application once, then in the case of a hot-restart, the application would no longer crash, no matter how many restarts occurred... It was as if the static controller was saved in memory. when changing final to mutable var there was no difference, it crashed in 80% of cases, as before with final short error text:
I resolve that with refuse SingleChildScrollView, and rewrite the layout using ListView. This crutch solution solved my problem and allowed me to stabilize the customer’s application. |
Same behaviour here, temporarily fixed it by:
|
downgrade flutter it's not decision. Refusal new version of flutter, just because scroll widget is sick, is a mistake. |
Must be replaced on pages where .map() is used in ListView or ListView.builder |
It is not clear what exactly above comment means @emanuelzallikodelabs Please provide concise runnable reproducible code sample so as to make this issue actionable rather than going back and forth. |
Agreed, but if you have to publish an app quickly, it's better than nothing. |
@darshankawar As I wrote above, the problem is not in some unique code. Page view and scroll view controllers use the most common controllers. The problem is that they behave inconsistently.
|
Steps to reproduce
When upgrading Flutter from 3.19.6 to 3.22.0, the app just freezes in debug mode and release mode
Expected results
I get this from Xcode: io.flutter.1.ui (10): EXC_BAD_ACCESS (code=1, address=0x12893ffd0)
Actual results
I get this from Xcode: io.flutter.1.ui (10): EXC_BAD_ACCESS (code=1, address=0x12893ffd0)
Code sample
Code sample
[Paste your code here]
Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
Logs
Logs
[Paste your logs here]
Flutter Doctor output
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.22.0, on macOS 14.5 23F79 darwin-arm64, locale en-XK)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2023.3)
[✓] IntelliJ IDEA Ultimate Edition (version 2024.1.1)
[✓] Connected device (5 available)
! Error: Browsing on the local area network for Test’s iPad. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac.
The device must be opted into Developer Mode to connect wirelessly. (code -27)
[✓] Network resources
The text was updated successfully, but these errors were encountered: