Skip to content

Handle properties with no accessors#548

Open
Dredsen wants to merge 5 commits intoSamboyCoding:developmentfrom
Dredsen:development
Open

Handle properties with no accessors#548
Dredsen wants to merge 5 commits intoSamboyCoding:developmentfrom
Dredsen:development

Conversation

@Dredsen
Copy link
Copy Markdown

@Dredsen Dredsen commented May 10, 2026

Some IL2CPP metadata contains properties whose getter and setter have both been stripped completely.

Il2CppPropertyDefinition.PropertyType / RawPropertyType derived their result solely from the accessor signatures and dereferenced the setter with null-forgiving operators, NREing when both were null.

Reproduced on Relic Arena (Unity 6000.3.14f1) where ZstdSharp.Unsafe.Methods contains a bad property, crashing CopyPropertiesInType and failing afterwards.

  • Il2CppPropertyDefinition: PropertyType, RawPropertyType, and IsStatic now return null / false instead of NRE when both accessors are missing.
  • AsmResolverAssemblyPopulator.CopyPropertiesInType: skip properties with no accessors
  • AsmResolverAssemblyPopulator.PopulateCustomAttributes: skip properties that were skipped above

… both been stripped completely.

Il2CppPropertyDefinition.PropertyType / RawPropertyType derived their result solely from the accessor signatures and dereferenced the setter with null-forgiving operators, NREing when both were null.

Reproduced on Relic Arena (Unity 6000.3.14f1) where ZstdSharp.Unsafe.Methods contains a bad property, crashing CopyPropertiesInType and failing afterwards.

- Il2CppPropertyDefinition: PropertyType, RawPropertyType, and IsStatic now return null / false instead of NRE when both accessors are missing.
- AsmResolverAssemblyPopulator.CopyPropertiesInType: skip properties with no accessors
- AsmResolverAssemblyPopulator.PopulateCustomAttributes: skip properties that were skipped above
Comment thread LibCpp2IL/Metadata/Il2CppPropertyDefinition.cs Outdated
Comment thread Cpp2IL.Core/Utils/AsmResolver/AsmResolverAssemblyPopulator.cs Outdated
Comment thread Cpp2IL.Core/Utils/AsmResolver/AsmResolverAssemblyPopulator.cs Outdated
Comment thread LibCpp2IL/Metadata/Il2CppPropertyDefinition.cs Outdated
Dredsen and others added 4 commits May 10, 2026 18:49
Co-authored-by: Jeremy Pritts <49847914+ds5678@users.noreply.github.com>
Co-authored-by: Jeremy Pritts <49847914+ds5678@users.noreply.github.com>
Co-authored-by: Jeremy Pritts <49847914+ds5678@users.noreply.github.com>
Co-authored-by: Jeremy Pritts <49847914+ds5678@users.noreply.github.com>
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.

2 participants