Petrel模型保存数据源异常

时间:2015-06-21 07:55:00

标签: petrel

对于海洋开发者来说 - 当我试图在海燕中保存模型时,我得到一个例外,它是不可能保存的。在日志中我看到了:

Type : System.Runtime.Serialization.SerializationException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Message : The internal array cannot expand to greater than Int32.MaxValue elements.
Source : mscorlib
Help link : 
Data : System.Collections.ListDictionaryInternal
TargetSite : Void Rehash()
HResult : -2146233076
Stack Trace :    at System.Runtime.Serialization.ObjectIDGenerator.Rehash()
   at System.Runtime.Serialization.ObjectIDGenerator.GetId(Object obj, Boolean& firstTime)
   at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.InternalGetId(Object obj, Boolean assignUniqueIdToValueType, Type type, Boolean& isNew)
   at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.WriteKnownValueClass(NameInfo memberNameInfo, NameInfo typeNameInfo, Object data)
   at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.WriteMembers(NameInfo memberNameInfo, NameInfo memberTypeNameInfo, Object memberData, WriteObjectInfo objectInfo, NameInfo typeNameInfo, WriteObjectInfo memberObjectInfo)
   at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.WriteMemberSetup(WriteObjectInfo objectInfo, NameInfo memberNameInfo, NameInfo typeNameInfo, String memberName, Type memberType, Object memberData, WriteObjectInfo memberObjectInfo)
   at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Write(WriteObjectInfo objectInfo, NameInfo memberNameInfo, NameInfo typeNameInfo, String[] memberNames, Type[] memberTypes, Object[] memberData, WriteObjectInfo[] memberObjectInfos)
   at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Write(WriteObjectInfo objectInfo, NameInfo memberNameInfo, NameInfo typeNameInfo)
   at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck)
   at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph, Header[] headers, Boolean fCheck)
   at Slb.RE.Schematic.DataSource.CompletionsDataSource.Save()
   at OceanPetrelSystemStateSubject.saveDataSources(OceanPetrelSystemStateSubject* )

我试图删除&重新创建完成但没有结果。我该怎么办?

1 个答案:

答案 0 :(得分:0)

作为一种解决方法,

  • 删除或重命名" CompletionsDataSource.dat"档案
  • 重新加载项目而不保存
  • 再次保存项目
  • 在WellSectionWindow
  • 中重新创建完成显示

相关:SerializationException when serializing lots of objects in .NET

(这已在Petrel 2015.2 +中解决)