Ptrtostructure dosn't work on Iphone device

I used ptrtostructure to conver byte stream to struct, It works fine on Android Device and Ios simulator,
But if failed to work on Ios phone, xcode4.3 with Ios 5.1 Device

code bocked on ptrtostructure

for the struct without array is ok。
public struct LolMsgHeader //works fine
{
public ushort wMsgLen;
public byte header_ver;
public ushort uAction;
public uint dwUid;
public uint dwSeq;
public uint dwPid;
};

for the struct with array is error with exception:System.ExecutionEngineException: Attempting to JIT compile method (wrapper unknown) xxx:PtrToStructure

public struct CreateUnitMsg{ //error with exception
[MarshalAs(UnmanagedType.SysUInt, SizeConst = LOLMsgConst.MASK_LEN)]
public ushort mask; //

//[MarshalAs(UnmanagedType.ByValArray, SizeConst = 6, ArraySubType = UnmanagedType.SysInt)]
[MarshalAs(UnmanagedType.ByValArray, SizeConst = LOLMsgConst.NAME_LEN)] //
// public fixed byte szName[16];
public byte [ ]szName;
public short x; //
public short y; //
public byte type; //
public byte camp; //
public short Hp;
public short Mp;
public ushort status;
};

Fix it by change array to string。

But why no one know this? Even no official reply。

Probably not enough info. Glad you got it figured out.