Mono_class_from_mono_type: implement me 0x00

I build and run the code on iPhone, got this error:
…
Previous frame inner to this frame (gdb could not unwind past this frame)
mono_class_from_mono_type: implement me 0x00

  • Assertion: should not be reached at class.c:4677
    Program received signal: “SIGABRT”.
    …

It seems happend when XmlSerializer xmlSerializer = new XmlSerializer(type); // type is System.Type
But it not alway happens, so I can’t figure out the real bug.

Hope someone can help me find the way!!!
Thanks a lot!!!

Hi,
This might be stripping problem. Are you using reflection in your code?

Thanks for reply.

I don’t directly use reflection…

I use the
XmlSerializer xmlSerializer = new XmlSerializer(typeof(classname));
MemoryStream memoryStream = new MemoryStream(StringToUTF8ByteArray(xmlString));
xmlSerializer.Deserialize(memoryStream);

I think XmlSerializer could use reflection to get class information…

And the class send to XmlSerializer relative contents look like this:

public class ArrayOfDataObjects_XXX : TableRows
{
new public DataObjects_XXX this[int index]
{
get { return (DataObjects_XXX)base[index]; }
}
}
public class TableRows : ICollection
{
private MyList rows = new MyList();
…
}
public class MyList : ArrayList
{
…
}
public class DataObjects_XXX
{
public int id = -1;
public string name = “”;
public int count = 0;
…
some member function…
}

The xml content which comes from PHP PEAR DB_DataObject and XML_Serializer looks like this:

<ArrayOfDataObjects_XXX>
<DataObjects_XXX>
<__table>XXX</__table>
1
MyName
0
<_DB_DataObject_version>1.8.12</_DB_DataObject_version>
0
<_database_dsn />
<_database_dsn_md5 />
<_database />
<_query>

<group_by />
<order_by />

<limit_start />
<limit_count />
<data_select>*</data_select>
</_query>
<_DB_resultid />
<_resultFields>0</_resultFields>
<_link_loaded>0</_link_loaded>
<_join />
<_lastError>0</_lastError>
</DataObjects_XXX>
…
</ArrayOfDataObjects_XXX>

It’s fine on PC.
And the bug does not alway happens on iPhone!!!
Hope someone can help me find the way!!!
Thanks a lot!!!

The PC is .NET 2.0, while the iPhone is .NET 1.1 actually.

Hi,
reflection is very opposite thing to the code stripping, to make it work you need ensure that all the classes and methods accessed by reflection code is also referenced from the static code.