smartlook / smartlook-mobile-issue-tracker

Official Smartlook issue tracker for mobile SDKs
4 stars 0 forks source link

Crash: Fatal Exception: java.util.ConcurrentModificationException #127

Closed nacho007 closed 2 years ago

nacho007 commented 2 years ago

Platform Android

Technology native, Kotlin

Build instructions [optional]

Rendering [optional]

Affected devices [optional] All

Smartlook SDK version 1.8.9 and 1.8.8

Summary

It appears that the crash occurs when SmartLook SDK is initialized.

Steps to reproduce [optional] Opening the app

Example Project [optional]

Relevant logs and/or screenshots

Fatal Exception: java.util.ConcurrentModificationException at java.util.ArrayList$Itr.next(ArrayList.java:860) at com.smartlook.t8.a(t8.java:62) at com.smartlook.u8.a(u8.java:48) at com.smartlook.u8.a(u8.java:18) at com.smartlook.lf.a(lf.java:407) at com.smartlook.lf.a(lf.java:355) at com.smartlook.lf.a(lf.java:351) at com.smartlook.t7.a(t7.java:61) at com.smartlook.sc$a.a(sc.java:5) at com.smartlook.wc$b.a(wc.java:10) at com.smartlook.xc.a(xc.java:3) at com.smartlook.wc$b.a(wc.java:146) at com.smartlook.xc.a(xc.java:4) at com.smartlook.wc$b$a.invokeSuspend(wc.java:1) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(BaseContinuationImpl.java:33) at com.smartlook.t0.run(t0.java:28) at com.smartlook.v4$a.run(v4.java:590)

SenNeonoveNoci commented 2 years ago

Hello @nacho007,

thanks for your report, I'm working on a fix and keep you updated.

SenNeonoveNoci commented 2 years ago

@nacho007 I have identified the issue, I will prepare a build with a fix for you. It will be out tomorrow.

SenNeonoveNoci commented 2 years ago

@nacho007 I'm so sorry for the delay, but here is a fixed build for you:

implementation 'com.smartlook.recording:app:1.8.10-native-internal-log'
nacho007 commented 2 years ago

Hi there, now we are having a crash when the app is signed in release mode and this function is called: private fun scrollDown() { val executor: ScheduledExecutorService = Executors.newSingleThreadScheduledExecutor() executor.schedule( { binding.svMainContent.fullScroll(View.FOCUS_DOWN) }, 500L, TimeUnit.MILLISECONDS ) }

This function is for scrolling automatically some content when an edit text gains focus. Data: Model:Pixel 4a (5G), Version:Android 12, Orientation: Portrait.

Crash:

Fatal Exception: java.lang.NullPointerException: oldFocus must not be null at com.smartlook.j5$e.onGlobalFocusChanged(j5.java:7) at android.view.ViewTreeObserver.dispatchOnGlobalFocusChange(ViewTreeObserver.java:1040) at android.view.View.handleFocusGainInternal(View.java:7776) at android.view.View.requestFocusNoSearch(View.java:13540) at android.view.View.requestFocus(View.java:13514) at android.view.View.requestFocus(View.java:13481) at android.view.View.requestFocus(View.java:13423) at android.view.View.onTouchEvent(View.java:15951) at android.widget.TextView.onTouchEvent(TextView.java:11162) at android.view.View.dispatchTouchEvent(View.java:14540) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3120) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2801) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3120) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2801) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3120) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2801) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3120) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2801) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3120) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2801) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3120) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2801) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3120) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2801) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3120) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2801) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3120) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2801) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3120) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2801) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3120) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2801) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3120) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2801) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3120) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2801) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3120) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2801) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3120) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2801) at com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:502) at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1890) at android.app.Activity.dispatchTouchEvent(Activity.java:4195) at androidx.appcompat.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:69) at com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:460) at android.view.View.dispatchPointerEvent(View.java:14799) at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:6359) at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:6160) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5638) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:5695) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:5661) at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:5826) at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:5669) at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:5883) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5642) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:5695) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:5661) at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:5669) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5642) at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:8574) at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:8525) at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:8494) at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:8697) at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:259) at android.os.MessageQueue.nativePollOnce(MessageQueue.java) at android.os.MessageQueue.next(MessageQueue.java:335) at android.os.Looper.loopOnce(Looper.java:161) at android.os.Looper.loop(Looper.java:288) at android.app.ActivityThread.main(ActivityThread.java:7839) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)

SenNeonoveNoci commented 2 years ago

@nacho007 Let me look into this and fix it.

SenNeonoveNoci commented 2 years ago

@nacho007 Can you please try this build:

implementation 'com.smartlook.recording:app:1.8.10-native-focus-null

It should fix your issue. Also all the fixes I have posted here would be included in an official release of the SDK next Monday/Tuesday.

František Spurný Android developer