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

Multiple flutter views seems to interfere with each others graphics context. #17688

Closed
sigurdm opened this issue May 17, 2018 · 5 comments
Closed
Labels
engine flutter/engine repository. See also e: labels.

Comments

@sigurdm
Copy link
Contributor

sigurdm commented May 17, 2018

I have only tried this on iOS.

I created an iOS project creating two distinct FlutterViewControllers, each showing the same image (using new Image.asset("assets/a.jpeg")).
The image is garbled in the second view.

Attaching a screen recording showing the problem (the two views should show the same image).

The code instantiating the FlutterViewController is as follows:

- (void)pushFlutter1 {
    NSLog(@"Pushed");
    if (!_flutterViewController1) {
    _flutterViewController1 = [[FlutterViewController alloc] initWithProject:nil nibName:nil bundle:nil];
        messageChannel = [FlutterBasicMessageChannel messageChannelWithName:@"channel"
                                                            binaryMessenger:_flutterViewController1
                                                                      codec:[FlutterStandardMessageCodec sharedInstance]];
        [_flutterViewController1 setInitialRoute:@"1"];
        UINavigationController*  __weak weakSelf = self;
        _flutterViewController1.edgesForExtendedLayout = UIRectEdgeNone;
        [messageChannel setMessageHandler:^(id message, FlutterReply reply) {
            [weakSelf popViewControllerAnimated:YES];
            NSLog(@"Popping");
            reply(@"");
        }];
    }

    NSAssert([self navigationController], @"Must have a NaviationController");
    [[self navigationController] pushViewController:_flutterViewController1 animated:YES];
}

(and similarly for the second view).

@xster xster added the engine flutter/engine repository. See also e: labels. label May 18, 2018
@xster
Copy link
Member

xster commented May 18, 2018

cc @chinmaygarde

@chinmaygarde
Copy link
Member

Do you have a reduced test case? Both flutter views have entirely separate rendering contexts operating on different threads. So it is surprising that they are interfering.

GaryQian pushed a commit that referenced this issue May 11, 2020
* 9ea2db5 Add FlMessageCodec, FlBinaryCodec, FlStringCodec (flutter/engine#18186)

* f422757 Roll src/fuchsia/sdk/linux from MhpFP... to c1q_S... (flutter/engine#18222)

* 2ab918c Roll src/third_party/skia a14084ba1b41..8f6c3ed7c7be (1 commits) (flutter/engine#18223)

* 40167b6 Make robolectric tests run against SDK 29 by default (flutter/engine#17996)

* e5b0db6 Roll src/third_party/skia 8f6c3ed7c7be..b55372444d1b (4 commits) (flutter/engine#18224)

* ed08c3e Roll src/fuchsia/sdk/mac from 4MCVP... to T5tT0... (flutter/engine#18228)

* 6767517 Roll src/third_party/skia b55372444d1b..ac09f7cd7a28 (2 commits) (flutter/engine#18229)

* 983de2c Remove pipeline in favor of layer tree holder (flutter/engine#17688)

* a1218dd Roll src/third_party/skia ac09f7cd7a28..c683912173bb (2 commits) (flutter/engine#18230)

* 68bf137 skip painting clipped out pictures (flutter/engine#18204)

* 7035255 make compiler worker count configurable (flutter/engine#17616)

* c8ff03c Publish validation layer deps as part of the fuchsia artifacts (flutter/engine#18214)

* 576f0e1 Roll src/third_party/skia c683912173bb..7359165e660c (1 commits) (flutter/engine#18234)

* 1b3b4ec skip font loading tests for safari (flutter/engine#18232)

* 9319d7c Roll src/third_party/skia 7359165e660c..6913d1bb1d7a (1 commits) (flutter/engine#18237)

* 1b56f35 Roll src/third_party/dart 617bc54b715d..2a14a62112e6 (30 commits) (flutter/engine#18239)

* ff6942f Add fontFeatures and decorationThickness to textstyle (flutter/engine#18235)

* 4418ce8 Revert "Remove pipeline in favor of layer tree holder (#17688)" (flutter/engine#18242)

* 9d8daf2 Roll src/third_party/skia 6913d1bb1d7a..bf1904fd4898 (3 commits) (flutter/engine#18243)

* Updated bin/internal/fuchsia-linux.version

* Updated bin/internal/fuchsia-mac.version
@darshankawar
Copy link
Member

@sigurdm
Is this still a valid issue on latest Flutter version ?
If so, Can you provide a complete minimal reproducible code sample that shows the issue along with flutter doctor -v ?
Thanks.

@darshankawar darshankawar added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Oct 20, 2020
@sigurdm
Copy link
Contributor Author

sigurdm commented Oct 20, 2020

Sorry - this was long time ago - I don't even have access to an ios test device.

@sigurdm sigurdm closed this as completed Oct 20, 2020
@no-response no-response bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Oct 20, 2020
@github-actions
Copy link

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 flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
engine flutter/engine repository. See also e: labels.
Projects
None yet
Development

No branches or pull requests

4 participants