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

ServiceLoader$LazyIterator.nextService NullPointerException #1515

Closed
SJLBenjamin opened this issue May 15, 2023 · 2 comments
Closed

ServiceLoader$LazyIterator.nextService NullPointerException #1515

SJLBenjamin opened this issue May 15, 2023 · 2 comments

Comments

@SJLBenjamin
Copy link

java.lang.NullPointerException
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:454)
at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:371)
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:416)
at java.util.ServiceLoader$1.next(ServiceLoader.java:494)
at c80.e1(SourceFile:5)
at c80.u(SourceFile:1)
at c80$s0.invokeSuspend(SourceFile:16)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(SourceFile:4)
at zf.run(SourceFile:22)
at by.run(SourceFile:2)
at kn0.run(SourceFile:1)
at ic.k(SourceFile:1)
at ic$c.d(SourceFile:4)
at ic$c.n(SourceFile:4)
at ic$c.run(SourceFile:1)
Suppressed: lf: [il0{Cancelling}@c9238bc, Dispatchers.IO]

@cpovirk
Copy link
Member

cpovirk commented May 16, 2023

I'm not entirely sure what the problem is, but I suspect it's not specific to AutoService. My best guess would be that two threads are trying to iterate over the same ServiceLoader Iterator at the same time. If you need more help, I suggest trying Stack Overflow, ideally with a stack trace from an app that hasn't been minified and with some of the source code.

@cpovirk cpovirk closed this as completed May 16, 2023
@eamonnmcmanus
Copy link
Member

This is presumably about AutoService rather than AutoValue, but I agree with @cpovirk that the problem is very likely to be elsewhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants