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

Crash when present an CAEAGLLayer on iOS real device #39326

Closed
JackieLuo001 opened this issue Aug 27, 2019 · 4 comments
Closed

Crash when present an CAEAGLLayer on iOS real device #39326

JackieLuo001 opened this issue Aug 27, 2019 · 4 comments
Labels
a: platform-views Embedding Android/iOS views in Flutter apps engine flutter/engine repository. See also e: labels. platform-ios iOS applications specifically

Comments

@JackieLuo001
Copy link

JackieLuo001 commented Aug 27, 2019

I am adding the Flutter Module to an existing project which using CAEAGLLayer.
App crashed when running on an IOS real device after adding a boolean property to the app's Info.plist file with the key io.flutter.embedded_views_preview and the value YES. But everything works fine, if set the value NO or run the app on a simulator.

Steps to Reproduce

  1. clone the project at https://github.com/JackieLuo001/CocosEmbedFlutter.git.
  2. cd flutter_module folder and run flutter pub get.
  3. cd proj.ios_mac and run pod install.
  4. run the project on an IOS real device.
  5. tap the Enter Game button.

Crash Info

The crash is caused by an Assertion failure in -[CCES2Renderer resizeFromLayer:].But when calling with the glGetRenderbufferParameteriv(line 111 in CCES2Renderer-ios.m) function, the result of backingWidth_ is an incorrect 0 which should be a nonzero value related to device width.If we set the value of io.flutter.embedded_views_preview NO or run the app on a simulator, then everything works fine.

Flutter Doctor -v

[✓] Flutter (Channel master, v1.9.6-pre.6, on Mac OS X 10.14.6 18G87, locale zh-Hans-CN)
    • Flutter version 1.9.6-pre.6 at /Users/macbook03/flutter
    • Framework revision d37a38cee1 (2 days ago), 2019-08-25 10:57:54 -0700
    • Engine revision deca2c0da8
    • Dart version 2.5.0

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /Users/macbook03/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • ANDROID_HOME = /Users/macbook03/Library/Android/sdk
    • ANDROID_SDK_ROOT = /Users/macbook03/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 10.2.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.2.1, Build version 10E1001
    • CocoaPods version 1.7.5

[✓] Android Studio (version 3.4)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 37.1.1
    • Dart plugin version 183.6270
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)

[✓] VS Code (version 1.37.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.3.0

[✓] Connected device (1 available)
    • AAA iPad • 1880473dc43d158591417cb725e90d0a8b0e5d5e • ios • iOS 12.3.1

• No issues found!

@JackieLuo001 JackieLuo001 changed the title Crash when pop an UIView with CAEAGLLayer on IOS real device Crash when present an CAEAGLLayer on IOS real device Aug 28, 2019
@andrijasinski andrijasinski added a: platform-views Embedding Android/iOS views in Flutter apps platform-ios iOS applications specifically labels Aug 28, 2019
@kf6gpe kf6gpe changed the title Crash when present an CAEAGLLayer on IOS real device Crash when present an CAEAGLLayer on iOS real device Dec 20, 2019
@kf6gpe kf6gpe added the engine flutter/engine repository. See also e: labels. label Dec 20, 2019
@kf6gpe
Copy link
Contributor

kf6gpe commented Dec 20, 2019

Adding engine label per ongoing triage experiment --- would this be in the engine?

@jmagman jmagman added this to Awaiting triage in iOS Platform - platform view review Feb 25, 2020
@TahaTesser
Copy link
Member

Hi @JackieLuo001
Looks like the repo you provided is deleted

tahatesser@Tahas-MacBook-Pro AndroidStudioProjects % git clone https://github.com/JackieLuo001/CocosEmbedFlutter.git
Cloning into 'CocosEmbedFlutter'...
remote: Repository not found.
fatal: repository 'https://github.com/JackieLuo001/CocosEmbedFlutter.git/' not found
tahatesser@Ta

Can you please provide your flutter doctor -v and a complete reproducible minimal code sample
Thank you

@TahaTesser TahaTesser added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Oct 27, 2020
@pedromassangocode
Copy link

Without additional information, we are unfortunately not sure how to resolve this issue.
We are therefore reluctantly going to close this bug for now.
Please don't hesitate to comment on the bug if you have any more information for us; we will reopen it right away!
Thanks for your contribution.

Could everyone who still has this problem please file a new issue with the exact description of what happens, logs, and the output of flutter doctor -v.
All system setups can be slightly different, so it's always better to open new issues and reference related issues.

iOS Platform - platform view review automation moved this from Awaiting triage to Engineer reviewed Nov 20, 2020
@pedromassangocode pedromassangocode removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Nov 20, 2020
@github-actions
Copy link

github-actions bot commented Aug 9, 2021

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 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a: platform-views Embedding Android/iOS views in Flutter apps engine flutter/engine repository. See also e: labels. platform-ios iOS applications specifically
Projects
Development

No branches or pull requests

5 participants