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

PlainTextFormatter: toString on null object reference #1080

Closed
rfc2822 opened this issue Oct 18, 2024 · 0 comments · Fixed by #1081
Closed

PlainTextFormatter: toString on null object reference #1080

rfc2822 opened this issue Oct 18, 2024 · 0 comments · Fixed by #1081
Assignees
Labels
bug Something isn't working urgent should be done soon

Comments

@rfc2822
Copy link
Member

rfc2822 commented Oct 18, 2024

Random crashes like this:

EXCEPTION
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.Object.toString()' on a null object reference
	at at.bitfire.davdroid.log.PlainTextFormatter.format(PlainTextFormatter.kt:188)
	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.SyncManager.performSync(SyncManager.kt:460)
	at at.bitfire.davdroid.sync.AddressBookSyncer.syncAddressBook(AddressBookSyncer.kt:152)
	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.syncCollectionContents$davx5_404030003_4_4_3_gplayRelease(Syncer.kt:59)
	at at.bitfire.davdroid.sync.Syncer.sync$davx5_404030003_4_4_3_gplayRelease(Syncer.kt:36)
	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:58)
	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:44)
	at kotlinx.coroutines.InterruptibleKt.runInterruptible$default(Interruptible.kt:9)
	at at.bitfire.davdroid.sync.worker.BaseSyncWorker$doSyncWork$2.invokeSuspend(BaseSyncWorker.kt:325)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:9)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:107)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
	at java.lang.Thread.run(Thread.java:1012)

Seems to come from the PlainTextFormatter when format() is called with an argument that is null.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working urgent should be done soon
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant