TeamNewPipe / NewPipe

A libre lightweight streaming front-end for Android.
https://newpipe.net
GNU General Public License v3.0
31.36k stars 3.06k forks source link

Reload an imported file results in crash #8590

Open 86ul opened 2 years ago

86ul commented 2 years ago

Checklist

Affected version

0.23.0 (newest according F-Droid).

Steps to reproduce the bug

  1. Install NewPipe on a fresh install of LineageOS 19.1.
  2. Import an existing backup file of 260+ subscriptions successfully
  3. Reload the "What's new" pages
  4. Expecting a crash around (re-)loading 130-50 subscriptions.

Expected behavior

Reload 250+ subscriptions succesfully.

Actual behavior

Failing/crashing during reloading.

Screenshots/Screen recordings

No response

Logs

{"user_action":"requested feed","request":"Loading feed","content_language":"en-BE","content_country":"BE","app_language":"en_BE","service":"none","package":"org.schabi.newpipe","version":"0.23.0","os":"Linux Android 12 - 32","time":"2022-07-07 18:53","exceptions":["java.lang.IllegalStateException: Cannot perform this operation because there is no current transaction.\n\tat android.database.sqlite.SQLiteSession.throwIfNoTransaction(SQLiteSession.java:917)\n\tat android.database.sqlite.SQLiteSession.endTransaction(SQLiteSession.java:400)\n\tat android.database.sqlite.SQLiteDatabase.endTransaction(SQLiteDatabase.java:589)\n\tat androidx.sqlite.db.framework.FrameworkSQLiteDatabase.endTransaction(FrameworkSQLiteDatabase.java:94)\n\tat androidx.room.RoomDatabase.internalEndTransaction(RoomDatabase.java:594)\n\tat androidx.room.RoomDatabase.endTransaction(RoomDatabase.java:584)\n\tat androidx.room.RoomDatabase.runInTransaction(RoomDatabase.java:643)\n\tat org.schabi.newpipe.local.feed.service.FeedLoadManager$DatabaseConsumer.accept(FeedLoadManager.kt:202)\n\tat org.schabi.newpipe.local.feed.service.FeedLoadManager$DatabaseConsumer.accept(FeedLoadManager.kt:199)\n\tat io.reactivex.rxjava3.internal.operators.flowable.FlowableDoOnEach$DoOnEachSubscriber.onNext(FlowableDoOnEach.java:86)\n\tat io.reactivex.rxjava3.internal.operators.flowable.FlowableBuffer$PublisherBufferExactSubscriber.onNext(FlowableBuffer.java:124)\n\tat io.reactivex.rxjava3.internal.operators.flowable.FlowableObserveOn$ObserveOnSubscriber.runAsync(FlowableObserveOn.java:402)\n\tat io.reactivex.rxjava3.internal.operators.flowable.FlowableObserveOn$BaseObserveOnSubscriber.run(FlowableObserveOn.java:176)\n\tat io.reactivex.rxjava3.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:65)\n\tat io.reactivex.rxjava3.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:56)\n\tat java.util.concurrent.FutureTask.run(FutureTask.java:266)\n\tat java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)\n\tat java.lang.Thread.run(Thread.java:920)\n"],"user_comment":"With 260 channels to re-load, around reloading 130-50 channels, I get this crash on a new/fresh installed LOS19.1."}

Affected Android/Custom ROM version

LineageOS 19-20220704-NIGHTLY with MTGapps 12.0

Affected device model

FairPhone 3

Additional information

None

RustyCobalt36 commented 1 year ago

Has there been any fix since last summer? This is recurrent on every import of the database and reload of the "what's new"/subscription feed?

RustyCobalt36 commented 1 year ago

Next day edit: not sure if calyx or newpipe team fixed the issue, but seems to have been fixed

Error still occurs in 25.1 rc release fyi

Exception

android.database.sqlite.SQLiteDatabaseCorruptException: database disk image is malformed (code 779)
    at android.database.sqlite.SQLiteConnection.nativeExecuteForChangedRowCount(Native Method)
    at android.database.sqlite.SQLiteConnection.executeForChangedRowCount(SQLiteConnection.java:913)
    at android.database.sqlite.SQLiteSession.executeForChangedRowCount(SQLiteSession.java:756)
    at android.database.sqlite.SQLiteStatement.executeUpdateDelete(SQLiteStatement.java:67)
    at androidx.sqlite.db.framework.FrameworkSQLiteStatement.executeUpdateDelete(FrameworkSQLiteStatement.java:46)
    at org.schabi.newpipe.database.feed.dao.FeedDAO_Impl.unlinkStreamsOlderThan(FeedDAO_Impl.java:239)
    at org.schabi.newpipe.local.feed.FeedDatabaseManager.removeOrphansOrOlderStreams(FeedDatabaseManager.kt:115)
    at org.schabi.newpipe.local.feed.FeedDatabaseManager.removeOrphansOrOlderStreams$default(FeedDatabaseManager.kt:114)
    at org.schabi.newpipe.local.feed.service.FeedLoadManager.postProcessFeed$lambda-11(FeedLoadManager.kt:179)
    at org.schabi.newpipe.local.feed.service.FeedLoadManager.$r8$lambda$IW8gNMLA_0SrYIHw54GavLkWKsI(FeedLoadManager.kt:0)
    at org.schabi.newpipe.local.feed.service.FeedLoadManager$$ExternalSyntheticLambda11.run(R8$$SyntheticClass:0)
    at io.reactivex.rxjava3.internal.operators.completable.CompletableFromRunnable.subscribeActual(CompletableFromRunnable.java:35)
    at io.reactivex.rxjava3.core.Completable.subscribe(Completable.java:2859)
    at io.reactivex.rxjava3.internal.operators.completable.CompletablePeek.subscribeActual(CompletablePeek.java:51)
    at io.reactivex.rxjava3.core.Completable.subscribe(Completable.java:2859)
    at io.reactivex.rxjava3.internal.operators.completable.CompletableSubscribeOn$SubscribeOnObserver.run(CompletableSubscribeOn.java:64)
    at io.reactivex.rxjava3.core.Scheduler$DisposeTask.run(Scheduler.java:644)
    at io.reactivex.rxjava3.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:65)
    at io.reactivex.rxjava3.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:56)
    at java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:307)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
    at java.lang.Thread.run(Thread.java:1012)