protobuf-csharp-port icon indicating copy to clipboard operation
protobuf-csharp-port copied to clipboard

Problem with Protobuf on IOS

Open BrokenHell opened this issue 9 years ago • 2 comments
trafficstars

When I build in IOS using Unity and run then I got this error log

The type initializer for 'com.nct.nplay.proto.SystemMessage' threw an exception.

(Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 37)

System.TypeInitializationException: The type initializer for 'com.nct.nplay.proto.gsystem' threw an exception. ---> System.NullReferenceException: A null value was found where an object instance was required. at Google.ProtocolBuffers.UnknownFieldSet+Builder.MergeFieldFrom (ICodedInputStream input, Google.ProtocolBuffers.ExtensionRegistry extensionRegistry, IBuilder builder, UInt32 tag, System.String fieldName) [0x00000] in :0 at Google.ProtocolBuffers.DescriptorProtos.FileOptions+Builder.MergeFrom (ICodedInputStream input, Google.ProtocolBuffers.ExtensionRegistry extensionRegistry) [0x00000] in :0 at Google.ProtocolBuffers.CodedInputStream.ReadMessage (IBuilderLite builder, Google.ProtocolBuffers.ExtensionRegistry extensionRegistry) [0x00000] in :0 at Google.ProtocolBuffers.DescriptorProtos.FileDescriptorProto+Builder.MergeFrom (ICodedInputStream input, Google.ProtocolBuffers.ExtensionRegistry extensionRegistry) [0x00000] in :0 at Google.ProtocolBuffers.AbstractBuilderLite`2[TMessage,TBuilder].MergeFrom (System.Byte[] data) [0x00000] in :0 at Google.ProtocolBuffers.DescriptorProtos.FileDescriptorProto.ParseFrom (System.Byte[] data) [0x00000] in :0 at Google.ProtocolBuffers.Descriptors.FileDescriptor.InternalBuildGeneratedFileFrom (System.Byte[] descriptorData, Google.ProtocolBuffers.Descriptors.FileDescriptor[] dependencies, Google.ProtocolBuffers.Descriptors.InternalDescriptorAssigner descriptorAssigner) [0x00000] in :0 at com.nct.nplay.proto.SystemMessage..cctor () [0x00000] in :0 at OutSystemDataProcessStream.Initialize () [0x00000] in :0 --- End of inner exception stack trace --- at com.nct.nplay.proto.SystemMessage..cctor () [0x00000] in :0 at OutSystemDataProcessStream.Initialize () [0x00000] in :0

Does anyone know what happen :( and how to fix it ? ( currently it can run well on android )

Thanks .

BrokenHell avatar Jan 12 '16 04:01 BrokenHell

Currently I use version 2.4.1.555

BrokenHell avatar Jan 12 '16 04:01 BrokenHell

I'm afraid we've seen various issues with Unity, some of which have been due to Unity runtime errors, and none of which are easily reproducible for someone who doesn't have Unity :(

If you're able to reproduce this with a desktop .NET console app (and sample data file) I'd be very happy to look into it - although I don't know when I'd make another release. (I'm more focused on the proto3 code, which doesn't support Unity...)

jskeet avatar Jan 12 '16 10:01 jskeet