Petrel model save datasource exceptioin

189 views Asked by At

To petrel ocean developers - when I try to save model in petrel, I get an exception that it's impossible to save. In logs I see this:

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* )

I've tried to delete & re-create completions but no result. What should I do?

1

There are 1 answers

0
RJFalconer On

As a work-around,

  • delete or rename the "CompletionsDataSource.dat" file
  • reload the project without saving
  • save the project again
  • recreate the completion displays in WellSectionWindow

Related: SerializationException when serializing lots of objects in .NET

(This is resolved in Petrel 2015.2+)