yandexmobile / yandexmapkit-android

Yandex Map Kit for Android
161 stars 65 forks source link

ArrayIndexOutOfBoundsException при изменении размера компонента с картой. #240

Closed neyron91 closed 7 years ago

neyron91 commented 7 years ago

Здравствуйте. Проблема актуальна только при использовании тега "static". Также проблема проявляется только на определенных версиях adnroid, например на 4.4.x и 5.1.0. На 6.0.0 и 4.1.1 работает корректно. Стектрейс:

java.lang.ArrayIndexOutOfBoundsException: length=4; index=4
                                                                  at ru.yandex.yandexmapkit.map.TiledSurface.d(Unknown Source)
                                                                  at ru.yandex.yandexmapkit.map.TiledSurface.a(Unknown Source)
                                                                  at ru.yandex.yandexmapkit.MapController.sizeChanged(Unknown Source)
                                                                  at ru.yandex.yandexmapkit.MapStaticView.onSizeChanged(Unknown Source)
                                                                  at android.view.View.sizeChange(View.java:14932)
                                                                  at android.view.View.setFrame(View.java:14905)
                                                                  at android.view.View.layout(View.java:14813)
                                                                  at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1055)
                                                                  at android.view.View.layout(View.java:14817)
                                                                  at android.view.ViewGroup.layout(ViewGroup.java:4631)
                                                                  at android.support.v4.view.ViewPager.onLayout(ViewPager.java:1695)
                                                                  at android.view.View.layout(View.java:14817)
                                                                  at android.view.ViewGroup.layout(ViewGroup.java:4631)
                                                                  at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1055)
                                                                  at android.view.View.layout(View.java:14817)
                                                                  at android.view.ViewGroup.layout(ViewGroup.java:4631)
                                                                  at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)
                                                                  at android.widget.FrameLayout.onLayout(FrameLayout.java:388)
                                                                  at android.view.View.layout(View.java:14817)
                                                                  at android.view.ViewGroup.layout(ViewGroup.java:4631)
                                                                  at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1671)
                                                                  at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1525)
                                                                  at android.widget.LinearLayout.onLayout(LinearLayout.java:1434)
                                                                  at android.view.View.layout(View.java:14817)
                                                                  at android.view.ViewGroup.layout(ViewGroup.java:4631)
                                                                  at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)
                                                                  at android.widget.FrameLayout.onLayout(FrameLayout.java:388)
                                                                  at android.view.View.layout(View.java:14817)
                                                                  at android.view.ViewGroup.layout(ViewGroup.java:4631)
                                                                  at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1671)
                                                                  at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1525)
                                                                  at android.widget.LinearLayout.onLayout(LinearLayout.java:1434)
                                                                  at android.view.View.layout(View.java:14817)
                                                                  at android.view.ViewGroup.layout(ViewGroup.java:4631)
                                                                  at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)
                                                                  at android.widget.FrameLayout.onLayout(FrameLayout.java:388)
                                                                  at android.view.View.layout(View.java:14817)
                                                                  at android.view.ViewGroup.layout(ViewGroup.java:4631)
                                                                  at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1671)
                                                                  at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1525)
                                                                  at android.widget.LinearLayout.onLayout(LinearLayout.java:1434)
                                                                  at android.view.View.layout(View.java:14817)
                                                                  at android.view.ViewGroup.layout(ViewGroup.java:4631)
                                                                  at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)
                                                                  at android.widget.FrameLayout.onLayout(FrameLayout.java:388)
                                                                  at android.view.View.layout(View.java:14817)
                                                                  at android.view.ViewGroup.layout(ViewGroup.java:4631)
                                                                  at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:1983)
                                                                  at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1740)
                                                                  at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:996)
                                                                  at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5600)
                                                                  at android.view.Choreographer$CallbackRecord.run(Choreographer.java:761)
                                                                  at android.view.Choreographer.doCallbacks(Choreographer.java:574)
                                                                  at android.view.Choreographer.doFrame(Choreographer.java:544)
                                                                  at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:747)
                                                                  at android.os.Handler.handleCallback(Handler.java:733)
                                                                  at android.os.Handler.dispatchMessage(Handler.java:95)
                                                                  at android.os.Looper.loop(Looper.java:136)
                                                                  at android.app.ActivityThread.main(ActivityThread.java:5001)
                                                                  at java.lang.reflect.Method.invokeNative(Native Method)
                                                                  at java.lang.reflect.Method.invoke(Method.java:515)
                                                                  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
                                                                  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
                                                                  at dalvik.system.NativeStart.main(Native Method)

Как проявляется: Есть две "панели", сверху карта, снизу в контейнере содержится EditText. При нажатии на EditText появляется клавиатура, тем самым сдвигается нижний контейнер выше, тем самым уменьшая в размерах карту. Если нижний контейнер полностью вытесняет карту, то вылетает ArrayIndexOutOfBoundsException (при то что значения length все время разное).

saint13 commented 7 years ago

Спасибо будем исследовать.

12 декабря 2016 г., 9:17 пользователь neyron91 notifications@github.com написал:

Здравствуйте. Проблема актуальна только при использовании тега "static". Также проблема проявляется только на определенных версиях adnroid, например на 4.4.x и 5.1.0. На 6.0.0 и 4.1.1 работает корректно. Стектрейс:

java.lang.ArrayIndexOutOfBoundsException: length=4; index=4 at ru.yandex.yandexmapkit.map.TiledSurface.d(Unknown Source) at ru.yandex.yandexmapkit.map.TiledSurface.a(Unknown Source) at ru.yandex.yandexmapkit.MapController.sizeChanged(Unknown Source) at ru.yandex.yandexmapkit.MapStaticView.onSizeChanged(Unknown Source) at android.view.View.sizeChange(View.java:14932) at android.view.View.setFrame(View.java:14905) at android.view.View.layout(View.java:14813) at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1055) at android.view.View.layout(View.java:14817) at android.view.ViewGroup.layout(ViewGroup.java:4631) at android.support.v4.view.ViewPager.onLayout(ViewPager.java:1695) at android.view.View.layout(View.java:14817) at android.view.ViewGroup.layout(ViewGroup.java:4631) at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1055) at android.view.View.layout(View.java:14817) at android.view.ViewGroup.layout(ViewGroup.java:4631) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453) at android.widget.FrameLayout.onLayout(FrameLayout.java:388) at android.view.View.layout(View.java:14817) at android.view.ViewGroup.layout(ViewGroup.java:4631) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1671) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1525) at android.widget.LinearLayout.onLayout(LinearLayout.java:1434) at android.view.View.layout(View.java:14817) at android.view.ViewGroup.layout(ViewGroup.java:4631) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453) at android.widget.FrameLayout.onLayout(FrameLayout.java:388) at android.view.View.layout(View.java:14817) at android.view.ViewGroup.layout(ViewGroup.java:4631) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1671) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1525) at android.widget.LinearLayout.onLayout(LinearLayout.java:1434) at android.view.View.layout(View.java:14817) at android.view.ViewGroup.layout(ViewGroup.java:4631) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453) at android.widget.FrameLayout.onLayout(FrameLayout.java:388) at android.view.View.layout(View.java:14817) at android.view.ViewGroup.layout(ViewGroup.java:4631) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1671) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1525) at android.widget.LinearLayout.onLayout(LinearLayout.java:1434) at android.view.View.layout(View.java:14817) at android.view.ViewGroup.layout(ViewGroup.java:4631) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453) at android.widget.FrameLayout.onLayout(FrameLayout.java:388) at android.view.View.layout(View.java:14817) at android.view.ViewGroup.layout(ViewGroup.java:4631) at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:1983) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1740) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:996) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5600) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:761) at android.view.Choreographer.doCallbacks(Choreographer.java:574) at android.view.Choreographer.doFrame(Choreographer.java:544) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:747) at android.os.Handler.handleCallback(Handler.java:733) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:5001) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601) at dalvik.system.NativeStart.main(Native Method)

Как проявляется: Есть две "панели", сверху карта, снизу в контейнере содержится EditText. При нажатии на EditText появляется клавиатура, тем самым сдвигается нижний контейнер выше, тем самым уменьшая в размерах карту. Если нижний контейнер полностью вытесняет карту, то вылетает ArrayIndexOutOfBoundsException (при то что значения length все время разное).

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/yandexmobile/yandexmapkit-android/issues/240, or mute the thread https://github.com/notifications/unsubscribe-auth/ABSEm4-HJCmaxxrWikWPaOcxGTJU9a4Jks5rHObfgaJpZM4LKN9A .

saint13 commented 7 years ago

Проверяйте

neyron91 commented 7 years ago

Ошибка повторяется на 5.0.0, 5.1.0, 4.4.4, 4.3. java.lang.ArrayIndexOutOfBoundsException: length=67081; index=67081 at ru.yandex.yandexmapkit.map.TiledSurface.d(Unknown Source) at ru.yandex.yandexmapkit.map.TiledSurface.a(Unknown Source) at ru.yandex.yandexmapkit.MapController.sizeChanged(Unknown Source) at ru.yandex.yandexmapkit.MapStaticView.onSizeChanged(Unknown Source) at android.view.View.sizeChange(View.java:15786)

На 4.2.2, 4.1.1, 6.0.0 все ок

neyron91 commented 7 years ago

Результаты проверки: ошибка все равно повторяется, см. предыдущий комментарий.

saint13 commented 7 years ago

Спасибо будем смотреть.

saint13 commented 7 years ago

Если Вам вышлю тестовую версию с логами, сможете прислать логи?

neyron91 commented 7 years ago

Да, смогу, высылайте.