nova-video-player / aos-AVP

NOVA opeN sOurce Video plAyer: main repository to build them all
Apache License 2.0
3.49k stars 201 forks source link

[Bug]: App hanging/crashing when browsing Episodes by date #605

Open mschumacher69 opened 2 years ago

mschumacher69 commented 2 years ago

Problem description

I use nova with an SMB server that auto re-scans on every app launch. This used to work flawlessly in the past, but not anymore.

Now, whenever I browse Episodes by date, I cannot play anything unless it finishes a scanning cycle without any changes to the database because it crashes if I visit Episodes by date while it's updating the library. For example if I try to play a file while the database is being updated, it circles, even the file info such as the subtitles and media info would be circling. And if I access the network section during this time, I wouldn't see my indexed folders, even though the SMB itself is there and accessible. And if I keep browsing under Episodes by date while it's refreshing the library, the app crashes to a blue screen and restarts.

Any idea what might be causing this?

Steps to reproduce the issue

  1. Start Nova.
  2. Go to Episodes by date while it's scanning and try to play a file or just browse in there or sit on that view without doing anything.
  3. If you manage to play a file before it crashes, it would circle forever or crash into a blue screen and restart and if you just browse in there or just stay in this view and don't do anything, it would crash into a blue screen and restart.
  4. You wouldn't be able to go to Episodes by date without a crash unless you wait for it to finish scanning and then go to Episodes by date. The successful visit would always have to be after a blank scan that doesn't add/remove anything from the library. So for example, if it scans and adds/removes something from the library, browsing Episodes by date after the scan would crash Nova. Only the next visit after a scan would be successful as long as the last scan didn't add/remove anything from the library.

Expected behavior

You should be able to browse Episodes by date and play files without the app crashing.

Your phone/tablet/androidTV model

Sony Bravia Android TV and Chromecast with Google TV

Operating system version

Android 9 / Android 12

Application version and app store

Latest Version from the Play Store and latest version from GitHub

Additional system information

No response

Debug logs

Not sure how to capture logs on Android TV.

courville commented 9 months ago

@Pentaphon, I am able to reproduce @mschumacher69 crash. It is just not easy to fix without creating a bunch of other regressions.

Pentaphon commented 9 months ago

@courville understood. I simply wanted to get more info from him like the source of the SMB server to see what device he is connecting to as a possible factor and also point him towards using SMBJ as a possible workaround since his crash occurred before SMBJ was introduced. It sounds like this crash is affecting his regular usage and I wanted to see if he could work around it himself in the meantime instead of waiting for a fix.

mschumacher69 commented 9 months ago

@Pentaphon thanks, but I don't believe my crash is related to smb because it only happens when I browse episodes by date while the database is refreshing.

Pentaphon commented 9 months ago

I don't believe my crash is related to smb because it only happens when I browse episodes by date while the database is refreshing.

Are you sure it is wise to assume that? You said your setup auto-rescans so SMB is definitely being used, If I were you, I'd at least try a clean install of Nova, connect via SMBJ and see if it still happens. It's been nearly 2 years since you reported this issue, so why not just try it? Maybe you will be surprised.

mschumacher69 commented 9 months ago

Yes I'm sure because @courville can replicate my issue and he knows what's causing it and it's related to the databse refresh in the episodes by date view, not smb, but fixing it is not easy. If it were related to smb he would have told me. I have tried clean installs several times but they don't fix the issue.

Anyway, I am going to try smbj, but not to fix this issue, but to try to fix another issue I'm facing.

mschumacher69 commented 9 months ago

To explain my issue further, you can't go to Episodes by date without a crash unless you wait for it to finish scanning and then go to Episodes by date. The successful visit would always have to be after a blank scan that doesn't add/remove anything from the library. So for example, if it scans and adds/removes something from the library, browsing Episodes by date after the scan would crash Nova. Only the next visit after a scan would be successful as long as the last scan didn't add/remove anything from the library.

mschumacher69 commented 9 months ago

@courville I just re-read the whole thread and noticed that you did seem to fix it at one point in one of the test builds with commit 1f3381d, did this commit never make it to the stable release?