srilakshmikanthanp / clipbirdroid

A Bird that helps you to sync clipboard between devices in your local network - Clipbird Android Version!
https://clipbird.srilakshmikanthanp.com/
MIT License
5 stars 1 forks source link

app restart bug #5

Closed puppet680 closed 5 months ago

puppet680 commented 5 months ago

Device: lg v60

First Question: The app will crash when it is restarted or reopened.

Error content: FATAL EXCEPTION: main Process: com.srilakshmikanthanp.clipbirdroid, PID: 4845 java.lang.NullPointerException at androidx.core.splashscreen.SplashScreenViewProvider$ViewImpl31.getIconView(SplashScreenViewProvider.kt:125) at androidx.core.splashscreen.SplashScreenViewProvider.getIconView(SplashScreenViewProvider.kt:66) at com.srilakshmikanthanp.clipbirdroid.ui.gui.MainActivity$onCreate$1.onSplashScreenExit(MainActivity.kt:190) at androidx.core.splashscreen.SplashScreen$Impl31.setOnExitAnimationListener$lambda-0(SplashScreen.kt:459) at androidx.core.splashscreen.SplashScreen$Impl31.$r8$lambda$_AQ1xSddL7-kLq4WrGTBd4lTQaY(Unknown Source:0) at androidx.core.splashscreen.SplashScreen$Impl31$$ExternalSyntheticLambda0.onSplashScreenExit(Unknown Source:4) at android.window.SplashScreen$SplashScreenManagerGlobal.dispatchOnExitAnimation(SplashScreen.java:271) at android.window.SplashScreen$SplashScreenManagerGlobal.handOverSplashScreenView(SplashScreen.java:258) at android.app.ActivityThread.reportSplashscreenViewShown(ActivityThread.java:4168) at android.app.ActivityThread.lambda$syncTransferSplashscreenViewTransaction$1$android-app-ActivityThread(ActivityThread.java:4185) at android.app.ActivityThread$$ExternalSyntheticLambda5.run(Unknown Source:6) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1319) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1327) at android.view.Choreographer.doCallbacks(Choreographer.java:985) at android.view.Choreographer.doFrame(Choreographer.java:911) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1302) at android.os.Handler.handleCallback(Handler.java:942) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:201) at android.os.Looper.loop(Looper.java:288) at android.app.ActivityThread.main(ActivityThread.java:8022) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:942)

Mainly

// set exit animation splashScreen.setOnExitAnimationListener { it.iconView.animate().setDuration(1000L).withEndAction { it.remove() }.start() }

Second Question: When the app closes the background and clicks on the notification bar, the app will crash.

Error Content: FATAL EXCEPTION: main Process: com.srilakshmikanthanp.clipbirdroid, PID: 17185 java.lang.NullPointerException at androidx.core.splashscreen.SplashScreenViewProvider$ViewImpl31.getIconView(SplashScreenViewProvider.kt:125) at androidx.core.splashscreen.SplashScreenViewProvider.getIconView(SplashScreenViewProvider.kt:66) at com.srilakshmikanthanp.clipbirdroid.ui.gui.MainActivity$onCreate$1.onSplashScreenExit(MainActivity.kt:190) at androidx.core.splashscreen.SplashScreen$Impl31.setOnExitAnimationListener$lambda-0(SplashScreen.kt:459) at androidx.core.splashscreen.SplashScreen$Impl31.$r8$lambda$_AQ1xSddL7-kLq4WrGTBd4lTQaY(Unknown Source:0) at androidx.core.splashscreen.SplashScreen$Impl31$$ExternalSyntheticLambda0.onSplashScreenExit(Unknown Source:4) at android.window.SplashScreen$SplashScreenManagerGlobal.dispatchOnExitAnimation(SplashScreen.java:271) at android.window.SplashScreen$SplashScreenManagerGlobal.handOverSplashScreenView(SplashScreen.java:258) at android.app.ActivityThread.reportSplashscreenViewShown(ActivityThread.java:4678) at android.app.ActivityThread.lambda$syncTransferSplashscreenViewTransaction$1$android-app-ActivityThread(ActivityThread.java:4695) at android.app.ActivityThread$$ExternalSyntheticLambda5.run(Unknown Source:6) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1301) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1309) at android.view.Choreographer.doCallbacks(Choreographer.java:923) at android.view.Choreographer.doFrame(Choreographer.java:847) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1283) at android.os.Handler.handleCallback(Handler.java:942) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:226) at android.os.Looper.loop(Looper.java:313) at android.app.ActivityThread.main(ActivityThread.java:8762) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:604) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)

In the above situation, comment out this line and it will return to normal.

image

srilakshmikanthanp commented 5 months ago

Thanks for raising the issue, Can you provide screen record if possible?

puppet680 commented 5 months ago

https://github.com/srilakshmikanthanp/clipbirdroid/assets/54428441/7459ec70-f857-4f60-a17a-73e03c34ffcd

srilakshmikanthanp commented 5 months ago

Thanks for your quick response I will try to fix it, If you did find the actual problem and know the solution pull requests are always welcome (I didn't have the latest Android version device so It takes a considerable amount of time to test it with an emulator) 😄

If animation is a problem and didn't able to fix it don't bother about removing it :)

srilakshmikanthanp commented 5 months ago

Could you retry with the latest commit?

puppet680 commented 5 months ago

https://github.com/srilakshmikanthanp/clipbirdroid/assets/54428441/d977141a-6c79-48ba-a1eb-3875995c14ac

It has been repaired, but it will take a long time to enter. Click in and a gray border will appear on the status bar.

_cgi-bin_mmwebwx-bin_webwxgetmsgimg__ MsgID=7494924625268216126 skey=@crypt_ad0233f2_247a686e7e1e48f25074b870f94ea3a7 mmweb_appid=wx_webfilehelper

srilakshmikanthanp commented 5 months ago

It is happening in all of your devices or specific devices only, Can you give the device model and Android version.

srilakshmikanthanp commented 5 months ago

Also I have pushed some changes can you try that?

puppet680 commented 5 months ago

Device 1:

Model: Galaxy Note20 Ultra Android Version: Android 13 User Interface: One UI 5.1 Device 2:

Model: LM-V600VM Android Version: Android 13

The entry speed is normal, but the notification bar is still gray.

srilakshmikanthanp commented 5 months ago

Thanks for your support, Hope commit 7095078c0f7766b5bf46f957db94afcdccfc8bdb will fix it, if not please reopen the same issue :)