diff --git a/OpenMetaverse/Imaging/OpenJPEG.cs b/OpenMetaverse/Imaging/OpenJPEG.cs
index b2be5ee2..21d20fd6 100644
--- a/OpenMetaverse/Imaging/OpenJPEG.cs
+++ b/OpenMetaverse/Imaging/OpenJPEG.cs
@@ -341,8 +341,8 @@ namespace OpenMetaverse.Imaging
offset += 4;
packet.end_pos = Marshal.ReadInt32(marshalled.packets, offset);
offset += 4;
- // Skip the distortion field (double) and padding (integer)
- offset += 12;
+ //double distortion = (double)Marshal.ReadInt64(marshalled.packets, offset);
+ offset += 8;
packets[i] = packet;
}
diff --git a/Programs/Simian/Extensions/ImageDelivery.cs b/Programs/Simian/Extensions/ImageDelivery.cs
index d2910251..4a6221b9 100644
--- a/Programs/Simian/Extensions/ImageDelivery.cs
+++ b/Programs/Simian/Extensions/ImageDelivery.cs
@@ -142,7 +142,6 @@ namespace Simian.Extensions
else if (block.DiscardLevel == -1 && block.DownloadPriority == 0.0f)
{
// Aborting a download we are not tracking, ignore
- Logger.DebugLog(String.Format("Aborting an image download for untracked image " + block.Image.ToString()));
}
else
{
@@ -171,8 +170,16 @@ namespace Simian.Extensions
data.ImageData = new ImageDataPacket.ImageDataBlock();
int imageDataSize = (download.Texture.AssetData.Length >= ImageDownload.FIRST_IMAGE_PACKET_SIZE) ?
ImageDownload.FIRST_IMAGE_PACKET_SIZE : download.Texture.AssetData.Length;
- data.ImageData.Data = new byte[imageDataSize];
- Buffer.BlockCopy(download.Texture.AssetData, 0, data.ImageData.Data, 0, imageDataSize);
+ try
+ {
+ data.ImageData.Data = new byte[imageDataSize];
+ Buffer.BlockCopy(download.Texture.AssetData, 0, data.ImageData.Data, 0, imageDataSize);
+ }
+ catch (Exception ex)
+ {
+ Logger.Log(String.Format("{0}: imageDataSize={1}", ex.Message, imageDataSize),
+ Helpers.LogLevel.Error);
+ }
server.UDP.SendPacket(agent.AgentID, data, PacketCategory.Texture);
@@ -201,8 +208,19 @@ namespace Simian.Extensions
transfer.ImageID.ID = block.Image;
transfer.ImageID.Packet = (ushort)download.CurrentPacket;
transfer.ImageData.Data = new byte[imagePacketSize];
- Buffer.BlockCopy(download.Texture.AssetData, download.CurrentBytePosition(),
- transfer.ImageData.Data, 0, imagePacketSize);
+
+ try
+ {
+ Buffer.BlockCopy(download.Texture.AssetData, download.CurrentBytePosition(),
+ transfer.ImageData.Data, 0, imagePacketSize);
+ }
+ catch (Exception ex)
+ {
+ Logger.Log(String.Format(
+ "{0}: CurrentBytePosition()={1}, AssetData.Length={2} imagePacketSize={3}",
+ ex.Message, download.CurrentBytePosition(), download.Texture.AssetData.Length,
+ imagePacketSize), Helpers.LogLevel.Error);
+ }
server.UDP.SendPacket(agent.AgentID, transfer, PacketCategory.Texture);
diff --git a/Programs/Simian/Simian.cs b/Programs/Simian/Simian.cs
index daaeea3f..43100721 100644
--- a/Programs/Simian/Simian.cs
+++ b/Programs/Simian/Simian.cs
@@ -239,9 +239,16 @@ namespace Simian
case "channel":
channel = reader.ReadElementContentAsString("string", String.Empty);
break;
+ case "platform":
+ case "mac":
+ case "id0":
+ case "options":
+ // Ignored values
+ reader.ReadInnerXml();
+ break;
default:
if (reader.Name == "string")
- Console.WriteLine(String.Format("Ignore login xml value: name={0}, value={1}", name, reader.ReadInnerXml()));
+ Console.WriteLine(String.Format("Ignore login xml value: name={0}", name, reader.ReadInnerXml()));
else
Console.WriteLine(String.Format("Unknown login xml: name={0}, value={1}", name, reader.ReadInnerXml()));
break;
diff --git a/bin/openjpeg-dotnet.dll b/bin/openjpeg-dotnet.dll
index f8d40e8e..d5f71c10 100644
Binary files a/bin/openjpeg-dotnet.dll and b/bin/openjpeg-dotnet.dll differ
diff --git a/openjpeg-dotnet/DllOpenJPEG.vcproj b/openjpeg-dotnet/DllOpenJPEG.vcproj
index e8f115fd..199a151e 100644
--- a/openjpeg-dotnet/DllOpenJPEG.vcproj
+++ b/openjpeg-dotnet/DllOpenJPEG.vcproj
@@ -52,6 +52,7 @@
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;OPJ_EXPORTS"
StringPooling="true"
RuntimeLibrary="0"
+ StructMemberAlignment="3"
EnableFunctionLevelLinking="true"
PrecompiledHeaderFile=".\Release/DllOpenJPEG.pch"
AssemblerListingLocation=".\Release/"
@@ -147,6 +148,7 @@
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
+ StructMemberAlignment="3"
PrecompiledHeaderFile=".\Debug/DllOpenJPEG.pch"
AssemblerListingLocation=".\Debug/"
ObjectFile=".\Debug/"
@@ -252,6 +254,10 @@
/>
+
+
@@ -392,10 +398,6 @@
/>
-
-
@@ -589,6 +591,10 @@
RelativePath="libopenjpeg\cio.h"
>
+
+
@@ -625,10 +631,6 @@
RelativePath="libopenjpeg\jpt.h"
>
-
-
diff --git a/openjpeg-dotnet/libopenjpeg/openjpeg.h b/openjpeg-dotnet/libopenjpeg/openjpeg.h
index 5243c36c..940a9033 100644
--- a/openjpeg-dotnet/libopenjpeg/openjpeg.h
+++ b/openjpeg-dotnet/libopenjpeg/openjpeg.h
@@ -598,8 +598,6 @@ typedef struct opj_packet_info {
int end_pos;
/** packet distorsion */
double disto;
- /** HACK: padding to maintain 8-byte alignment */
- int padding;
} opj_packet_info_t;
/**