Skip to content
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

Closed
emanuelzallikodelabs opened this issue May 20, 2024 · 11 comments
Closed

Issues in updating flutter from 3.19.6 to 3.22.0 #148664

emanuelzallikodelabs opened this issue May 20, 2024 · 11 comments
Labels
r: invalid Issue is closed as not valid

Comments

@emanuelzallikodelabs
Copy link

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

@darshankawar darshankawar added the in triage Presently being triaged by the triage team label May 20, 2024
@darshankawar
Copy link
Member

@emanuelzallikodelabs
You'll need to provide us complete runnable reproducible code sample (without third party implementation) that shows the error you are reporting. Without it, we will not be able to make the issue actionable.
Also provide us entire log in properly formatted text that shows meaningful entries that we can analyze further.

@darshankawar darshankawar added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label May 20, 2024
@emanuelzallikodelabs

This comment was marked as outdated.

@github-actions github-actions bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label May 20, 2024
@darshankawar
Copy link
Member

@emanuelzallikodelabs
Please don't reply to comment via email, as it doesn't allow to format it. Also when you are posting the log, please format it so that it is helpful to be readable. Currently we can't gauge anything based on your reply. Please provide us proper error log in formatted text and also reproducible code that throws the reported behavior.

@darshankawar darshankawar added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label May 21, 2024
@Rr01010010
Copy link

It is very very very WEIRD. I has that error on flutter 3.22, when on earlier version 3.19.2 works stable.
I get this error on page with horizontal scrolling PageView two children as SingleChildScrollView

to be more exactly:

class SimplifiedExampleOfPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return PageView(
      controller: appLifeTimedRouteController.contentController,
      children: [
        SingleChildScrollView(
          controller: appLifeTimedRouteController.finalFirstFeedController,
          child: Column(children: []),
        ),
        SingleChildScrollView(
          controller: appLifeTimedRouteController.finalSecondFeedController,
          child: Column(children: []),
        )
      ],
    );
  }
}

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:

* thread #9, name = 'io.flutter.1.ui', stop reason = EXC_BAD_ACCESS (code=1, address=0x11bae3fd0)
    frame #0: 0x0000000108592d54 Flutter`flutter::DisplayListBuilder::Restore() + 284
Flutter`flutter::DisplayListBuilder::Restore:
->  0x108592d54 <+284>: ldrsb  w8, [x24]
    0x108592d58 <+288>: sub    w8, w8, #0x17
    0x108592d5c <+292>: cmp    w8, #0x1
    0x108592d60 <+296>: b.hi   0x1085931e4               ; <+1452>

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.

@GuibertLo
Copy link

Same behaviour here, temporarily fixed it by:

  1. Downgrading Flutter to version 3.19.6
flutter downgrade 3.19.6
  1. Forcing intl dependency to version 0.18.1 in project pubspec (following lien to force this version for all dependencies, might cause issues)
dependency_overrides:
  intl: 0.18.1

@Rr01010010
Copy link

Rr01010010 commented May 26, 2024

@GuibertLo
Same behaviour here, temporarily fixed it by:

  1. Downgrading Flutter to version 3.19.6

downgrade flutter it's not decision. Refusal new version of flutter, just because scroll widget is sick, is a mistake.

@darshankawar
Copy link
Member

Everyone in this thread facing the reported issue which we still don't know the exact behavior, please provide us steps to replicate and reproducible code sample that claims that the issue occurs after updating.

I tried the given code sample above but it has custom implementation so we can't properly verify:

Screenshot 2024-05-27 at 11 08 13 AM

@emanuelzallikodelabs
Copy link
Author

Must be replaced on pages where .map() is used in ListView or ListView.builder

@github-actions github-actions bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label May 27, 2024
@darshankawar
Copy link
Member

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.

@darshankawar darshankawar added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label May 27, 2024
@GuibertLo
Copy link

@GuibertLo
Same behaviour here, temporarily fixed it by:

  1. Downgrading Flutter to version 3.19.6

downgrade flutter it's not decision. Refusal new version of flutter, just because scroll widget is sick, is a mistake.

Agreed, but if you have to publish an app quickly, it's better than nothing.

@Rr01010010
Copy link

@darshankawar
This code, without creating a default MaterialApp, might be suitable for identifying the problem? Or is it necessary to write an ultra-typical material?

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.

class SimplifiedExampleOfPage extends StatefulWidget {
  final PageController contentController = PageController();
  final ScrollController finalFirstFeedController = ScrollController();
  final ScrollController finalSecondFeedController = ScrollController();

  @override
  State<SimplifiedExampleOfPage> createState() =>
      _SimplifiedExampleOfPageState();
}

class _SimplifiedExampleOfPageState extends State<SimplifiedExampleOfPage> {
  final subwidgets = [
    Colors.yellow,
    Colors.blue,
    Colors.red,
    Colors.green,
    Colors.purple,
    Colors.cyan,
  ]
      .map(
        (color) => Container(
          decoration: BoxDecoration(
            borderRadius: BorderRadius.circular(15),
            color: color,
          ),
          padding: const EdgeInsets.all(20),
          height: 200,
          width: double.maxFinite,
        ),
      )
      .toList();

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.white,
      body: PageView(
        controller: widget.contentController,
        children: [
          SingleChildScrollView(
            controller: widget.finalFirstFeedController,
            child: Column(children: subwidgets),
          ),
          SingleChildScrollView(
            controller: widget.finalSecondFeedController,
            child: Column(children: subwidgets),
          )
        ],
      ),
    );
  }
}

@darshankawar darshankawar added r: invalid Issue is closed as not valid and removed waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds in triage Presently being triaged by the triage team labels May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
r: invalid Issue is closed as not valid
Projects
None yet
Development

No branches or pull requests

4 participants