Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing default constructor after using il2cpp #3

Open
wvdvegt opened this issue Oct 17, 2017 · 1 comment
Open

Missing default constructor after using il2cpp #3

wvdvegt opened this issue Oct 17, 2017 · 1 comment

Comments

@wvdvegt
Copy link
Contributor

wvdvegt commented Oct 17, 2017

When running the GameStorageClientAsset on .net 2.0 instead of the default .net 2.0 subset in Unity and targeting iOS the default constructor seems to be stripped by the c++ conversion.

When using the source code :

1.	ExecutionEngineException: Attempting to call method 'AssetPackage.GameStorageClientAsset+InternalXmlSerializer::Deserialize' for which no ahead of time (AOT) code was generated.
2.	  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
3.	  at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0
4.	  at AssetPackage.GameStorageClientAsset.DeserializeDataXml (ISerializer serializer, AssetPackage.Node root, System.String data, StorageLocations location, SerializingFormat format, System.Collections.Generic.List`1 enumeration) [0x00000] in <filename unknown>:0
5.	  at AssetPackage.GameStorageClientAsset.DeSerializeData (System.String model, System.String data, StorageLocations location, SerializingFormat format, System.Collections.Generic.List`1 enumeration) [0x00000] in <filename unknown>:0
6.	  at AssetPackage.GameStorageClientAsset.LoadData (System.String model, StorageLocations location, SerializingFormat format) [0x00000] in <filename unknown>:0

When using the DLLs : 
InvalidOperationException: AssetManagerPackage.RageVersionInfo cannot be serialized because it does not have a default public constructor
  at System.Xml.Serialization.ReflectionHelper.CheckSerializableType (System.Type type, Boolean allowPrivateConstructors) [0x00000] in <filename unknown>:0 
  at System.Xml.Serialization.XmlReflectionImporter.ImportClassMapping (System.Xml.Serialization.TypeData typeData, System.Xml.Serialization.XmlRootAttribute root, System.String defaultNamespace) [0x00000] in <filename unknown>:0 
  at System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping (System.Xml.Serialization.TypeData typeData, System.Xml.Serialization.XmlRootAttribute root, System.String defaultNamespace) [0x00000] in <filename unknown>:0 
  at System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping (System.Type type, System.Xml.Serialization.XmlRootAttribute root, System.String defaultNamespace) [0x00000] in <filename unknown>:0 
  at System.Xml.Serialization.XmlSerializer..ctor (System.Type type, System.Xml.Serialization.XmlAttributeOverrides overrides, System.Type[] extraTypes, System.Xml.Serialization.XmlRootAttribute root, System.String defaultNamespace) [0x00000] in <filename unknown>:0 
  at System.Xml.Serialization.XmlSerializer..ctor (System.Type type) [0x00000] in <filename unknown>:0 
  at AssetManagerPackage.RageVersionInfo.LoadVersionInfo (System.String xml) [0x00000] in <filename unknown>:0 
  at AssetPackage.BaseAsset..ctor () [0x00000] in <filename unknown>:0 

See https://forum.unity.com/threads/unity-5-0-3f2-il2cpp-problem-attempting-to-call-method-system-reflection-monoproperty-getteradapt.332335/page-2#post-3252930

@wvdvegt
Copy link
Contributor Author

wvdvegt commented Jan 11, 2018

Being worked on in the ISerializer branch in the GameStorageClientAsset repository.
Status: fixed but needs testing.

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

No branches or pull requests

1 participant