Skip to content

Accessing state(OrNull) during onDispose #4032

Open
@benthillerkus

Description

@benthillerkus

Describe the bug
Accessing state or stateOrNull kicks of internal work that interferes with the cleanup process that runs onDipose. It adds a listener to a list of listeners that is at the same time being iterated over for cleanup, causing a ConcurrentModificationError.

Expected behavior
There should either be an Exception immediately thrown upon accessing state or stateOrNull during onDispose, or during onDipose state and stateOrNull would just return the last state they had, without trying to refresh them.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions