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: Binding go mobile framework on iOS 10 causing memory issues #16598

Sn0wfreezeDev opened this issue Aug 4, 2016 · 8 comments


Copy link

@Sn0wfreezeDev Sn0wfreezeDev commented Aug 4, 2016
Please answer these questions before submitting your issue. Thanks!

  1. What version of Go are you using (go version)?
    go1.6.3 darwin/amd64
  2. What operating system and processor architecture are you using (go env)?
    GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fno-common"

On iOS I/m testing on an iPhone 6S with arm64 and iOS 10 beta 4 installed

  1. What did you do?
    If possible, provide a recipe for reproducing the error.

Build a go framework with
gomobile bind -target=ios <#pathToGoProject#>
Include the framework into a running Xcode project

Run it on an iOS 10 arm64 device. The framework is not able to load into memory and causes a crash

  1. What did you expect to see?
    The App should start and run. All framework methods should be available and work as expected
  2. What did you see instead?
    The app crashes with a strange memory bug before it starts.

error: memory read failed for 0x2c3891c1600
runtime/cgo: chdir(/var/containers/Bundle/Application/7D8670DC-7F07-4F6C-BB81-1B3DEBB7EBE1/ failed

@quentinmit quentinmit added this to the Unreleased milestone Aug 4, 2016
@quentinmit quentinmit changed the title Binding go mobile framework on iOS 10 causing memory issues x/mobile: Binding go mobile framework on iOS 10 causing memory issues Aug 4, 2016
Copy link

@bytex64 bytex64 commented Aug 9, 2016

Having the same problem with my project. Early in app startup, a newly-started thread crashes by trying to execute memory it doesn't have access to. This bad address is the only frame in the backtrace.

Copy link

@merickson merickson commented Aug 10, 2016

While working with @bytex64 , I determined that this issue does not reproduce in the iOS 10 simulator, but on ARM hardware only.

Copy link

@dcu dcu commented Aug 10, 2016

do you think this is related to #16570 ?

Copy link

@merickson merickson commented Aug 10, 2016

$5 says it is.

Copy link

@bytex64 bytex64 commented Aug 10, 2016

I would say it's likely related. It's also worth noting that this worked in early iOS 10 betas, suggesting that the same change in Sierra betas also broke it in iOS 10.

Copy link

@merickson merickson commented Aug 10, 2016

Yeah, it's fixed along with #16570, see 9fde86b

Copy link

@dcu dcu commented Sep 26, 2016

was this fixed? @Sn0wfreezeDev can you confirm?

Copy link

@Sn0wfreezeDev Sn0wfreezeDev commented Sep 26, 2016

Yes it was fixed !

@minux minux closed this Sep 26, 2016
@golang golang locked and limited conversation to collaborators Oct 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
7 participants