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

x/mobile: Go Mobile Code Crashes LLDB in Simulator Environment. #19846

Closed
hwchong opened this issue Apr 5, 2017 · 16 comments

Comments

Projects
None yet
@hwchong
Copy link

commented Apr 5, 2017

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

go1.8 darwin/amd64

What operating system and processor architecture are you using (go env)?

GOARCH="amd64"
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"

What did you do?

Built and used a go program into a go mobile dynamic framework. LLDB crashes on the Mac simulator but runs fine on device.

If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.

What did you expect to see?

LLDB to not crash.

What did you see instead?

LLDB crashing. Crash log is attached.
CrashLogs.zip

@gopherbot gopherbot added this to the Unreleased milestone Apr 5, 2017

@bradfitz

This comment has been minimized.

Copy link
Member

commented Apr 5, 2017

@eliasnaur

This comment has been minimized.

Copy link
Contributor

commented Apr 5, 2017

I've never used LLDB on macOS, so could you please give me a step-by-step guide to how to reproduce the problem. Please include any source code I'll need as well.

Also, what macOS and Xcode version are you using?

@hwchong

This comment has been minimized.

Copy link
Author

commented Apr 6, 2017

screenshot crash
@eliasnaur so this is the standard debugger for Xcode and iOS. I've attached a sample Xcode project, the Go mobile framework and the corresponding Go source code.

All you have to do is build the project, let it run for a few seconds and watch the crash occur on the console in Xcode.
git.clinicloud.com.zip

The project is rather large because of the framework. I've uploaded to this link -
https://appbryo-my.sharepoint.com/personal/hon_clinicloud_com/_layouts/15/guestaccess.aspx?docid=0819c0001cb5c4964bf5d8586dd1b2a27&authkey=AchwSlqH-kVixXPxvI7l9PY

Thanks!

@llooz

This comment has been minimized.

Copy link

commented Apr 10, 2017

We have the same issue by just following the wiki
https://github.com/golang/go/wiki/Mobile#sdk-applications-and-generating-bindings with the HelloGreetings example

@llooz

This comment has been minimized.

Copy link

commented Apr 10, 2017

It seems to work on Xcode 8.2.1 on OS X 10.11.6 but it doesn't on Xcode 8.3.1 on macOS Sierra

@JeanJoskin

This comment has been minimized.

Copy link

commented Apr 10, 2017

I'm currently working around this by disabling the goroutines plugin (which causes the crash) in lldb by adding

settings set plugin.os.goroutines.enable false

to my ~/.lldbinit

@eliasnaur

This comment has been minimized.

Copy link
Contributor

commented Apr 26, 2017

I've just now tried the golang.org/x/mobile/example/bind/ios example using Xcode 8.3.2 with both Go tip and Go 1.8.1. Both versions worked for me with no crashes even after several minutes of running the project through Xcode. Could you retry with Go 1.8.1 and see if your error persists?

@Tylerc230

This comment has been minimized.

Copy link

commented May 18, 2017

I'm able to reproduce with go 1.8.1 and xcode 8.3.2. The error occurs when the debugger hits a breakpoint in xcode.

@eliasnaur

This comment has been minimized.

Copy link
Contributor

commented May 18, 2017

Ok, setting a breakpoint provokes the debugger crash for me as well, thanks. However, I don't have time to dig deeper into this hairy issue, so any help fixing or pinpointing the problem will be appreciated a lot.

@Tylerc230

This comment has been minimized.

Copy link

commented May 18, 2017

Sorry, I'm not very familiar with this system. The error in xcode console directs you to the crash logs at ~Library/Logs/DiagnosticReports/lldb-rpc-server*

@zjw1918

This comment has been minimized.

Copy link

commented Jun 8, 2017

Same problem with xcode 8.3.3. But 8.2.x and before is ok.
Sometimes there are errors with " linked wrong...".
If I add my Go test xxx.framework and UI button click event, can just run, but no click event nslog happened.

@nehayward

This comment has been minimized.

Copy link

commented Jun 14, 2017

Any update on fixing this?

@bossbei

This comment has been minimized.

Copy link

commented Jul 5, 2017

Same problem with xcode 8.3.3.

@bradfitz bradfitz added the mobile label Jul 20, 2017

@eliasnaur

This comment has been minimized.

Copy link
Contributor

commented Jul 29, 2017

I don't think we can do much on our side other than using the workaround from #19846 (comment) . FWIW, I've reported the crash to Apple, and they marked my bug as a duplicate.

@remirobert

This comment has been minimized.

Copy link

commented Aug 10, 2017

#19846 (comment) worked for me 👍

@eliasnaur

This comment has been minimized.

Copy link
Contributor

commented Sep 26, 2017

The workaround is no longer necessary for me on Xcode 9.

@eliasnaur eliasnaur closed this Sep 26, 2017

@golang golang locked and limited conversation to collaborators Sep 26, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.