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

OOM while processing big (~ 16 MB) vCard with photo #1072

Closed
rfc2822 opened this issue Oct 14, 2024 · 1 comment · Fixed by #1073
Closed

OOM while processing big (~ 16 MB) vCard with photo #1072

rfc2822 opened this issue Oct 14, 2024 · 1 comment · Fixed by #1073
Assignees
Labels
bug Something isn't working dependent

Comments

@rfc2822
Copy link
Member

rfc2822 commented Oct 14, 2024

EXCEPTION
java.lang.OutOfMemoryError: Failed to allocate a 215310008 byte allocation with 25165824 free bytes and 198MB until OOM, target footprint 219737864, growth limit 402653184
	at java.util.Arrays.copyOf(Arrays.java:3257)
	at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:124)
	at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:448)
	at java.lang.StringBuilder.append(StringBuilder.java:137)
	at at.bitfire.vcard4android.Contact.toString(Contact.kt:306)
	at java.lang.String.valueOf(String.java:2924)
	at java.lang.StringBuilder.append(StringBuilder.java:132)
	at at.bitfire.davdroid.log.PlainTextFormatter.format(PlainTextFormatter.kt:179)
	at at.bitfire.davdroid.log.LogcatHandler.publish(LogcatHandler.kt:18)
	at java.util.logging.Logger.log(Logger.java:738)
	at java.util.logging.Logger.doLog(Logger.java:765)
	at java.util.logging.Logger.log(Logger.java:831)
	at at.bitfire.davdroid.sync.ContactsSyncManager.processCard$lambda$17(ContactsSyncManager.kt:217)
	at at.bitfire.davdroid.sync.ContactsSyncManager.$r8$lambda$s7ETLQCedCegyWP_56T3kxbkrb0(ContactsSyncManager.kt:1)
	at at.bitfire.davdroid.sync.ContactsSyncManager$$ExternalSyntheticLambda7.invoke(R8$$SyntheticClass:11)
	at at.bitfire.davdroid.sync.SyncException$Companion.wrapWithLocalResource(SyncException.kt:6)
	at at.bitfire.davdroid.sync.ContactsSyncManager.processCard(ContactsSyncManager.kt:94)
	at at.bitfire.davdroid.sync.ContactsSyncManager.downloadRemote$lambda$14$lambda$13$lambda$12(ContactsSyncManager.kt:127)
	at at.bitfire.davdroid.sync.ContactsSyncManager.$r8$lambda$e4c-H8NhRYgAIEzaJeY37h0NEGM(ContactsSyncManager.kt:1)
	at at.bitfire.davdroid.sync.ContactsSyncManager$$ExternalSyntheticLambda2.invoke(R8$$SyntheticClass:5)
	at at.bitfire.davdroid.sync.SyncException$Companion.wrapWithRemoteResource(SyncException.kt:6)
	at at.bitfire.davdroid.sync.ContactsSyncManager.downloadRemote$lambda$14$lambda$13(ContactsSyncManager.kt:29)
	at at.bitfire.davdroid.sync.ContactsSyncManager.$r8$lambda$H6TqEfx3vbd8oFTviywqXNxb93g(ContactsSyncManager.kt:1)
	at at.bitfire.davdroid.sync.ContactsSyncManager$$ExternalSyntheticLambda1.onResponse(R8$$SyntheticClass:3)
	at at.bitfire.dav4jvm.Response$Companion.parse(Response.kt:326)
	at at.bitfire.dav4jvm.DavResource.processMultiStatus$parseMultiStatus(DavResource.kt:51)
	at at.bitfire.dav4jvm.DavResource.processMultiStatus(DavResource.kt:16)
	at at.bitfire.dav4jvm.DavResource.processMultiStatus(DavResource.kt:9)
	at at.bitfire.dav4jvm.DavAddressBook.multiget(DavAddressBook.kt:69)
	at at.bitfire.davdroid.sync.ContactsSyncManager.downloadRemote$lambda$14(ContactsSyncManager.kt:60)
	at at.bitfire.davdroid.sync.ContactsSyncManager.$r8$lambda$gsWcnsK5UnkzIVMyBv9g3onX_S0(ContactsSyncManager.kt:1)
	at at.bitfire.davdroid.sync.ContactsSyncManager$$ExternalSyntheticLambda0.invoke(R8$$SyntheticClass:5)
	at at.bitfire.davdroid.sync.SyncException$Companion.wrapWithRemoteResource(SyncException.kt:6)
	at at.bitfire.davdroid.sync.ContactsSyncManager.downloadRemote(ContactsSyncManager.kt:54)
	at at.bitfire.davdroid.sync.SyncManager$syncRemote$1$download$1.invokeSuspend(SyncManager.kt:14)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:9)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:111)
	at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:145)
	at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source:105)
	at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source:3)
	at at.bitfire.davdroid.sync.SyncManager.syncRemote(SyncManager.kt:39)
	at at.bitfire.davdroid.sync.SyncManager.performSync(SyncManager.kt:277)
	at at.bitfire.davdroid.sync.AddressBookSyncer.syncAddressBook(AddressBookSyncer.kt:174)
	at at.bitfire.davdroid.sync.AddressBookSyncer.syncCollection(AddressBookSyncer.kt:7)
	at at.bitfire.davdroid.sync.AddressBookSyncer.syncCollection(AddressBookSyncer.kt:1)
	at at.bitfire.davdroid.sync.Syncer.sync(Syncer.kt:223)
	at at.bitfire.davdroid.sync.Syncer.invoke(Syncer.kt:211)
	at at.bitfire.davdroid.sync.worker.BaseSyncWorker$doSyncWork$2.invokeSuspend$lambda$0(BaseSyncWorker.kt:1)
	at at.bitfire.davdroid.sync.worker.BaseSyncWorker$doSyncWork$2.$r8$lambda$MnrEU1_WtQZTTPjmMRztfG3Y7fo(BaseSyncWorker.kt:1)
	at at.bitfire.davdroid.sync.worker.BaseSyncWorker$doSyncWork$2$$ExternalSyntheticLambda0.invoke(R8$$SyntheticClass:3)
	at kotlinx.coroutines.InterruptibleKt$runInterruptible$2.invokeSuspend(Interruptible.kt:75)
	at kotlinx.coroutines.InterruptibleKt$runInterruptible$2.invoke(Interruptible.kt:13)
	at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:5)
	at kotlinx.coroutines.BuildersKt.withContext(Unknown Source:41)
	at kotlinx.coroutines.InterruptibleKt.runInterruptible$default(Interruptible.kt:9)
	at at.bitfire.davdroid.sync.worker.BaseSyncWorker$doSyncWork$2.invokeSuspend(BaseSyncWorker.kt:326)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:9)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:111)
	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:929)

Depends on bitfireAT/vcard4android#45

Copy link

github-actions bot commented Oct 14, 2024

This PR/issue depends on:

@rfc2822 rfc2822 linked a pull request Oct 14, 2024 that will close this issue
4 tasks
@sunkup sunkup moved this from Todo to In Progress in DAVx⁵ Releases Oct 15, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in DAVx⁵ Releases Oct 15, 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 dependent
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant