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
Running macos example: EXC_BAD_ACCESS (code=1, address=0xc3) #33
Comments
I ran through the same steps and got the same thing! Woo! I'll get back once I've done some more debugging. |
Backtrace for context:
|
Well, I'm a bit stumped... my guess is that this has something to do with the bundled |
Thanks, good to know that it's not only me seeing this. I'll try to debug more when I have time. Also, wondering if @chinmaygarde can give an advice here? |
cc @rmacnak-google. The VM and isolate launch seem to be successful so I don't think this is related to the switch to Dart 2 and Kernel files. @awdavies: Can you list the files in the |
Also, is there a reduced test case? On tip-of-tree, the desktop embedder I use seems to be fine. |
That example app is pretty stripped down already. BTW, I wasn't able to reproduce this either. I wonder if it has something to do with undocumented requirements on directory structure or something. |
Can you clear the build directory and try again? Ryan is working on a document detailing the locations of the various assets. However, I don't think this issue is caused by that (since it would affect VM/Isolate launch). |
My changes to assets only affect Fuchsia, not macOS. Where can I add VM flags? How do I run this with an engine that hasn't been stripped? |
@chinmaygarde That guess was pretty shot-in-the-dark, but here's the files: |
I can repro this with ToT Flutter. Switching to source mode in the embedder works fine; given that and the timing it does seem like Dart 2/kernel mode is suspect here. |
Some answers/comments, as I'm catching up on this:
Does your embedder use source mode? If not, how are you building the assets directory?
Expanding on the list @awdavies provided, that directory is the result of running:
You can pass arguments to the embedder by adding to the commandLineArguments array in ExampleWindow.swift. I'm not sure if the Flutter embedding API filters arguments internally before passing them down the stack though.
The easiest way at the moment on macOS (where it's set up to download a prebuilt engine) is to build once to get that engine, then replace it (flutter_engine_framework/FlutterEmbedder.framework relative to the parent directory where you checked out this repo) with an unstripped version that you've built. |
Current status is that the engine CL referenced just above is expected to fix this (I haven't built yet to test), but Flutter hasn't rolled their engine version past that fix yet. So on macOS you'll need to wait for Flutter to roll their engine version again. On Linux you'll need to update your engine to/past that fix and rebuild. On either platform, you can work around this in the short term by using source mode instead of snapshot mode, but the examples aren't set up for source mode since it doesn't allow easy packaging. |
I've now build the engine locally and verified that that fix resolves this on macOS. I'll leave this open until Flutter rolls the engine, at which point the example will work out of the box again. |
Looks like Flutter roll happened in flutter/flutter#16232 . I just upgraded and it looks sooo much better now. |
Closing based on the roll. |
Steps to reproduce
macos/example/Example Embedder.xcodeproj
in XcodeExpected result: the example app starts and runs
Actual result: Xcode stops execution on exception:
I'm probably doing something wrong, but the docs are not super clear and I don't have a lot of experience with Xcode.
Flutter Doctor
The text was updated successfully, but these errors were encountered: