Skip to content

[BUG] "file text mismatch" during bean search — SpringSearchService.searchBeanPsiClassesByAnnotations #232

@imuromtsev

Description

@imuromtsev

Summary

High-volume RuntimeExceptionWithAttachments: file text mismatch thrown from Spring bean search by annotations. ~64 events across 7 Sentry issues in the last 30 days — the largest crash cluster for the plugin.

Where

  • SpringSearchService.searchBeanPsiClassesByAnnotationsSpringSearchService.kt:438 (also :195)
  • NativeBootUtils.psiClass
  • Reached from multiple call sites: SpringDependsOnBeanInspection.kt:43, SpringLookupBeanInspection.kt:47, SpringBeanLineMarkerProvider.kt:75

Exception

com.intellij.openapi.util.RuntimeExceptionWithAttachments: file text mismatch — PSI/document/stub out of sync: search reads PSI whose text no longer matches the current document.

Sentry (project 4 / spring-plugin, last 30d)

Suggested direction (hypothesis, not yet verified in source)

PSI is likely cached across a document change and used without re-resolving against the current stub/text. Re-validate against current PSI inside a proper read action, or re-resolve from stubs instead of holding stale PSI.

Filed from Sentry (project 4 / spring-plugin), last 30 days. Auto-triaged.

Metadata

Metadata

Assignees

No one assigned

    Labels

    in:spring-coreSpring Core or Spring Boot Core issues

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions