Skip to content

Fix segfault in debug mode #170

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

Merged
merged 1 commit into from
Oct 31, 2020
Merged

Fix segfault in debug mode #170

merged 1 commit into from
Oct 31, 2020

Conversation

provokateurin
Copy link
Member

Uses the official engines in debug mode (like previously).

@@ -639,7 +639,11 @@ func buildEnv(targetOS string, engineCachePath string) []string {
switch targetOS {
case "darwin":
cgoLdflags += fmt.Sprintf(" -L%s -L%s", engineCachePath, outputDirPath)
cgoLdflags += fmt.Sprintf(" -lflutter_engine -Wl,-rpath,.")
if buildOrRunMode == build.DebugMode {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe needs a comment about why this is necessary and how this works?

@provokateurin provokateurin force-pushed the fix/debug-mode-segfault branch from 5699463 to 1f4fcdb Compare October 26, 2020 16:44
@provokateurin provokateurin marked this pull request as ready for review October 26, 2020 18:06
@provokateurin provokateurin force-pushed the fix/debug-mode-segfault branch from 1f4fcdb to 088ef59 Compare October 29, 2020 16:12
@provokateurin
Copy link
Member Author

This should work now. Some ld flags were still wrong. I tested it on a MacOS VM in debug and release

@provokateurin
Copy link
Member Author

@JanezStupar @jonas1-4 can you test this PR to confirm it fixes everything?

@JanezStupar
Copy link

@JanezStupar @jonas1-4 can you test this PR to confirm it fixes everything?

It works fine on my end!

@provokateurin
Copy link
Member Author

Great

@provokateurin provokateurin merged commit ebb585f into master Oct 31, 2020
@provokateurin provokateurin deleted the fix/debug-mode-segfault branch October 31, 2020 13:23
@jonas1-4
Copy link

jonas1-4 commented Nov 3, 2020

Everything works fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants