title: Big files deserializations by protobuf-net
body: <p>I need to deserialize 1.5GB txt file. I am using protobuf-net from code.google.com/p/protobuf-net/</p>
  
  <p>Sometimes it fails (about 50% cases) with different exceptions (null reference, memory access violation) in different places. I have noticed that if processor is lowly loaded then probability of failure is decreasing. </p>
  
  <p>What should I do to avoid such failures?</p>
  
  <p>Here is the example of deserializing code:</p>
  
  <pre><code>public static History LoadFromFile(string path)
      {
          using (var fileStream = File.OpenRead(path))
          {
              var obj = Serializer.Deserialize&lt;History&gt;(fileStream);                
              return obj;
          }
      }
  </code></pre>
  
  <p>Today I have a FatalExecutionEngineError with error code 0xc0000005, but I can't realize what part of code is possibly unsafe. It's not a constant error, everything works correctly after I restart the application.</p>
  
  <p>Here is the example of files with serialization, which I need to deserialize:
  <a href="https://docs.google.com/file/d/0B1XaGInC6jg3ZXBZZDA3bHh3bVk/edit" rel="nofollow">https://docs.google.com/file/d/0B1XaGInC6jg3ZXBZZDA3bHh3bVk/edit</a></p>