Repeat background does not work
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Domain
- mobile, performance
Research direction
The repro steps are in the issue, but the attached log is an OutOfMemoryError while decoding stroke points, not a background-rendering trace. Start with the decode path in EncodePolyline.kt (decode), StrokePointConverter.kt (decodeStrokePoints) and Db.kt (Converters.toStrokePoints), reached through PageDao_Impl.getPageWithDataById. Reproduce on a notebook with the repeat-background image, then check whether the missing background on subpage 2 and the OOM share a cause. Done means the background repeats on subpage 2 without the crash.
Written by the indexing model from the issue text.
Description
Describe the bug
When using an image as background there is an option "Repeat background". In v0.2.6 this does not work.
To Reproduce
Steps to reproduce the behavior:
- Create a new notebook and open it
- Open "Change Background", go to Image
- Select an image and activate "Repeat background"
- Close modal and scroll down to subpage 2
- No background on subpage 2 🤷
Logs from the app
──── crash_1791642201663_1.txt ────
thread=DefaultDispatcher-worker-12
java.lang.OutOfMemoryError: Failed to allocate a 32 byte allocation with 508400 free bytes and 496KB until OOM, target footprint 268435456, growth limit 268435456; giving up on allocation because <1% of heap free after GC.
at java.util.ArrayList.iterator(ArrayList.java:834)
at com.ethran.notable.data.db.EncodePolylineKt.decode(EncodePolyline.kt:117)
at com.ethran.notable.data.db.StrokePointConverterKt.getDecodedListFloat(StrokePointConverter.kt:418)
at com.ethran.notable.data.db.StrokePointConverterKt.decodeStrokePoints(StrokePointConverter.kt:360)
at com.ethran.notable.data.db.Converters.toStrokePoints(Db.kt:51)
at com.ethran.notable.data.db.PageDao_Impl.__fetchRelationshipStrokeAscomEthranNotableDataDbStroke(PageDao_Impl.kt:615)
at com.ethran.notable.data.db.PageDao_Impl.getPageWithDataById$lambda$0(PageDao_Impl.kt:313)
at com.ethran.notable.data.db.PageDao_Impl$$ExternalSyntheticLambda6.invoke(D8$$SyntheticClass:0)
at androidx.room.util.DBUtil__DBUtil_androidKt$performSuspending$lambda$1$$inlined$internalPerform$1$1.invokeSuspend(DBUtil.kt:61)
at androidx.room.util.DBUtil__DBUtil_androidKt$performSuspending$lambda$1$$inlined$internalPerform$1$1.invoke(Unknown Source:8)
at androidx.room.util.DBUtil__DBUtil_androidKt$performSuspending$lambda$1$$inlined$internalPerform$1$1.invoke(Unknown Source:4)
at androidx.room.coroutines.PassthroughConnection.transaction(PassthroughConnectionPool.kt:127)
at androidx.room.coroutines.PassthroughConnection.access$transaction(PassthroughConnectionPool.kt:77)
at androidx.room.coroutines.PassthroughConnection$withTransaction$2.invokeSuspend(PassthroughConnectionPool.kt:103)
at androidx.room.coroutines.PassthroughConnection$withTransaction$2.invoke(Unknown Source:8)
at androidx.room.coroutines.PassthroughConnection$withTransaction$2.invoke(Unknown Source:2)
at androidx.room.RoomDatabaseKt__RoomDatabase_androidKt.compatTransactionCoroutineExecute(RoomDatabase.android.kt:2187)
at androidx.room.RoomDatabaseKt.compatTransactionCoroutineExecute(Unknown Source:1)
at androidx.room.RoomDatabase$createConnectionManager$3.invoke(RoomDatabase.android.kt:338)
at androidx.room.RoomDatabase$createConnectionManager$3.invoke(RoomDatabase.android.kt:338)
at androidx.room.coroutines.PassthroughConnection.withTransaction(PassthroughConnectionPool.kt:103)
at androidx.room.util.DBUtil__DBUtil_androidKt$performSuspending$lambda$1$$inlined$internalPerform$1.invokeSuspend(DBUtil.kt:59)
at androidx.room.util.DBUtil__DBUtil_androidKt$performSuspending$lambda$1$$inlined$internalPerform$1.invoke(Unknown Source:8)
at androidx.room.util.DBUtil__DBUtil_androidKt$performSuspending$lambda$1$$inlined$internalPerform$1.invoke(Unknown Source:4)
at androidx.room.coroutines.PassthroughConnectionPool$useConnection$2.invokeSuspend(PassthroughConnectionPool.kt:59)
at androidx.room.coroutines.PassthroughConnectionPool$useConnection$2.invoke(Unknown Source:8)
at androidx.room.coroutines.PassthroughConnectionPool$useConnection$2.invoke(Unknown Source:4)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:42)
at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:164)
at kotlinx.coroutines.BuildersKt.withContext(Unknown Source:1)
at androidx.room.coroutines.PassthroughConnectionPool.useConnection(PassthroughConnectionPool.kt:59)
at androidx.room.RoomConnectionManager.useConnection(RoomConnectionManager.android.kt:138)
at androidx.room.RoomDatabase.useConnection(RoomDatabase.android.kt:619)
at androidx.room.util.DBUtil__DBUtil_androidKt$performSuspending$$inlined$compatCoroutineExecute$DBUtil__DBUtil_androidKt$1.invokeSuspend(DBUtil.android.kt:261)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:34)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:101)
at androidx.room.TransactionExecutor.execute$lambda$1$lambda$0(TransactionExecutor.android.kt:38)
at androidx.room.TransactionExecutor$$ExternalSyntheticLambda0.run(D8$$SyntheticClass:0)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:920)
Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@364ad9e, Dispatchers.Default]
- Dominant language
- Kotlin
- Stars
- 269
- Forks
- 44
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 22
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Ethran/notable
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
[AI] Line tool saves raw pen pressure (clamped to full pressure)Possibly taken @kal-kaliper claimed this 1 day ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
Maintainers usually reply within 1 day
-
Editor burger menuOpenbug
Difficulty 3/5 1-2 days Newbie friendliness 55/100
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
Maintainers usually reply within 1 day
-
[Feature Suggestion] Independent Zoom Controls: Decouple Zoom-In from Zoom-Out (with 1.0x Snap)Open
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Maintainers usually reply within 1 day
Similar issues
-
area:data-quality importer size:S
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
enorm-labs/event-junkie#5136 ·
Maintainers usually reply within 1 day
-
0. Needs triage bug
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
Maintainers usually reply within 1 day
-
Type: Possible bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
spacecowboy/Feeder#1318 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
wangzan101/Mika#644 ·
Maintainers usually reply within 1 day
-
good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
commons-app/apps-android-commons#7341 ·
Maintainers usually reply within 1 day