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

Closed
Sn0wfreezeDev opened this issue Aug 4, 2016 · 8 comments

Comments

Projects
None yet
7 participants
@Sn0wfreezeDev
Copy link

commented Aug 4, 2016

Decryptor.framework.zip
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)?
    GOARCH="amd64"
    GOBIN=""
    GOEXE=""
    GOHOSTARCH="amd64"
    GOHOSTOS="darwin"
    GOOS="darwin"
    GOPATH="/Users/AlexSFD/Sn0wfreeze-Dev/GO"
    GORACE=""
    GOROOT="/usr/local/go"
    GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
    GO15VENDOREXPERIMENT="1"
    CC="clang"
    GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fno-common"
    CXX="clang++"
    CGO_ENABLED="1"

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/Cryptocall%20Enterprise.app) 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

@bytex64

This comment has been minimized.

Copy link

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.

@merickson

This comment has been minimized.

Copy link

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.

@dcu

This comment has been minimized.

Copy link

commented Aug 10, 2016

do you think this is related to #16570 ?

@merickson

This comment has been minimized.

Copy link

commented Aug 10, 2016

$5 says it is.

@bytex64

This comment has been minimized.

Copy link

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.

@merickson

This comment has been minimized.

Copy link

commented Aug 10, 2016

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

@dcu

This comment has been minimized.

Copy link

commented Sep 26, 2016

was this fixed? @Sn0wfreezeDev can you confirm?

@Sn0wfreezeDev

This comment has been minimized.

Copy link
Author

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.
You can’t perform that action at this time.