golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
124.07k stars 17.68k forks source link

x/mobile: Crash gomobile-app with gomobile bind #25293

Closed hajimehoshi closed 6 years ago

hajimehoshi commented 6 years ago

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

go version go1.10 darwin/amd64

Does this issue reproduce with the latest release?

Yes

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

GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/hajimehoshi/Library/Caches/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/hajimehoshi/go"
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/7t/qw3np69559591s1v0mk5_p1m0000gn/T/go-build010345027=/tmp/go-build -gno-record-gcc-switches -fno-common"

--

Sorry but I've not created a minimized test case, but I failed to run my project https://github.com/hajimehoshi/go-inovation (63d0406fb5bfad3e7e13ba2b39af57dd9dac9611) with the latest gomobile...

05-09 02:46:05.971 3948-3948/? A/art: art/runtime/java_vm_ext.cc:470] JNI DETECTED ERROR IN APPLICATION: JNI FindClass called with pending exception java.lang.NoSuchMethodError: no non-static method "Lgo/Universe$proxyerror;.<init>(I)V"
    art/runtime/java_vm_ext.cc:470]   at void go.Universe._init() (Universe.java:-2)
    art/runtime/java_vm_ext.cc:470]   at void go.Universe.<clinit>() (Universe.java:12)
    art/runtime/java_vm_ext.cc:470]   at void go.Universe.touch() (Universe.java:18)
    art/runtime/java_vm_ext.cc:470]   at void go.Seq.<clinit>() (Seq.java:39)
    art/runtime/java_vm_ext.cc:470]   at void go.Seq.touch() (Seq.java:45)
    art/runtime/java_vm_ext.cc:470]   at void com.hajimehoshi.goinovation.mobile.Mobile.<clinit>() (Mobile.java:11)
    art/runtime/java_vm_ext.cc:470]   at boolean com.hajimehoshi.goinovation.mobile.Mobile.isRunning() (Mobile.java:-2)
    art/runtime/java_vm_ext.cc:470]   at void com.hajimehoshi.goinovation.EbitenGLSurfaceView.onLayout(boolean, int, int, int, int) (EbitenGLSurfaceView.java:94)
    art/runtime/java_vm_ext.cc:470]   at void android.view.View.layout(int, int, int, int) (View.java:17641)
    art/runtime/java_vm_ext.cc:470]   at void android.widget.RelativeLayout.onLayout(boolean, int, int, int, int) (RelativeLayout.java:1079)
    art/runtime/java_vm_ext.cc:470]   at void android.view.View.layout(int, int, int, int) (View.java:17641)
    art/runtime/java_vm_ext.cc:470]   at void android.view.ViewGroup.layout(int, int, int, int) (ViewGroup.java:5575)
    art/runtime/java_vm_ext.cc:470]   at void android.widget.FrameLayout.layoutChildren(int, int, int, int, boolean) (FrameLayout.java:323)
    art/runtime/java_vm_ext.cc:470]   at void android.widget.FrameLayout.onLayout(boolean, int, int, int, int) (FrameLayout.java:261)
    art/runtime/java_vm_ext.cc:470]   at void android.view.View.layout(int, int, int, int) (View.java:17641)
    art/runtime/java_vm_ext.cc:470]   at void android.view.ViewGroup.layout(int, int, int, int) (ViewGroup.java:5575)
    art/runtime/java_vm_ext.cc:470]   at void android.widget.LinearLayout.setChildFrame(android.view.View, int, int, int, int) (LinearLayout.java:1741)
    art/runtime/java_vm_ext.cc:470]   at void android.widget.LinearLayout.layoutVertical(int, int, int, int) (LinearLayout.java:1585)
    art/runtime/java_vm_ext.cc:470]   at void android.widget.LinearLayout.onLayout(boolean, int, int, int, int) (LinearLayout.java:1494)
    art/runtime/java_vm_ext.cc:470]   at void android.view.View.layout(int, int, int, int) (View.java:17641)
    art/runtime/java_vm_ext.cc:470]   at void android.view.ViewGroup.layout(int, int, int, int) (ViewGroup.java:5575)
    art/runtime/java_vm_ext.cc:470]   at void android.widget.FrameLayout.layoutChildren(int, int, int, int, boolean) (FrameLayout.java:323)
    art/runtime/java_vm_ext.cc:470]   at void android.widget.FrameLayout.onLayout(boolean, int, int, int, int) (FrameLayout.java:261)
    art/runtime/java_vm_ext.cc:470]   at void android.view.View.layout(int, int, int, int) (View.java:17641)
    art/runtime/java_vm_ext.cc:470]   at void android.view.ViewGroup.layout(int, int, int, int) (ViewGroup.java:5575)
    art/runtime/java_vm_ext.cc:470]   at void android.widget.LinearLayout.setChildFrame(android.view.View, int, int, int, int) (LinearLayout.java:1741)
    art/runtime/java_vm_ext.cc:470]   at void android.widget.LinearLayout.layoutVertical(int, int, int, int) (LinearLayout.java:1585)
    art/runtime/java_vm_ext.cc:470]   at void android.widget.LinearLayout.onLayout(boolean, int, int, int, int) (LinearLayout.java:1494)
    art/runtime/java_vm_ext.cc:470]   at void android.view.View.layout(int, int, int, int) (View.java:17641)
    art/runtime/java_vm_ext.cc:470]   at void android.view.ViewGroup.layout(int, int, int, int) (ViewGroup.java:5575)
    art/runtime/java_vm_ext.cc:470]   at void android.widget.FrameLayout.layoutChildren(int, int, int, int, boolean) (FrameLayout.java:323)
    art/runtime/java_vm_ext.cc:470]   at void android.widget.FrameLayout.onLayout(boolean, int, int, int, int) (FrameLayout.java:261)
    art/runtime/java_vm_ext.cc:470]   at void com.android.internal.policy.DecorView.onLayout(boolean, int, int, int, int) (DecorView.java:727)
    art/runtime/java_vm_ext.cc:470]   at void android.view.View.layout(int, int, int, int) (View.java:17641)
    art/runtime/java_vm_ext.cc:470]   at void android.view.ViewGroup.layout(int, int, int, int) (ViewGroup.java:5575)
    art/runtime/java_vm_ext.cc:470]   at void android.view.ViewRootImpl.performLayout(android.view.WindowManager$LayoutParams, int, int) (ViewRootImpl.java:2346)
    art/runtime/java_vm_ext.cc:470]   at void android.view.ViewRootImpl.performTraversals() (ViewRootImpl.java:2068)
    art/runtime/java_vm_ext.cc:470]   at void android.view.ViewRootImpl.doTraversal() (ViewRootImpl.java:1254)
    art/runtime/java_vm_ext.cc:470]   at void android.view.ViewRootImpl$TraversalRunnable.run() (ViewRootImpl.java:6344)
    art/runtime/java_vm_ext.cc:470]   at void android.view.Choreographer$CallbackRecord.run(long) (Choreographer.java:874)
    art/runtime/java_vm_ext.cc:470]   at void android.view.Choreographer.doCallbacks(int, long) (Choreographer.java:686)
    art/runtime/java_vm_ext.cc:470]   at void android.view.Choreographer.doFrame(long, int) (Choreographer.java:621)
    art/runtime/java_vm_ext.cc:470]   at void android.view.Choreographer$FrameDisplayEventReceiver.run() (Choreographer.java:860)
    art/runtime/java_vm_ext.cc:470]   at void android.os.Handler.handleCallback(android.os.Message) (Handler.java:751)
    art/runtime/java_vm_ext.cc:470]   at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:95)
    art/runtime/java_vm_ext.cc:470]   at void android.os.Looper.loop() (Looper.java:154)
    art/runtime/java_vm_ext.cc:470]   at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6121)
    art/runtime/java_vm_ext.cc:470]   at java.lang.Object java.lang.reflect.Method.invoke!(java.lang.Object, java.lang.Object[]) (Method.java:-2)
    art/runtime/java_vm_ext.cc:470]   at void com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run() (ZygoteInit.java:889)
    art/runtime/java_vm_ext.cc:470]   at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:779)
hajimehoshi commented 6 years ago

That's strange, but now my app worked correctly without any changes... Maybe build cache caused some problems? 🤔