derTuca / flutter_google_places_picker

Google Places Autocomplete for Flutter
MIT License
18 stars 29 forks source link

Open Place picker from google map screen in android application crashed. #24

Closed dhavalagile closed 5 years ago

dhavalagile commented 5 years ago

I am using google_maps_flutter: ^0.5.19+2 plugin for display list of markers on google map. when I am open place picker to search location on the map to find nearby data. Application crashed in android platform. for ios it is will works fine.

I got below logs when the application crashed.

I/Timeline(28629): Timeline: Activity_launch_request time:878284090 intent:Intent { cmp=com.appdemo/com.google.android.libraries.places.widget.AutocompleteActivity (has extras) }
I/flutter (28629): ======================== Application State : AppLifecycleState.inactive ========================
W/ActivityThread(28629): handleWindowVisibility: no activity for token android.os.BinderProxy@381fed
W/Glide   (28629): Failed to find GeneratedAppGlideModule. You should include an annotationProcessor compile dependency on com.github.bumptech.glide:compiler in your application and a @GlideModule annotated AppGlideModule implementation or LibraryGlideModules will be silently ignored
W/com.a(28629): Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (light greylist, reflection)
W/com.appdemo(28629): Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (light greylist, reflection)
W/Looper  (28629): Slow Looper: doFrame is 486ms late because of 1 msg, msg 1 took 499ms (late=7ms h=android.app.ActivityThread$H w=159)
I/flutter (28629): ├ 🐛 pinInfo.latitude == 28.4636296 pinInfo.longitude == -16.251846699999987
I/flutter (28629): ├ 🐛 markerList :: 1
E/flutter (28629): [ERROR:flutter/shell/platform/android/platform_view_android_jni.cc(39)] java.lang.AbstractMethodError: abstract method "void io.flutter.plugin.platform.PlatformView.onInputConnectionLocked()"
E/flutter (28629):  at io.flutter.plugin.platform.VirtualDisplayController.onInputConnectionLocked(VirtualDisplayController.java:166)
E/flutter (28629):  at io.flutter.plugin.platform.PlatformViewsController.lockInputConnection(PlatformViewsController.java:370)
E/flutter (28629):  at io.flutter.plugin.platform.PlatformViewsController.access$1000(PlatformViewsController.java:36)
E/flutter (28629):  at io.flutter.plugin.platform.PlatformViewsController$1.resizePlatformView(PlatformViewsController.java:165)
E/flutter (28629):  at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.resize(PlatformViewsChannel.java:120)
E/flutter (28629):  at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.onMethodCall(PlatformViewsChannel.java:57)
E/flutter (28629):  at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:222)
E/flutter (28629):  at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:96)
E/flutter (28629):  at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:656)
E/flutter (28629):  at android.os.MessageQueue.nativePollOnce(Native Method)
E/flutter (28629):  at android.os.MessageQueue.next(MessageQueue.java:326)
E/flutter (28629):  at android.os.Looper.loop(Looper.java:165)
E/flutter (28629):  at android.app.ActivityThread.main(ActivityThread.java:6806)
E/flutter (28629):  at java.lang.reflect.Method.invoke(Native Method)
E/flutter (28629):  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
E/flutter (28629):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873)
E/flutter (28629): 
F/flutter (28629): [FATAL:flutter/shell/platform/android/platform_view_android_jni.cc(76)] Check failed: CheckException(env). 
F/libc    (28629): Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 28629 (com.appdemo), pid 28629 (com.appdemo)
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'xiaomi/sakura_india/sakura_india:9/PKQ1.180917.001/V10.3.3.0.PDMMIXM:user/release-keys'
Revision: '0'
ABI: 'arm64'
pid: 28629, tid: 28629, name: com.appdemo  >>> com.appdemo <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Abort message: '[FATAL:flutter/shell/platform/android/platform_view_android_jni.cc(76)] Check failed: CheckException(env). 
'
    x0  0000000000000000  x1  0000000000006fd5  x2  0000000000000006  x3  0000000000000008
    x4  0000000000000000  x5  0000000000000000  x6  0000000000000000  x7  0000000000000080
    x8  0000000000000083  x9  45416e0f91edb7d8  x10 0000000000000000  x11 fffffffc7ffffbdf
    x12 0000000000000001  x13 0000000000000002  x14 ffffffffffffffff  x15 0000000000000000
    x16 000000705b6642b8  x17 000000705b583c50  x18 0000000000000010  x19 0000000000006fd5
    x20 0000000000006fd5  x21 0000007fc96c4548  x22 0000006fd84e4b70  x23 0000006fa795cd18
    x24 0000000000000033  x25 0000007fc96c47f0  x26 000000705e1e95e0  x27 0000000000000033
    x28 0000000000000001  x29 0000007fc96c4530
    sp  0000007fc96c44f0  lr  000000705b5770c4  pc  000000705b5770ec
backtrace:
    #00 pc 00000000000220ec  /system/lib64/libc.so (abort+116)
    #01 pc 00000000011d4c3c  /data/app/com.appdemo-iW9Mg50oJl63h5SeNQP7dA==/lib/arm64/libflutter.so (offset 0x11c0000)
    #02 pc 00000000011c6f9c  /data/app/com.appdemo-iW9Mg50oJl63h5SeNQP7dA==/lib/arm64/libflutter.so (offset 0x11c0000)
    #03 pc 00000000011c549c  /data/app/com.appdemo-iW9Mg50oJl63h5SeNQP7dA==/lib/arm64/libflutter.so (offset 0x11c0000)
    #04 pc 000000000120d9ac  /data/app/com.appdemo-iW9Mg50oJl63h5SeNQP7dA==/lib/arm64/libflutter.so (offset 0x11c0000)
    #05 pc 00000000011d55a8  /data/app/com.appdemo-iW9Mg50oJl63h5SeNQP7dA==/lib/arm64/libflutter.so (offset 0x11c0000)
    #06 pc 00000000011da7c8  /data/app/com.appdemo-iW9Mg50oJl63h5SeNQP7dA==/lib/arm64/libflutter.so (offset 0x11c0000)
    #07 pc 0000000000014ff8  /system/lib64/libutils.so (android::Looper::pollInner(int)+836)
    #08 pc 0000000000014c18  /system/lib64/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+60)
    #09 pc 000000000012708c  /system/lib64/libandroid_runtime.so (android::android_os_MessageQueue_nativePollOnce(_JNIEnv*, _jobject*, long, int)+44)
    #10 pc 0000000000dc5c7c  /system/framework/arm64/boot-framework.oat (offset 0xa28000) (android.media.MediaExtractor.seekTo [DEDUPED]+140)
    #11 pc 000000000000a1bc  /dev/ashmem/dalvik-jit-code-cache (deleted) (android.os.MessageQueue.next+204)
    #12 pc 0000000000556b88  /system/lib64/libart.so (art_quick_invoke_stub+584)
    #13 pc 00000000000cfcc8  /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200)
    #14 pc 0000000000280338  /system/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+344)
    #15 pc 000000000027a34c  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+968)
    #16 pc 000000000052623c  /system/lib64/libart.so (MterpInvokeVirtual+588)
    #17 pc 0000000000549194  /system/lib64/libart.so (ExecuteMterpImpl+14228)
    #18 pc 0000000000bc7684  /system/framework/boot-framework.vdex (android.os.Looper.loop+130)
    #19 pc 0000000000254050  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.2198905147+488)
    #20 pc 0000000000259b44  /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
    #21 pc 000000000027a330  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+940)
    #22 pc 0000000000527740  /system/lib64/libart.so (MterpInvokeStatic+204)
    #23 pc 0000000000549314  /system/lib64/libart.so (ExecuteMterpImpl+14612)
    #24 pc 0000000000422fb2  /system/framework/boot-framework.vdex (android.app.ActivityThread.main+214)
    #25 pc 0000000000254050  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.2198905147+488)
    #26 pc 0000000000516af0  /system/lib64/libart.so (artQuickToInterpreterBridge+1020)
    #27 pc 000000000055fcfc  /system/lib64/libart.so (art_quick_to_interpreter_bridge+92)
    #28 pc 0000000000556e4c  /system/lib64/libart.so (art_quick_invoke_static_stub+604)
    #29 pc 00000000000cfce8  /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+232)
    #30 pc 000000000045db58  /system/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104)
    #31 pc 000000000045f5ac  /system/lib64/libart.so (art::InvokeMethod(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jobject*, _jobject*, unsigned long)+1440)
    #32 pc 00000000003ef2a8  /system/lib64/libart.so (art::Method_invoke(_JNIEnv*, _jobject*, _jobject*, _jobjectArray*)+52)
    #33 pc 000000000078eed4  /system/framework/arm64/boot-core-oj.oat (offset 0x2dc000) (java.lang.Class.getDeclaredMethodInternal [DEDUPED]+180)
    #34 pc 0000000000556b88  /system/lib64/libart.so (art_quick_invoke_stub+584)
    #35 pc 00000000000cfcc8  /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200)
    #36 pc 0000000000280338  /system/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+344)
    #37 pc 000000000027a34c  /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+968)
    #38 pc 000000000052623c  /system/lib64/libart.so (MterpInvokeVirtual+588)
    #39 pc 0000000000549194  /system/lib64/libart.so (ExecuteMterpImpl+14228)
    #40 pc 0000000001285ae0  /system/framework/boot-framework.vdex (com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run+22)
    #41 pc 0000000000254050  /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.2198905147+488)
    #42 pc 0000000000516af0  /system/lib64/libart.so (artQuickToInterpreterBridge+1020)
    #43 pc 000000000055fcfc  /system/lib64/libart.so (art_quick_to_interpreter_bridge+92)
    #44 pc 000000000244f5fc  /system/framework/arm64/boot-framework.oat (offset 0xa28000) (com.android.internal.os.ZygoteInit.main+2028)
    #45 pc 0000000000556e4c  /system/lib64/libart.so (art_quick_invoke_static_stub+604)
    #46 pc 00000000000cfce8  /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+232)
    #47 pc 000000000045db58  /system/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104)
    #48 pc 000000000045d7b8  /system/lib64/libart.so (art::InvokeWithVarArgs(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, std::__va_list)+424)
    #49 pc 0000000000362be8  /system/lib64/libart.so (art::JNI::CallStaticVoidMethodV(_JNIEnv*, _jclass*, _jmethodID*, std::__va_list)+652)
    #50 pc 00000000000b23f4  /system/lib64/libandroid_runtime.so (_JNIEnv::CallStaticVoidMethod(_jclass*, _jmethodID*, ...)+116)
    #51 pc 00000000000b4f90  /system/lib64/libandroid_runtime.so (android::AndroidRuntime::start(char const*, android::Vector<android::String8> const&, bool)+924)
    #52 pc 0000000000002528  /system/bin/app_process64 (main+2012)
    #53 pc 00000000000c86f4  /system/lib64/libc.so (__libc_init+88)
Lost connection to device.
dhavalagile commented 5 years ago

finally, I solve my issues. ontheinputconnection method implementation missing in google map plugin for platform view.


    public void onInputConnectionLocked() {

    }

    @Override
    public void onInputConnectionUnlocked() {

    }```
pmrajani commented 4 years ago

@dhavalagile can you show me where exactly you were add this? i am suffering same issue

dhavalagile commented 4 years ago

Hi @pmrajani, the actual issue in GoogleMapController.java file. In Flutter google map is render using PlatformView Widget. and onInputConnectionLocked, onInputConnectionUnlocked implementation missing for Google Map. so the issues came when open place picker while google map is active.

I had to find out issues from here.