Skip to content

Conversation

@exyi
Copy link
Member

@exyi exyi commented Dec 15, 2025

It would crash on: JsonTypeInfo metadata for type '...' was not provided by TypeInfoResolver...

I still do not understand completely why this happens. It seems something is initializing the TypeInfoResolver when it's not set by us, but only sometimes.
I made two changes:

  1. made the options readonly
    • this makes it from sometimes initializer to never initialized: at least it's predictable
    • generally seems like a bad idea to re-use mutable options across threads
  2. set the TypeInfoResolver to the default one

exyi and others added 3 commits December 29, 2025 14:27
It would crash on: JsonTypeInfo metadata for type '...' was not provided by TypeInfoResolver...

I still do not understand completely why this happens.
It seems _something_ is initializing the TypeInfoResolver when it's not set by us,
but only sometimes.
I made two changes:

1. made the options readonly
   - this makes it from sometimes initializer to never initialized: at least it's predictable
   - generally seems like a bad idea to re-use mutable options across threads
2. set the TypeInfoResolver to the default one

This comment was marked as resolved.

@exyi exyi force-pushed the fix-STJ-mystery-resolver-crash branch from 4b422b3 to ed52957 Compare December 29, 2025 13:31
@tomasherceg tomasherceg merged commit a8947e5 into main Dec 29, 2025
14 checks passed
@tomasherceg tomasherceg deleted the fix-STJ-mystery-resolver-crash branch December 29, 2025 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants