Index: branches/QAPAlgorithms/HeuristicLab.Persistence/3.3/Core/ConfigurationService.cs
===================================================================
--- branches/QAPAlgorithms/HeuristicLab.Persistence/3.3/Core/ConfigurationService.cs	(revision 6355)
+++ branches/QAPAlgorithms/HeuristicLab.Persistence/3.3/Core/ConfigurationService.cs	(revision 6569)
@@ -42,4 +42,5 @@
 
     private static ConfigurationService instance;
+    private static object locker = new object();
     private readonly Dictionary<IFormat, Configuration> customConfigurations;
 
@@ -65,7 +66,9 @@
     public static ConfigurationService Instance {
       get {
-        if (instance == null)
-          instance = new ConfigurationService();
-        return instance;
+        lock (locker) {
+          if (instance == null)
+            instance = new ConfigurationService();
+          return instance;
+        }
       }
     }
Index: branches/QAPAlgorithms/HeuristicLab.Persistence/3.3/Core/Serializer.cs
===================================================================
--- branches/QAPAlgorithms/HeuristicLab.Persistence/3.3/Core/Serializer.cs	(revision 6355)
+++ branches/QAPAlgorithms/HeuristicLab.Persistence/3.3/Core/Serializer.cs	(revision 6569)
@@ -246,5 +246,5 @@
             compositeSerializer.CreateMetaInfo(value),
             emitTypeInfo);
-        throw CreatePersistenceException(type, "Could not determine how to serialize a value.");
+        throw CreatePersistenceException(type, "Could not determine how to serialize a value.", true);
       }
       catch (Exception x) {
@@ -255,5 +255,8 @@
           throw;
         } else {
-          throw CreatePersistenceException(type, "Uncaught exception during serialization: " + x.Message);
+          throw CreatePersistenceException(
+            type,
+            string.Format("Uncaught exception during serialization:{0}{1}", Environment.NewLine, x),
+            false);
         }
       }
@@ -261,7 +264,7 @@
         objectGraphTrace.Pop();
       }
-    }
-
-    private PersistenceException CreatePersistenceException(Type type, string message) {
+    }    
+
+    private PersistenceException CreatePersistenceException(Type type, string message, bool appendConfig) {
       StringBuilder sb = new StringBuilder();
       sb.Append(message)
@@ -270,18 +273,20 @@
         .AppendLine("\"")
         .Append("object graph location: ")
-        .AppendLine(string.Join(".", objectGraphTrace.ToArray()))
-        .AppendLine("No registered primitive serializer for this type:");
-      foreach (var ps in configuration.PrimitiveSerializers)
-        sb.Append(ps.SourceType.VersionInvariantName())
-          .Append(" ---- (")
-          .Append(ps.GetType().VersionInvariantName())
-          .AppendLine(")");
-      sb.AppendLine("Rejected by all composite serializers:");
-      foreach (var cs in configuration.CompositeSerializers)
-        sb.Append("\"")
-          .Append(cs.JustifyRejection(type))
-          .Append("\" ---- (")
-          .Append(cs.GetType().VersionInvariantName())
-          .AppendLine(")");
+        .AppendLine(string.Join(".", objectGraphTrace.ToArray()));
+      if (appendConfig) {
+        sb.AppendLine("No registered primitive serializer for this type:");
+        foreach (var ps in configuration.PrimitiveSerializers)
+          sb.Append(ps.SourceType.VersionInvariantName())
+            .Append(" ---- (")
+            .Append(ps.GetType().VersionInvariantName())
+            .AppendLine(")");
+        sb.AppendLine("Rejected by all composite serializers:");
+        foreach (var cs in configuration.CompositeSerializers)
+          sb.Append("\"")
+            .Append(cs.JustifyRejection(type))
+            .Append("\" ---- (")
+            .Append(cs.GetType().VersionInvariantName())
+            .AppendLine(")");
+      }
       return new PersistenceException(sb.ToString());
     }
Index: branches/QAPAlgorithms/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/NumberEnumerable2StringSerializer.cs
===================================================================
--- branches/QAPAlgorithms/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/NumberEnumerable2StringSerializer.cs	(revision 6355)
+++ branches/QAPAlgorithms/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/NumberEnumerable2StringSerializer.cs	(revision 6569)
@@ -46,17 +46,20 @@
 
     private static readonly Dictionary<Type, Type> interfaceCache = new Dictionary<Type, Type>();
+    private static readonly object locker = new object();
 
     public Type GetGenericEnumerableInterface(Type type) {
-      if (interfaceCache.ContainsKey(type))
-        return interfaceCache[type];
-      foreach (Type iface in type.GetInterfaces()) {
-        if (iface.IsGenericType &&
-          iface.GetGenericTypeDefinition() == typeof(IEnumerable<>) &&
-          numberConverter.CanSerialize(iface.GetGenericArguments()[0])) {
-          interfaceCache.Add(type, iface);
-          return iface;
+      lock (locker) {
+        if (interfaceCache.ContainsKey(type))
+          return interfaceCache[type];
+        foreach (Type iface in type.GetInterfaces()) {
+          if (iface.IsGenericType &&
+            iface.GetGenericTypeDefinition() == typeof(IEnumerable<>) &&
+            numberConverter.CanSerialize(iface.GetGenericArguments()[0])) {
+            interfaceCache.Add(type, iface);
+            return iface;
+          }
         }
+        interfaceCache.Add(type, null);
       }
-      interfaceCache.Add(type, null);
       return null;
     }
Index: branches/QAPAlgorithms/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableReflection.cs
===================================================================
--- branches/QAPAlgorithms/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableReflection.cs	(revision 6355)
+++ branches/QAPAlgorithms/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableReflection.cs	(revision 6569)
@@ -124,6 +124,5 @@
     /// <param name="storableMemberInfos"></param>
     /// <returns></returns>
-    private static IEnumerable<StorableMemberInfo> DisentangleNameMapping(
-        IEnumerable<StorableMemberInfo> storableMemberInfos) {
+    private static IEnumerable<StorableMemberInfo> DisentangleNameMapping(IEnumerable<StorableMemberInfo> storableMemberInfos) {
       var nameGrouping = new Dictionary<string, List<StorableMemberInfo>>();
       foreach (StorableMemberInfo storable in storableMemberInfos) {
Index: branches/QAPAlgorithms/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/System.Drawing/Bitmap2XmlSerializer.cs
===================================================================
--- branches/QAPAlgorithms/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/System.Drawing/Bitmap2XmlSerializer.cs	(revision 6355)
+++ branches/QAPAlgorithms/HeuristicLab.Persistence/3.3/Default/Xml/Primitive/System.Drawing/Bitmap2XmlSerializer.cs	(revision 6569)
@@ -28,7 +28,8 @@
   internal sealed class Bitmap2XmlSerializer : PrimitiveXmlSerializerBase<Bitmap> {
 
-    public override XmlString Format(Bitmap o) {
+    public override XmlString Format(Bitmap o) {      
       MemoryStream stream = new MemoryStream();
-      o.Save(stream, ImageFormat.Png);
+      lock (o)
+        o.Save(stream, ImageFormat.Png);
       byte[] array = stream.ToArray();
       Byte1DArray2XmlSerializer serializer = new Byte1DArray2XmlSerializer();
Index: branches/QAPAlgorithms/HeuristicLab.Persistence/3.3/HeuristicLabPersistencePlugin.cs.frame
===================================================================
--- branches/QAPAlgorithms/HeuristicLab.Persistence/3.3/HeuristicLabPersistencePlugin.cs.frame	(revision 6355)
+++ branches/QAPAlgorithms/HeuristicLab.Persistence/3.3/HeuristicLabPersistencePlugin.cs.frame	(revision 6569)
@@ -27,5 +27,5 @@
   /// The plugin for HeuriticLab.Persistence
   /// </summary>
-  [Plugin("HeuristicLab.Persistence", "3.3.4.$WCREV$")]
+  [Plugin("HeuristicLab.Persistence", "3.3.5.$WCREV$")]
   [PluginFile("HeuristicLab.Persistence-3.3.dll", PluginFileType.Assembly)]
   [PluginDependency("HeuristicLab.Tracing", "3.3")]
Index: branches/QAPAlgorithms/HeuristicLab.Persistence/3.3/Properties/AssemblyInfo.frame
===================================================================
--- branches/QAPAlgorithms/HeuristicLab.Persistence/3.3/Properties/AssemblyInfo.frame	(revision 6355)
+++ branches/QAPAlgorithms/HeuristicLab.Persistence/3.3/Properties/AssemblyInfo.frame	(revision 6569)
@@ -52,3 +52,3 @@
 //
 [assembly: AssemblyVersion("3.3.0.0")]
-[assembly: AssemblyFileVersion("3.3.4.$WCREV$")]
+[assembly: AssemblyFileVersion("3.3.5.$WCREV$")]
Index: branches/QAPAlgorithms/HeuristicLab.Persistence/3.3/Tests/HeuristicLab.Persistence-3.3.Tests.csproj
===================================================================
--- branches/QAPAlgorithms/HeuristicLab.Persistence/3.3/Tests/HeuristicLab.Persistence-3.3.Tests.csproj	(revision 6355)
+++ branches/QAPAlgorithms/HeuristicLab.Persistence/3.3/Tests/HeuristicLab.Persistence-3.3.Tests.csproj	(revision 6569)
@@ -107,4 +107,8 @@
   </ItemGroup>
   <ItemGroup>
+    <ProjectReference Include="..\..\..\HeuristicLab.Algorithms.GeneticAlgorithm\3.3\HeuristicLab.Algorithms.GeneticAlgorithm-3.3.csproj">
+      <Project>{A51DA44F-CB35-4F6F-99F5-2A2E904AB93B}</Project>
+      <Name>HeuristicLab.Algorithms.GeneticAlgorithm-3.3</Name>
+    </ProjectReference>
     <ProjectReference Include="..\HeuristicLab.Persistence-3.3.csproj">
       <Project>{102BC7D3-0EF9-439C-8F6D-96FF0FDB8E1B}</Project>
Index: branches/QAPAlgorithms/HeuristicLab.Persistence/3.3/Tests/Properties/AssemblyInfo.cs
===================================================================
--- branches/QAPAlgorithms/HeuristicLab.Persistence/3.3/Tests/Properties/AssemblyInfo.cs	(revision 6355)
+++ branches/QAPAlgorithms/HeuristicLab.Persistence/3.3/Tests/Properties/AssemblyInfo.cs	(revision 6569)
@@ -53,3 +53,3 @@
 // by using the '*' as shown below:
 [assembly: AssemblyVersion("3.3.0.0")]
-[assembly: AssemblyFileVersion("3.3.3.0")]
+[assembly: AssemblyFileVersion("3.3.5.0")]
Index: branches/QAPAlgorithms/HeuristicLab.Persistence/3.3/Tests/UseCases.cs
===================================================================
--- branches/QAPAlgorithms/HeuristicLab.Persistence/3.3/Tests/UseCases.cs	(revision 6355)
+++ branches/QAPAlgorithms/HeuristicLab.Persistence/3.3/Tests/UseCases.cs	(revision 6569)
@@ -39,4 +39,6 @@
 using HeuristicLab.Persistence.Interfaces;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
+using System.Threading.Tasks;
+using HeuristicLab.Algorithms.GeneticAlgorithm;
 
 namespace HeuristicLab.Persistence_33.Tests {
@@ -1271,5 +1273,41 @@
     }
 
-
+    [TestMethod]
+    public void ConcurrencyTest() {
+      int n = 20;
+      Task[] tasks = new Task[n];
+      for (int i = 0; i < n; i++) {
+        tasks[i] = Task.Factory.StartNew((idx) => {
+          byte[] data;
+          using(var stream = new MemoryStream()) {
+            XmlGenerator.Serialize(new GeneticAlgorithm(), stream);
+            data = stream.ToArray();
+          }
+        }, i);
+      }
+      Task.WaitAll(tasks);
+    }
+
+    [TestMethod]
+    public void ConcurrentBitmapTest() {
+      Bitmap b = new Bitmap(300, 300);
+      Random r = new Random();
+      for (int x = 0; x<b.Height; x++) {
+        for (int y = 0; y<b.Width; y++) {
+          b.SetPixel(x, y, Color.FromArgb(r.Next()));
+        }
+      }
+      Task[] tasks = new Task[20];
+      byte[][] datas = new byte[tasks.Length][];
+      for (int i = 0; i<tasks.Length; i++) {
+        tasks[i] = Task.Factory.StartNew((idx) => {
+          using (var stream = new MemoryStream()) {
+            XmlGenerator.Serialize(b, stream);
+            datas[(int)idx] = stream.ToArray();
+          }
+        }, i);
+      }
+      Task.WaitAll(tasks);
+    }
 
     [ClassInitialize]
