diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs index ecd60bdaad..ac3e199456 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs @@ -131,7 +131,20 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver { if (CheckPresence(userInfo.UserProfile.ID)) { - new InventoryArchiveWriteRequest(id, this, m_aScene, userInfo, invPath, saveStream).Execute(); + try + { + new InventoryArchiveWriteRequest(id, this, m_aScene, userInfo, invPath, saveStream).Execute(); + } + catch (EntryPointNotFoundException e) + { + m_log.ErrorFormat( + "[ARCHIVER]: Mismatch between Mono and zlib1g library version when trying to create compression stream." + + "If you've manually installed Mono, have you appropriately updated zlib1g as well?"); + m_log.Error(e); + + return false; + } + return true; } else @@ -156,7 +169,20 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver { if (CheckPresence(userInfo.UserProfile.ID)) { - new InventoryArchiveWriteRequest(id, this, m_aScene, userInfo, invPath, savePath).Execute(); + try + { + new InventoryArchiveWriteRequest(id, this, m_aScene, userInfo, invPath, savePath).Execute(); + } + catch (EntryPointNotFoundException e) + { + m_log.ErrorFormat( + "[ARCHIVER]: Mismatch between Mono and zlib1g library version when trying to create compression stream." + + "If you've manually installed Mono, have you appropriately updated zlib1g as well?"); + m_log.Error(e); + + return false; + } + return true; } else @@ -181,8 +207,22 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver { if (CheckPresence(userInfo.UserProfile.ID)) { - InventoryArchiveReadRequest request = - new InventoryArchiveReadRequest(m_aScene, userInfo, invPath, loadStream); + InventoryArchiveReadRequest request; + + try + { + request = new InventoryArchiveReadRequest(m_aScene, userInfo, invPath, loadStream); + } + catch (EntryPointNotFoundException e) + { + m_log.ErrorFormat( + "[ARCHIVER]: Mismatch between Mono and zlib1g library version when trying to create compression stream." + + "If you've manually installed Mono, have you appropriately updated zlib1g as well?"); + m_log.Error(e); + + return false; + } + UpdateClientWithLoadedNodes(userInfo, request.Execute()); return true; @@ -209,8 +249,22 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver { if (CheckPresence(userInfo.UserProfile.ID)) { - InventoryArchiveReadRequest request = - new InventoryArchiveReadRequest(m_aScene, userInfo, invPath, loadPath); + InventoryArchiveReadRequest request; + + try + { + request = new InventoryArchiveReadRequest(m_aScene, userInfo, invPath, loadPath); + } + catch (EntryPointNotFoundException e) + { + m_log.ErrorFormat( + "[ARCHIVER]: Mismatch between Mono and zlib1g library version when trying to create compression stream." + + "If you've manually installed Mono, have you appropriately updated zlib1g as well?"); + m_log.Error(e); + + return false; + } + UpdateClientWithLoadedNodes(userInfo, request.Execute()); return true; diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs index 8ed1913c30..ad58f409ef 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs @@ -73,7 +73,19 @@ namespace OpenSim.Region.CoreModules.World.Archiver public ArchiveReadRequest(Scene scene, string loadPath, bool merge, Guid requestId) { m_scene = scene; - m_loadStream = new GZipStream(GetStream(loadPath), CompressionMode.Decompress); + + try + { + m_loadStream = new GZipStream(GetStream(loadPath), CompressionMode.Decompress); + } + catch (EntryPointNotFoundException e) + { + m_log.ErrorFormat( + "[ARCHIVER]: Mismatch between Mono and zlib1g library version when trying to create compression stream." + + "If you've manually installed Mono, have you appropriately updated zlib1g as well?"); + m_log.Error(e); + } + m_errorMessage = String.Empty; m_merge = merge; m_requestId = requestId; diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs index 71bfe57db9..b61b341d2a 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs @@ -65,7 +65,19 @@ namespace OpenSim.Region.CoreModules.World.Archiver public ArchiveWriteRequestPreparation(Scene scene, string savePath, Guid requestId) { m_scene = scene; - m_saveStream = new GZipStream(new FileStream(savePath, FileMode.Create), CompressionMode.Compress); + + try + { + m_saveStream = new GZipStream(new FileStream(savePath, FileMode.Create), CompressionMode.Compress); + } + catch (EntryPointNotFoundException e) + { + m_log.ErrorFormat( + "[ARCHIVER]: Mismatch between Mono and zlib1g library version when trying to create compression stream." + + "If you've manually installed Mono, have you appropriately updated zlib1g as well?"); + m_log.Error(e); + } + m_requestId = requestId; }