greenrobot / EventBus

Event bus for Android and Java that simplifies communication between Activities, Fragments, Threads, Services, etc. Less code, better quality.
http://greenrobot.org/eventbus/
Apache License 2.0
24.67k stars 4.66k forks source link

NullPointerException at ConcurrentHashMap.get #719

Closed lyusid closed 11 months ago

lyusid commented 11 months ago

I found an NullPointerException when I post an event with appCoroutineDispatchers.io when I use the lastest version 3.3.1

Here is the error info: java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.Object.hashCode()' on a null object reference at j$.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:0) at j$.util.concurrent.ConcurrentHashMap.containsKey(ConcurrentHashMap.java:0) at org.simple.eventbus.EventBus$EventDispatcher.getMatchedEventTypes(EventBus.java:393) at org.simple.eventbus.EventBus$EventDispatcher.deliveryEvent(EventBus.java:363) at org.simple.eventbus.EventBus$EventDispatcher.dispatchEvents(EventBus.java:351) at org.simple.eventbus.EventBus.post(EventBus.java:189)

greenrobot-team commented 11 months ago

The stack trace you have given uses classes from the org.simple.eventbus package. However, this library is in the org.greenrobot.eventbus package. Are you sure this is the same library?