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

google_maps_flutter and flutter_unity_widget crash Surface Texture #534

Closed
shifugate opened this issue Feb 9, 2022 · 2 comments
Closed
Labels
android This issue is specific to the Android Platform. bug This issue refers to a bug in the plugin

Comments

@shifugate
Copy link

Hello everyone, sorry about my english.

I am using google_maps_flutter: ^2.1.1 and flutter_unity_widget: ^4.2.5+1 in same project.

The problem:

After going to arcore in unity and return to google maps in flutter, the app freezes because the surfacetexture isn´t release by unity widget.

Any workround for this?

Thanks.

Error in Android Studio:

W/PlatformViewsController(22732): Creating a virtual display of size: [1080, 2400] may result in problems(flutter/flutter#2897 is larger than the device screen size: [1080, 2161].
E/SentirEstarrej(22732): [SurfaceTexture-0-22732-0] attachToContext: SurfaceTexture is already attached to a context
E/flutter (22732): [ERROR:flutter/fml/platform/android/jni_util.cc(211)] java.lang.RuntimeException: Error during attachToGLContext (see logcat for details)
E/flutter (22732): at android.graphics.SurfaceTexture.attachToGLContext(SurfaceTexture.java:309)
E/flutter (22732): at io.flutter.embedding.engine.renderer.SurfaceTextureWrapper.attachToGLContext(SurfaceTextureWrapper.java:57)
E/flutter (22732):
F/flutter (22732): [FATAL:flutter/shell/platform/android/platform_view_android_jni_impl.cc(1301)] Check failed: fml::jni::CheckException(env).
I/flutter (22732): onPending - -
I/Counters(22732): exceeded sample count in FrameTime
E/CRASH (22732): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
E/CRASH (22732): Version '2020.3.27f1 (e759542391ea)', Build type 'Release', Scripting Backend 'il2cpp', CPU 'arm64-v8a'
E/CRASH (22732): Build fingerprint: 'OPPO/CPH2247EEA/OP4F7FL1:11/RKQ1.201105.002/1636640770240:user/release-keys'
E/CRASH (22732): Revision: '0'
E/CRASH (22732): ABI: 'arm64'
E/CRASH (22732): Timestamp: 2022-02-09 11:04:39+0000
E/CRASH (22732): pid: 22732, tid: 22792, name: 1.raster >>> xx.xx.mypackage <<<
E/CRASH (22732): uid: 10426
E/CRASH (22732): signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
E/CRASH (22732): x0 0000000000000000 x1 0000000000005908 x2 0000000000000006 x3 0000006ec65e1e50
E/CRASH (22732): x4 fefeff091f2d2875 x5 fefeff091f2d2875 x6 fefeff091f2d2875 x7 7f7f7f7f7f7f7f7f
E/CRASH (22732): x8 00000000000000f0 x9 1eeb5b5b7bbe1ebd x10 0000000000000000 x11 ffffffc0fffffbdf
E/CRASH (22732): x12 0000000000000001 x13 000000000000007e x14 001b93219f568fe8 x15 0000000034155555
E/CRASH (22732): x16 0000006fc1ce87e0 x17 0000006fc1cc8da0 x18 0000006eb9818000 x19 00000000000058cc
E/CRASH (22732): x20 0000000000005908 x21 00000000ffffffff x22 0000006ecde65198 x23 0000006f2bade8a8
E/CRASH (22732): x24 0000006f2b04d9c0 x25 0000000000000001 x26 0000000000000001 x27 0000000000000001
E/CRASH (22732): x28 0000000000000067 x29 0000006ec65e1ed0
E/CRASH (22732): sp 0000006ec65e1e30 lr 0000006fc1c7c460 pc 0000006fc1c7c48c
E/CRASH (22732): backtrace:
E/CRASH (22732): #00 pc 000000000007848c /apex/com.android.runtime/lib64/bionic/libc.so (abort+164) (BuildId: 0715cd996ed13b978a9d423e36fa1026)
E/CRASH (22732): #1 pc 0000000001509740 /data/app/~~8Gp5qKoOxlGeCpBb2EkW_Q==/xx.xx.mypackage-l7NPZAGrqCjoH9Fr8_qyjg==/base.apk (BuildId: c42c6209986a10065da91c022954abcc47cb6c46)
E/CRASH (22732): #2 pc 000000000152b79c /data/app/~~8Gp5qKoOxlGeCpBb2EkW_Q==/xx.xx.mypackage-l7NPZAGrqCjoH9Fr8_qyjg==/base.apk (BuildId: c42c6209986a10065da91c022954abcc47cb6c46)
D/WindowManager(22732): Add to mViews: DecorView@23f700b[MainActivity],pkg= xx.xx.mypackage
V/OplusZoomWindowDecorViewHelper(22732): setLastReportedMergedConfiguration mZoomDisplayHeight: 2400 getDecorView.DecorView@23f700b[MainActivity]

@juicycleff
Copy link
Owner

Hmmm, this is interesting, taking a look at it.

@juicycleff juicycleff added bug This issue refers to a bug in the plugin android This issue is specific to the Android Platform. labels Feb 9, 2022
@shifugate
Copy link
Author

Hello again.

I resolved the problem.

I add in app initialization:
AndroidGoogleMapsFlutter.useAndroidViewSurface = true;

This append the maps in others native android.view.View to the view hierarchy.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android This issue is specific to the Android Platform. bug This issue refers to a bug in the plugin
Projects
None yet
Development

No branches or pull requests

2 participants