You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A race condition can happen:
- Thread 1: `#writeProgressBar` is called due to
`LoadingPhaseStartedEvent`, expecting `buildStatus` to be
`TARGET_PATTERN_PARSING`
- Main thread: `LoadingPhaseCompleteEvent` arrives. **`buildStatus` is
set to `LOADING_COMPLETE`**. additionalMessage is not yet updated and is
still null.
- Thread 1: Seeing that `buildStatus` is now `LOADING_COMPLETE`, it
moves forward with that code path => NPE when `additionMessage` is
checked.
To fix this NPE, the CL made 2 changes:
1. Synchronize methods that touch `buildStatus`
2. Default `additionalMessage` to an empty string to make the code more
robust.
PiperOrigin-RevId: 640061798
Change-Id: I5034fe7692e0641559fb7666eec09cb554e09545
#23484
Forked from #23483
The text was updated successfully, but these errors were encountered: