episodes icon indicating copy to clipboard operation
episodes copied to clipboard

App will "get stuck" while refreshing some series

Open robinpaulson opened this issue 1 year ago • 24 comments

For example, it refreshes the first ten series in my list, then hangs (I left it for 1hr) on "American horror story". When I remove that from the list and refresh the shows again, it hangs on "ashes to ashes". Removing that, refreshing again makes it hang on "Babylon Berlin".

robinpaulson avatar Apr 23 '23 07:04 robinpaulson

Is this on v0.16.0? I tried adding all three shows on a fresh install and it worked for me.

red-coracle avatar Apr 23 '23 14:04 red-coracle

Yes, latest version.

robinpaulson avatar Apr 23 '23 20:04 robinpaulson

After removing them, i readded and refreshed again. It hangs st the same point.

robinpaulson avatar Apr 23 '23 20:04 robinpaulson

Are you able to upload a backup file and/or the ADB log output from when you refresh?

red-coracle avatar Apr 24 '23 16:04 red-coracle

FATAL EXCEPTION: main Process: com.redcoracle.episodes, PID: 12220 java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference at android.preference.PreferenceManager.getDefaultSharedPreferencesName(PreferenceManager.java:537) at android.preference.PreferenceManager.getDefaultSharedPreferences(PreferenceManager.java:526) at r3.e.(SourceFile:8) at com.redcoracle.episodes.b$c.(Unknown Source:11) at com.redcoracle.episodes.b.y(SourceFile:12) at androidx.fragment.app.i0.a(SourceFile:42) at androidx.fragment.app.i0.k(SourceFile:140) at androidx.fragment.app.b0.M(SourceFile:58) at androidx.fragment.app.b0.t(SourceFile:34) at androidx.fragment.app.t.onStart(SourceFile:34) at f.h.onStart(Unknown Source:0) at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1391) at android.app.Activity.performStart(Activity.java:7165) at android.app.ActivityThread.handleStartActivity(ActivityThread.java:2975) at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:180) at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:165) at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:142) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:70) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1816) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:6718) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:491) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

robinpaulson avatar Apr 27 '23 11:04 robinpaulson

I get this, or similar, a lot. android.database.sqlite.SQLiteException: near "WHERE": syntax error (code 1 SQLITE_ERROR): , while compiling: UPDATE episodes SET tmdb_id=?,overview=?,episode_number=?,show_id=?,name=?,season_number=?, WHERE _id=12995

robinpaulson avatar Apr 27 '23 13:04 robinpaulson

Also this: (1) near "WHERE": syntax error

robinpaulson avatar Apr 27 '23 13:04 robinpaulson

I get the last two errors for each of the problematic shows listed above. I assume "_id" matches those in the tmdb db. 12995, 12581, 11215. I can't tell what about those shows is causing the failure though

robinpaulson avatar Apr 27 '23 13:04 robinpaulson

I wonder if it's related to the first_aired column being empty? The hangs appear to happen when that's the case. Possibly

robinpaulson avatar Apr 27 '23 13:04 robinpaulson

These shows also cause the app to hang: American horror story Ashes to ashes Babylon Berlin Black books Black mirror Bottom Coupling Fargo Father ted Friday night dinner I'm Alan partridge Jonathan creek Life on mars Lost Malcolm in the middle Mr robot Oliver Stone's untold history of the united states Party down Person of interest Roots Seinfeld

They all appear to have "specials" with no info or date.

robinpaulson avatar Apr 28 '23 11:04 robinpaulson

I can provide more info, let me know which

robinpaulson avatar May 04 '23 08:05 robinpaulson

Sorry, my time has been in short supply as of late. I think there are potentially two issues here: the first stacktrace is about a null context when getting the shared preferences, while the SQL error is because there's a comma directly before the WHERE keyword. I've not been able to reproduce either issue though. I've tried adding those shows to a new 0.16.0 install as well as upgrading from 0.15.1 and not had any errors.

red-coracle avatar Jun 01 '23 00:06 red-coracle

I could provide my db export, but don't think I can upload it here?

robinpaulson avatar Jun 01 '23 10:06 robinpaulson

I can email it, if you provide an address?

robinpaulson avatar Jun 02 '23 02:06 robinpaulson

I'll add you to a temporary private repo where you can upload it.

red-coracle avatar Jun 06 '23 23:06 red-coracle

I couldn't get that to work. I only have access to GitHub via an android app, so no repo interactions beyond issues.

robinpaulson avatar Jun 15 '23 08:06 robinpaulson

I can confirm the issue and expand on the list of "problematic" series: A droid story American Horror Story Arrow Ayakashi Triangle Dr. Stone Hawaii-Five O Lando Star Trek: Discovery Star Trek: Picard Star Trek: Strange New Worlds Star Wars: The clone Wars Supernatural The Acolyte The Expanse Titans

It seems like it's not only "specials" without date, but also regular episodes if they have no airing date (yet).

WingerathM avatar Aug 02 '23 00:08 WingerathM

@WingerathM, are you able to upload a copy of a database exhibiting the behaviour? I have several of those shows added myself and haven't encountered issues.

red-coracle avatar Oct 18 '23 03:10 red-coracle

episodes_2024-01-22_1505.db.zip Here's a copy of my db, as exported via the app.

robin-paulson avatar Feb 08 '24 06:02 robin-paulson

It seems like it's not only "specials" without date, but also regular episodes if they have no airing date (yet).

Yes, I see this behaviour too. "Orphan Black: Echoes" fails; it has no dates yet

robin-paulson avatar Feb 08 '24 06:02 robin-paulson

Hi, do you think you'll get a chance to look at the db export I posted? Thanks

robin-paulson avatar Mar 13 '24 11:03 robin-paulson

I opened the db export in an sqlite viewer, to see if there were any obvious inconsistencies which might cause the hang. This is what I found:

  • In the "episodes" table, most of the shows have "1" in the "watched" field; some have "0"; some have NULL. I'm not sure what the latter means.
  • 68 of the entries in the "episodes" table have a "first_aired" date less than 0. These aired in the 1960s, so i suspect this is how the app/tmdb deals with pre-UNIX epoch (1970) times.
  • Many of the episodes either don't have a tmdb entry, or don't have a tvdb entry.
  • A small number of the shows don't have a tmdb entry, or don't have a tvdb entry
  • The notes column doesn't have any entries; I'm not sure what it does.
  • 2,000+ of the episodes (out of 7,000) have NULL in the language column. The rest are blank.

robin-paulson avatar Mar 25 '24 20:03 robin-paulson

I'm going to edit the db, then import it into episodes, see what happens. First step, I'll remove NULL from the language column,

robin-paulson avatar Mar 27 '24 03:03 robin-paulson

The episodes without a language are the same as those which don't have a tvdb_id.

robin-paulson avatar Apr 06 '24 03:04 robin-paulson