Skip to content
This repository has been archived by the owner on Jan 18, 2022. It is now read-only.

Mono crash when using recursive options in schema #1057

Closed
jamiebrynes7 opened this issue Jul 22, 2019 · 1 comment
Closed

Mono crash when using recursive options in schema #1057

jamiebrynes7 opened this issue Jul 22, 2019 · 1 comment
Labels
A: codegen Area: Code generation S: known-issue Status: This is a known issue T: bug Type: This is a bug
Projects

Comments

@jamiebrynes7
Copy link
Contributor

jamiebrynes7 commented Jul 22, 2019

Affects: Release v0.2.3 and up (observed in Unity 2019.1.3)
Internal Ticket: UTY-2091


Description

Schema that attempts to use an option recursively:

type TypeA {
	option<TypeA> test = 1;
}

Will cause a Mono crash like the following:

* Assertion at ..\mono\metadata\class.c:1998, condition `image_is_dynamic (klass->image) || field_offsets [i] > 0' not met

Workaround

There is no workaround to allow recursive options, you can emulate this with a list with 0 or 1 elements. Support for reference-semantic options will enable this.


To get yourself back to a good state:

  1. Remove the problematic schema entry.
  2. Delete the Assets/Generated/Source directory.
  3. Re-open Unity.
@jamiebrynes7 jamiebrynes7 added T: bug Type: This is a bug A: codegen Area: Code generation S: known-issue Status: This is a known issue labels Jul 22, 2019
@jamiebrynes7 jamiebrynes7 added this to Core in Known Issues Jul 22, 2019
@jamiebrynes7 jamiebrynes7 added this to [In Planning] Release v0.2.8 in Roadmap Aug 16, 2019
@jamiebrynes7
Copy link
Contributor Author

Fixed in release v0.2.8

@jamiebrynes7 jamiebrynes7 removed this from Core in Known Issues Sep 3, 2019
@paulbalaji paulbalaji moved this from [Done] Release v0.2.8 to Older Releases in Roadmap Feb 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A: codegen Area: Code generation S: known-issue Status: This is a known issue T: bug Type: This is a bug
Projects
Roadmap
Older Releases
Development

No branches or pull requests

1 participant