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/cmd/gomobile: jar file mylib.java crash with no error in line _init(); #43811

Open
mohamadpk opened this issue Jan 20, 2021 · 2 comments
Labels
mobile Android, iOS, and x/mobile NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@mohamadpk
Copy link

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

$ go version
go version go1.15.7 windows/amd64

Does this issue reproduce with the latest release?

no i check this with multi gomobile and golang version and ndk version and sdk version and .....a week

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

go env Output
$ go env
set GO111MODULE=auto
set GOARCH=amd64
set GOBIN=D:\Important\GO-Home\bin
set GOCACHE=C:\Users\mohamadpk\AppData\Local\go-build
set GOENV=C:\Users\mohamadpk\AppData\Roaming\go\env
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=D:\Important\GO-PATH\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=D:\Important\GO-PATH
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=D:\Important\GO-Home
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=D:\Important\GO-Home\pkg\tool\windows_amd64
set GCCGO=gccgo
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=D:\Important\GO-PATH\src\github.com\fatedier\frp\go.mod
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\MOHAMA~1\AppData\Local\Temp\go-build766140558=/tmp/go-build -gno-record-gcc-switches

What did you do?

i create a frpclib.go contain

package frpclib
func main() {

}

//export Run My frpclib
func Run(cfgFilePath string) {

}

then compile with

gomobile bind -v -o frpclib.aar -target=android

then export two file with no error
1.frpclib.aar
2.frpclib-sources.jar
then i add this lib to my android application
and call in java like this

String mConfigPath="aaaaaaa";
Frpclib.run(mConfigPath);

in emulator work with api 25 android 7 and 30 android 11

What did you expect to see?

just call and open myactivity

What did you see instead?

crash application

what happened?

in file frpclib-sources.jar
after unzip i see tree folder
in folder frpclib and file Frpclib.java
after Seq.touch(); in _init(); crash application i edit this file and create jar again
with try and catch.but nothings happened.ignore the catch and crash again

gobuild work correctly .i test it on another project.
gobind crash and crash and crash.!!!!!!!!!

@mohamadpk
Copy link
Author

mohamadpk commented Jan 20, 2021

work correct in virtual machine.why dos now work on new physical machine

@dmitshur dmitshur changed the title gomobile jar file mylib.java crash with no error in line _init(); x/mobile/cmd/gomobile: jar file mylib.java crash with no error in line _init(); Jan 20, 2021
@gopherbot gopherbot added the mobile Android, iOS, and x/mobile label Jan 20, 2021
@dmitshur dmitshur added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. and removed mobile Android, iOS, and x/mobile labels Jan 20, 2021
@gopherbot gopherbot added this to the Unreleased milestone Jan 20, 2021
@dmitshur dmitshur added the mobile Android, iOS, and x/mobile label Jan 20, 2021
@mohamadpk
Copy link
Author

@dmitshur i check all web and this repo issue (open and close).i can not find duplicate issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mobile Android, iOS, and x/mobile NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

3 participants