ObjectLayoutInspector icon indicating copy to clipboard operation
ObjectLayoutInspector copied to clipboard

Crash when used in Unity3D Engine

Open daveparoxe opened this issue 5 years ago • 5 comments

Hi,

I would like to use this library in Unity3D which use mono. The editor crash and output this in the log: Assertion at ..\mono\mini\method-to-ir.c:13336, condition `ins->opcode >= MONO_CEE_LAST' not met

I call this: TypeLayout.PrintLayout<ExposedReference<ArchVizAgent>>();

daveparoxe avatar Dec 05 '19 17:12 daveparoxe

Additional information: It crash in InspectorHelper.GenerateFieldOffsetInspectionFunction at this line: return (Func<object, long[]>)method.CreateDelegate(typeof(Func<object, long[]>));

daveparoxe avatar Dec 05 '19 17:12 daveparoxe

I was using the released version not the master source code version. I will report if I experience the same crash with the master

daveparoxe avatar Dec 05 '19 18:12 daveparoxe

I experience the same crash with the latest version. It crash at: TypeInspector.GenerateFieldOffsetInspectionFunction return (Func<object, long[]>)method.CreateDelegate(typeof(Func<object, long[]>));

Log:

  • Assertion at ..\mono\mini\method-to-ir.c:13336, condition `ins->opcode >= MONO_CEE_LAST' not met

daveparoxe avatar Dec 05 '19 18:12 daveparoxe

Seems related to this bug: https://github.com/mono/mono/issues/8543

daveparoxe avatar Dec 05 '19 18:12 daveparoxe

try UnsafeLayout - it runs via cpp auto of mono on android and ios

dzmitry-lahoda avatar Nov 30 '20 20:11 dzmitry-lahoda