eigenein/cloudy — Issue #41: [Cloudy.Protobuf] Occasional NullReferenceException
Author: eigenein
Created: 2012-02-20 23:41:24+00:00
State: open
Labels: Bug

#### Reproducing

Run the Pi example within 2 processed, each of 2-4 threads. Occasionally (the error was caught 3-4 times at all) one of slaves fails with the following error:

02:04:41.0091 Error: Unhandled Exception: System.Runtime.Serialization.SerializationException: Deserialization has failed. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at System.Collections.Generic.Dictionary`2.set_Item(TKey key, TValue value)
at Cloudy.Protobuf.ValueBuilders.RepeatedValueBuilder.BuildObject() in C:\Users\eigenein\My Projects\Personal\Cloudy\Cloudy.Protobuf\ValueBuilders\RepeatedValueBuilder.cs:line 55
at Cloudy.Protobuf.Serializer.Deserialize(Stream stream) in C:\Users\eigenein\My Projects\Personal\Cloudy\Cloudy.Protobuf\Serializer.cs:line 269
--- End of inner exception stack trace ---
at Cloudy.Protobuf.Serializer.Deserialize(Stream stream) in C:\Users\eigenein\My Projects\Personal\Cloudy\Cloudy.Protobuf\Serializer.cs:line 280
at Cloudy.Protobuf.Interfaces.AbstractSerializer.Deserialize(Byte[] bytes) in C:\Users\eigenein\My Projects\Personal\Cloudy\Cloudy.Protobuf\Interfaces\AbstractSerializer.cs:line 36
at Cloudy.Messaging.Structures.ByteArrayValue.Get(Type type) in C:\Users\eigenein\My Projects\Personal\Cloudy\Cloudy\Messaging\Structures\ByteArrayValue.cs:line 28
at Cloudy.Messaging.Structures.ByteArrayValue.Get[T]() in C:\Users\eigenein\My Projects\Personal\Cloudy\Cloudy\Messaging\Structures\ByteArrayValue.cs:line 19
at Cloudy.Computing.Environment`1.Reduce[T](T value, EnvironmentOperationValue requestOperationValue) in C:\Users\eigenein\My Projects\Personal\Cloudy\Cloudy\Computing\Environment.cs:line 329
at Cloudy.Computing.Environment`1.Reduce[T](Int32 tag, T value) in C:\Users\eigenein\My Projects\Personal\Cloudy\Cloudy\Computing\Environment.cs:line 305
at Cloudy.Examples.Static.Pi.Slave.SlaveNode.Run(IEnvironment environment) in C:\Users\eigenein\My Projects\Personal\Cloudy\Cloudy.Examples.Static.Pi.Slave\SlaveNode.cs:line 84
at Cloudy.Computing.ComputingThread.Run(IEnvironment environment) in C:\Users\eigenein\My Projects\Personal\Cloudy\Cloudy\Computing\ComputingThread.cs:line 23
at Cloudy.Computing.ComputingThreadWrapper.Run(Object state) in C:\Users\eigenein\My Projects\Personal\Cloudy\Cloudy\Computing\ComputingThreadWrapper.cs:line 74