forestall bug reports about the Command error: System.EntryPointNotFoundException: CreateZStream save/load oar/iar issue by telling the user what the likely problem is

0.6.9
Justin Clark-Casey (justincc) 2010-02-19 22:30:46 +00:00
parent 214b1351fb
commit c767a7901c
3 changed files with 86 additions and 8 deletions

View File

@ -130,8 +130,21 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
if (userInfo != null) if (userInfo != null)
{ {
if (CheckPresence(userInfo.UserProfile.ID)) if (CheckPresence(userInfo.UserProfile.ID))
{
try
{ {
new InventoryArchiveWriteRequest(id, this, m_aScene, userInfo, invPath, saveStream).Execute(); 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; return true;
} }
else else
@ -155,8 +168,21 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
if (userInfo != null) if (userInfo != null)
{ {
if (CheckPresence(userInfo.UserProfile.ID)) if (CheckPresence(userInfo.UserProfile.ID))
{
try
{ {
new InventoryArchiveWriteRequest(id, this, m_aScene, userInfo, invPath, savePath).Execute(); 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; return true;
} }
else else
@ -181,8 +207,22 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
{ {
if (CheckPresence(userInfo.UserProfile.ID)) if (CheckPresence(userInfo.UserProfile.ID))
{ {
InventoryArchiveReadRequest request = InventoryArchiveReadRequest request;
new InventoryArchiveReadRequest(m_aScene, userInfo, invPath, loadStream);
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()); UpdateClientWithLoadedNodes(userInfo, request.Execute());
return true; return true;
@ -209,8 +249,22 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
{ {
if (CheckPresence(userInfo.UserProfile.ID)) if (CheckPresence(userInfo.UserProfile.ID))
{ {
InventoryArchiveReadRequest request = InventoryArchiveReadRequest request;
new InventoryArchiveReadRequest(m_aScene, userInfo, invPath, loadPath);
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()); UpdateClientWithLoadedNodes(userInfo, request.Execute());
return true; return true;

View File

@ -73,7 +73,19 @@ namespace OpenSim.Region.CoreModules.World.Archiver
public ArchiveReadRequest(Scene scene, string loadPath, bool merge, Guid requestId) public ArchiveReadRequest(Scene scene, string loadPath, bool merge, Guid requestId)
{ {
m_scene = scene; m_scene = scene;
try
{
m_loadStream = new GZipStream(GetStream(loadPath), CompressionMode.Decompress); 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_errorMessage = String.Empty;
m_merge = merge; m_merge = merge;
m_requestId = requestId; m_requestId = requestId;

View File

@ -65,7 +65,19 @@ namespace OpenSim.Region.CoreModules.World.Archiver
public ArchiveWriteRequestPreparation(Scene scene, string savePath, Guid requestId) public ArchiveWriteRequestPreparation(Scene scene, string savePath, Guid requestId)
{ {
m_scene = scene; m_scene = scene;
try
{
m_saveStream = new GZipStream(new FileStream(savePath, FileMode.Create), CompressionMode.Compress); 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; m_requestId = requestId;
} }