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

Search box results in app crash #69

Closed
3 tasks done
joejoe135791 opened this issue Nov 13, 2024 · 26 comments
Closed
3 tasks done

Search box results in app crash #69

joejoe135791 opened this issue Nov 13, 2024 · 26 comments
Labels
bug Something isn't working

Comments

@joejoe135791
Copy link

Problem description

Whenever I use the search box, click on a result and attempt to back out, the app crashes

Steps to reproduce

Go to search
Search anything and click a result
Use the back button to back out of that result

App version

2.0.2

Android version

14

Device information

OnePlus 9 pro

Attachments and Logs

Record_2024-11-12-23-46-38.mp4

Acknowledgements

  • I have searched the open and closed issues and this is NOT a duplicate.
  • I'm using the latest version of the app.
  • I have provided all required information.
@joejoe135791 joejoe135791 added the bug Something isn't working label Nov 13, 2024
@joejoe135791
Copy link
Author

I also just figured out how to export the logs if this helps

Kitsune_2024-11-12_23-54-11.txt

@Drumber
Copy link
Owner

Drumber commented Nov 13, 2024

Thanks, the logs helped a lot.

Unfortunately, I couldn't reproduce the error on an emulator running Android 14. So, I'm not sure if the issue is just related to specific devices.

Based on the stack trace from the logs your shared, I might have an idea what could cause the crash. Can you check if the error is fixed running this debug build: https://github.com/Drumber/Kitsune/actions/runs/11822426352/artifacts/2183328420
(Don't be confused, the debug build has the same name and logo as the release app. You may uninstall it later.)

@joejoe135791
Copy link
Author

I am still encountering the same issue with the debug build you sent above. If anything, it's even faster at crashing

Kitsune_2024-11-13_09-40-38.txt

@joejoe135791
Copy link
Author

looking at the debug log lines 141 and 142 are showing missing files, could that be the reason for the crash?

@Drumber
Copy link
Owner

Drumber commented Nov 13, 2024

looking at the debug log lines 141 and 142 are showing missing files, could that be the reason for the crash?

Thats okay, just some system warning during the install.

The crash is caused by these lines (something related to the fragment not being attached to an activity during onDestroyView)

11-13 09:40:08.047 30722 30722 E AndroidRuntime: java.lang.IllegalStateException: Fragment's view can't be accessed. Fragment isn't added
11-13 09:40:08.047 30722 30722 E AndroidRuntime: 	at by.kirich1409.viewbindingdelegate.LifecycleViewBindingProperty.getValue(ViewBindingProperty.kt:87)
11-13 09:40:08.047 30722 30722 E AndroidRuntime: 	at by.kirich1409.viewbindingdelegate.FragmentViewBindingProperty.getValue(FragmentViewBindings.kt:63)
11-13 09:40:08.047 30722 30722 E AndroidRuntime: 	at by.kirich1409.viewbindingdelegate.FragmentViewBindingProperty.getValue(FragmentViewBindings.kt:52)
11-13 09:40:08.047 30722 30722 E AndroidRuntime: 	at io.github.drumber.kitsune.ui.main.MainFragment.getBinding(MainFragment.kt:30)
11-13 09:40:08.047 30722 30722 E AndroidRuntime: 	at io.github.drumber.kitsune.ui.main.MainFragment.onDestroyView(MainFragment.kt:128)

Could you try this build and share the logs if it crashes: https://github.com/Drumber/Kitsune/actions/runs/11823001992/artifacts/2183510313

@joejoe135791
Copy link
Author

It's working for now (other than the occasional leaks pop up). I've been messing with it for a little bit and it's not crashing. Would you like the log?

@Drumber
Copy link
Owner

Drumber commented Nov 13, 2024

That's great news! Would be helpfull if you could share the logs (a last time ^^). I'm just curious what's going on here. Might be a bug related to the fragment lifecycle breaking the ViewBindingDelegrate library I'm using.

@joejoe135791
Copy link
Author

Here's the newest log for you.
Kitsune_2024-11-13_10-22-55.txt

Leaks was also finding other leaks but I assume that's just because it's a debug build and not related to my first issue

@Drumber
Copy link
Owner

Drumber commented Nov 13, 2024

Thanks for your help! I've published a pre-release with the fix. You can download it from here.

If you encounter any other issues, feel free to re-open this issue or create a new one,

@Drumber Drumber closed this as completed Nov 13, 2024
@joejoe135791
Copy link
Author

Thanks so much for the help.

I also just noticed, this was issue number #69. Nice lol

Anyways, have a good one

@joejoe135791
Copy link
Author

joejoe135791 commented Nov 13, 2024

Just updated any while it's not a major issue. Every time I launch the app it's telling me to "upgrade" to version 2.0.2

@Drumber
Copy link
Owner

Drumber commented Nov 13, 2024

Yeah well, I need to improve the update checker. It's just comparing the current version with the latest release on GitHub. And since 2.0.3 is a pre-release (and not the latest stable release) it's telling you there is an update.

You may want to disable the update checker in the settings until the next stable release. Sry for that...

@joejoe135791
Copy link
Author

The update fixed it from happening every time however I'm still getting a few crashes
Kitsune_2024-11-13_11-41-45.txt

@Drumber Drumber reopened this Nov 13, 2024
@Drumber
Copy link
Owner

Drumber commented Nov 13, 2024

Thanks for providing the logs. Seems like this might be a bigger problem. I will look into it when I've more time.

@Drumber
Copy link
Owner

Drumber commented Nov 13, 2024

@joejoe135791 did you have any problems with v2.0.1?

@joejoe135791
Copy link
Author

No, I did not encounter this issue on version 2.0.1

@Drumber
Copy link
Owner

Drumber commented Nov 13, 2024

Just out of curiosity, did you enable predictive back animations in the android developer options?

Besides updating the compile SDK of the app to 35 (Android 15) and opting-in to predictive-back-navigation, there weren't any big changes that could cause this bug.

@joejoe135791
Copy link
Author

joejoe135791 commented Nov 13, 2024

Predictive back animations is currently disabled and I'm only on android 14

@Drumber
Copy link
Owner

Drumber commented Nov 14, 2024

Okay, I've done some bigger code changes and I think the root cause of the crash should be fixed now.

Unfortuanate I still could not reproduce the crash on any device/emulator I have at hand. So, it would be great if you could test this build again and report back if you find any crashes/bugs: https://github.com/Drumber/Kitsune/actions/runs/11842451101/artifacts/2189041831
Edit: https://github.com/Drumber/Kitsune/actions/runs/11842763322/artifacts/2189146845 (I forgot to include a minor change)

@joejoe135791
Copy link
Author

It's still crashing, a quick peak is showing that it's something else related to the searchbar

Kitsune_2024-11-14_10-38-27.txt
Kitsune_2024-11-14_10-39-30.txt

@Drumber
Copy link
Owner

Drumber commented Nov 15, 2024

Looks like the crash is now caused by an edge case where some delayed/async code is accessing a view while the fragment (search screen) got destroyed.

I'm still not sure what is causing these strange view lifecycle problems on your device. I have tried to force the occurrence of the crash in some test scenarios, but no luck so far...

Once again, it would be great if you could test this build and let me know if you are still experiencing crashes: https://github.com/Drumber/Kitsune/actions/runs/11859089583/artifacts/2193742475

@joejoe135791
Copy link
Author

joejoe135791 commented Nov 15, 2024

I think I found out what's causing it. If I click a show that isn't fully loaded and back out before it completely loads (image, banner, etc.), it crashes.

Kitsune_2024-11-15_08-10-47.txt

Edit: please ignore above. I just noticed that it was not the newest build, I will update the logs asap

@joejoe135791
Copy link
Author

My previous message I accidentally opened prerelease 2.0.3 instead of the debug build. After messing with the debug build for around 10 minutes, I haven't encountered any major crashes (I was going so fast I accidentally edited the app though). I will update with more info if I crash. Until then, here's the log

Kitsune_2024-11-15_08-20-45.txt

Everything I tried that crashed the other versions,

  • Exiting an anime that's currently loading
  • Exiting and opening another show in quick succession (several times)

@Drumber
Copy link
Owner

Drumber commented Nov 17, 2024

Hi @joejoe135791, is the build stable so far, no further crashes?

@joejoe135791
Copy link
Author

Yes, I have experienced any crashes with the experimental build

@Drumber
Copy link
Owner

Drumber commented Nov 18, 2024

Thanks again for your help. I've published a new release v2.0.4 which includes the fix.

If you encounter any other problems, feel free to post it here (if related) or open a new issue.

@Drumber Drumber closed this as completed Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants