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

EXC_BAD_ACCESS crash from host app when hot reloading with embedded add-to-app module frameworks #47761

Closed
zmtzawqlp opened this issue Dec 25, 2019 · 4 comments
Labels
a: debugging Debugging, breakpoints, expression evaluation a: existing-apps Integration with existing apps via the add-to-app flow platform-ios iOS applications specifically t: xcode "xcodebuild" on iOS and general Xcode project management tool Affects the "flutter" command-line tool. See also t: labels. waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds

Comments

@zmtzawqlp
Copy link
Contributor

I'm following https://flutter.dev/docs/development/add-to-app/ios/project-setup to add flutter into ios app with Option B. but i found sample from https://github.com/flutter/samples/tree/master/add_to_app is not Option B(Embed frameworks in Xcode)

Steps

I tried to do it with following steps.

ios_fullscreen.zip

  1. remove codes refer to Option A
  2. cd fluttter_module and run flutter build ios-framework
  3. drag App.framework and Flutter.framework from debug folder to Embedded Binaries
    tmp7734a81e
    4.run ios_fullscreen
    5.attach flutter using vscode 'Debug:Attach to Fllutter Process '

Problem

1.can't hit breakpoint only if click reconnect
2.when i change codes and try to hot reload, it was crashed.

  • error info

io.flutter.1.ui (8): EXC_BAD_ACCESS (code=1, address=0xd1400040d8f)

  • srceenshot

tmp726d9489

flutter doctor -v

[✓] Flutter (Channel stable, v1.12.13+hotfix.5, on Mac OS X 10.14.4 18E226, locale zh-Hans-CN)
    • Flutter version 1.12.13+hotfix.5 at /Users/roott/Documents/Tools/flutter/stable
    • Framework revision 27321ebbad (2 weeks ago), 2019-12-10 18:15:01 -0800
    • Engine revision 2994f7e1e6
    • Dart version 2.7.0


[!] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /Users/roott/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • 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-1248-b01)
    ! Some Android licenses not accepted.  To resolve this, run: flutter doctor --android-licenses

[✓] 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.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 34.0.1
    • Dart plugin version 182.5215
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)

[✓] VS Code (version 1.30.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 2.25.1
@iapicca iapicca added a: debugging Debugging, breakpoints, expression evaluation t: xcode "xcodebuild" on iOS and general Xcode project management platform-ios iOS applications specifically labels Dec 25, 2019
@jmagman jmagman added tool Affects the "flutter" command-line tool. See also t: labels. p: tooling Affects the flutter_plugin_tools package labels Jan 8, 2020
@jmagman jmagman added this to Awaiting triage in Tools - Xcode review Jan 10, 2020
@jmagman jmagman added a: existing-apps Integration with existing apps via the add-to-app flow and removed p: tooling Affects the flutter_plugin_tools package labels Feb 25, 2020
@jmagman
Copy link
Member

jmagman commented Feb 25, 2020

Can we get the full crash log? I can't tell what is EXC_BAD_ACCESS (probably some overreleased object?).

Reproduce, then attach the crash log with the right timestamp from:
Xcode > Window > Devices and Simulators > your device > View Device Logs

Is Flutter.framework and App.framework in the same directory as your IOSFullScreen.xcodeproj? It's not present in the zip.

@jmagman jmagman added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Feb 25, 2020
@jmagman
Copy link
Member

jmagman commented Feb 25, 2020

Also what does "when i change codes" mean?

@jmagman jmagman changed the title how to debugging and hot reload flutter (add to app with Embed frameworks in Xcode) EXC_BAD_ACCESS crash from host app when hot reloading with embedded add-to-app module frameworks Feb 25, 2020
@jmagman jmagman moved this from Awaiting triage to Engineer reviewed in Tools - Xcode review Feb 25, 2020
@jmagman
Copy link
Member

jmagman commented Mar 18, 2020

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.

@jmagman jmagman closed this as completed Mar 18, 2020
@lock
Copy link

lock bot commented Apr 2, 2020

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.

@lock lock bot locked and limited conversation to collaborators Apr 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a: debugging Debugging, breakpoints, expression evaluation a: existing-apps Integration with existing apps via the add-to-app flow platform-ios iOS applications specifically t: xcode "xcodebuild" on iOS and general Xcode project management tool Affects the "flutter" command-line tool. See also t: labels. waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds
Projects
Tools - Xcode review
  
Engineer reviewed
Development

No branches or pull requests

3 participants