aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Serialization/CoalescedSceneObjectsSerializer.cs
diff options
context:
space:
mode:
authorOren Hurvitz2015-07-05 16:05:01 +0300
committerOren Hurvitz2015-08-11 07:35:37 +0100
commit4ad1468165b80f67439399e36688d36944996312 (patch)
tree541cfb87ecae92a3bff53aaa8875b06d83878a35 /OpenSim/Region/Framework/Scenes/Serialization/CoalescedSceneObjectsSerializer.cs
parentFixed mistakes in string format specifiers (e.g., "{0)" instead of {0}") (diff)
downloadopensim-SC-4ad1468165b80f67439399e36688d36944996312.zip
opensim-SC-4ad1468165b80f67439399e36688d36944996312.tar.gz
opensim-SC-4ad1468165b80f67439399e36688d36944996312.tar.bz2
opensim-SC-4ad1468165b80f67439399e36688d36944996312.tar.xz
Better handling of invalid XML: a) prevent infinite loop on EOF; b) better logging
If the XML was truncated for some reason then ExecuteReadProcessors() would get into an infinite loop, using high CPU. Now it detects EOF (and several other error cases) and aborts. The rest of the changes just improve logging of XML in case of errors, so that we can see what the bad XML is.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/Serialization/CoalescedSceneObjectsSerializer.cs6
1 files changed, 2 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/CoalescedSceneObjectsSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/CoalescedSceneObjectsSerializer.cs
index a556f9d..998789d 100644
--- a/OpenSim/Region/Framework/Scenes/Serialization/CoalescedSceneObjectsSerializer.cs
+++ b/OpenSim/Region/Framework/Scenes/Serialization/CoalescedSceneObjectsSerializer.cs
@@ -178,10 +178,8 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
178 } 178 }
179 catch (Exception e) 179 catch (Exception e)
180 { 180 {
181 m_log.Error(string.Format( 181 m_log.Error("[COALESCED SCENE OBJECTS SERIALIZER]: Deserialization of xml failed ", e);
182 "[COALESCED SCENE OBJECTS SERIALIZER]: Deserialization of xml failed with {0} ", 182 Util.LogFailedXML("[COALESCED SCENE OBJECTS SERIALIZER]:", xml);
183 e.Message), e);
184
185 return false; 183 return false;
186 } 184 }
187 185