-
Notifications
You must be signed in to change notification settings - Fork 25
Description
Expected behaviour
No exceptions during the computation of Axon annotation values.
Actual behaviour
If we take a good look at Sentry issues (AXONIQ-1R, AXONIQ-1P, AXONIQ-1Q, AXONIQ-1C, AXONIQ-1B) and analyze the stackstrace, it seems that during the computation of annotations the PsiClass has become invalid.
The annotation resolver has two caches; one on allScope, and one on the smaller axonScope. To find library annotations, the allScope is used. This computation becomes invalidates when the vcs modules change (this means libraries have been adjusted).
However, in the stacktrace we see invalid classes being used. There seems to be a race condition between the secondary computation (based on the first one) and the invalidation of the first cache.
Probable solution
Explicitly check whether all PsiClasses in the first cache are valid when retrieving the cache in the secondary computation. Note: We currently do not have a good reproducible test case and it only seems to happen for very few users.