locked
System.OutOfMemoryException every time I open the SSDT solution RRS feed

  • Question

  • I have been working on a SSDT solution which has about 10+ projects in it. I recently added another project and imported the database. Now every time I open SSDT I get OutOfMemory Exception. I have the latest version of 2012,2013,2015 Data tools and I get the same error with all the versions. The working set devenv.exe is using is about 3GB before I get this error. All databases in the project are SQL 2012 compatibility, .NET Framework 4.0 (even though there are no assemblies in the project). There are many cross database references in the project. The workstation has plenty more memory, it's running Windows 2012 R2.

    I restarted my workstation, ran SSDT as administrator, but no difference. I am stuck with this error now. Please advise.

    I uploaded the crash dump to my onedrive, it's about 50MB, the dump was created after SSDT 2015 crash :  devenv.exe.6984.dmp .

    System.OutOfMemoryException
    Exception of type 'System.OutOfMemoryException' was thrown.

       at System.Globalization.CompareInfo.CreateSortKey(String source, CompareOptions options)
       at System.Globalization.CompareInfo.GetSortKey(String source, CompareOptions options)
       at System.Data.SqlTypes.SqlString.GetHashCode()
       at Microsoft.Data.Tools.Schema.SchemaModel.ModelIdentifier.GetHashCode()
       at System.Collections.Generic.GenericEqualityComparer`1.GetHashCode(T obj)
       at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
       at Microsoft.Data.Tools.Schema.SchemaModel.DataSchemaModel.ReferenceLinker.EncounteredElement(IModelElement element, ModelIdentifier identifier, String disambiguator)
       at Microsoft.Data.Tools.Schema.SchemaModel.DataSchemaModel.PossibleElementState.ReadElement()
       at Microsoft.Data.Tools.Schema.SchemaModel.DataSchemaModel.RelationshipEntryState.ProcessStartElement()
       at Microsoft.Data.Tools.Schema.SchemaModel.XmlDeserializerEngine.ReadData(DeserializerState initialState, Boolean keepCurrentReaderPosition)
       at Microsoft.Data.Tools.Schema.SchemaModel.DataSchemaModel.LoadExternals(TextReader input, String fileName, String logicalSourceName, IList`1 externalPartsSubstitution, Boolean suppressErrorsForMissingDependencies)
       at Microsoft.Data.Tools.Schema.SchemaModel.DataSchemaModel.AddReference(CustomSchemaData customData)
       at Microsoft.Data.Tools.Schema.SchemaModel.DataSchemaModel.OnCustomDataAdded(CustomSchemaData customData)
       at Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlSchemaModel.OnCustomDataAdded(CustomSchemaData customData)
       at Microsoft.Data.Tools.Schema.SchemaModel.DataSchemaModel.AddCustomData(CustomSchemaData customData, Boolean raiseEvents)
       at Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlModelBuilder.Add(CustomSchemaData customSchemaData)
       at Microsoft.Data.Tools.Schema.SchemaModel.ModelBuilder.AddOrUpdate(CustomSchemaData customSchemaData)
       at Microsoft.Data.Tools.Schema.Utilities.Sql.Jobs.ModelBuilderJob.RunImpl()


    Gokhan Varol






    • Edited by GV1973 Friday, November 20, 2015 3:50 AM
    Friday, November 20, 2015 3:02 AM

All replies

  • Hey Gokhan,

    I can't fix your issue but it is the same advice I always give when people get OOM messages in Visual Studio, split up your solution and load less projects / code into each one.

    If you use database references to link your projects together, instead of having them all loaded, use references to dacpacs to load just the ones you need.

    I would also go to connect and either find one about high memory usage and vote it up or create one yourself :)

    Ed

    Tuesday, November 24, 2015 9:52 AM