@3stan were made preliminary investigation, we were not able to reproduce it, so we will continue work on it on different configurations. Could you please check if the issue is reproducable on 24.12?
We’ve tried the version 24.12 which is the latest however, we are still encountering this kind of error.
Adam.Core.MediaEngines.MediaEngineException: Action UpdateXmpMetadata failed to execute using all engines. The last engine (AsposePsd) failed with error "Index was outside the bounds of the array.". ---> System.IndexOutOfRangeException: Index was outside the bounds of the array. at Aspose.PSD.FileFormats.Psd.Layers.ChannelInformation.(Byte[] , Size , Rectangle ) at ..(Dictionary
2 , Size , Rectangle ) at …Process(Rectangle , Int32[] , Point , Point ) at … (Rectangle ) at .( , IList1 , ) at .(Rectangle , , , Int32 , Int32 , ) at .(Rectangle , , ) at .(Object ) at .(MethodBase , Boolean ) at .() at .(Boolean ) at .(Object ) at .() at .(Object , UInt32 ) at .(Boolean ) at .(Object[] , Type[] , Type[] , Object[] ) at .LoadPartialArgb32Pixels(Rectangle , IPartialArgb32PixelLoader ) at . (Rectangle ) at .( , IList
1 , ) at .(Rectangle , , , Int32 , Int32 , ) at . (Rectangle , IPartialArgb32PixelLoader ) at .(Int32 , IColorPalette , , Int32 ) at .(StreamContainer , Int32 , IColorPalette , , Int32 ) at Aspose.PSD.FileFormats.Psd.PsdImage.SaveData(Stream stream) at Aspose.PSD.DataStreamSupporter.Save(Stream stream) at Aspose.PSD.DataStreamSupporter.Save(String filePath) at Adam.Core.MediaEngines.AsposePsdMediaEngine.UpdateXmpMetadata(UpdateXmpMetadataMediaAction action) at Adam.Core.MediaEngines.MediaManager.RunAction(MediaAction action, IMediaEngine engine, Exception& exception) — End of inner exception stack trace — at Adam.Core.MediaEngines.MediaManager.LogActionFailure(MediaAction action, IMediaEngine lastFailedEngine, Exception lastException) at Adam.Core.MediaEngines.MediaManager.RunInternal(IEnumerable1 engines, IEnumerable
1 actions) at Adam.Core.Orders.UpdateXmpMetadataOrderTargetAction.OnExecute() at Adam.Core.Orders.OrderRunner.ExecuteRegisteredActions()`
Also, We’ve noticed that the execution time of Saving the PSD took around 13 mins to process for 2GB PSB file.
Hi,
Can you possibly confirm the timeline 25.2 is to become available, our estimate at the moment is that its likely to be early March giving previous cadence of releases?
Is there any possibility to move this fix up to 25.1 at all, this issue is causing a major customer impact and obviously a February timeline would be much better than a March one (if that is correct).
Appreciate the help.
Kind Regards
Dan.
@DJCWanderer could you please provide input file and minimum required code to reproduce the issue. Your case can be different from the case of topic starter. Release 25.1 is already published. Release 25.2 is planned on the 20th of February estimately.
We’ve observed that the issue occurs when writing XMP to the file and then saving it. However, if XMP is not written back to the file, the save operation is successful. I’ve created a simplified code snippet that writes an XMP and then saves the file.
public void WriteXMP(string filePath)
{
try
{
string stringXmp = "<xmpMapping><add namespace=\"http://purl.org/dc/elements/1.1/\" prefix=\"dc\" name=\"summary\">\"Test\"</add></xmpMapping>";
Stopwatch stopwatch = new Stopwatch();
stopwatch.Start();
XDocument xmpMapping = XDocument.Parse(stringXmp);
using (img)
{
Console.WriteLine("Checking for existing XMP Data");
XmpPacketWrapper xmpData = img.XmpData;
if (xmpData == null)
{
Console.WriteLine("Writing new XMP Data");
// Create xmp metadata if the image doesn't contains any xmp data.
XmpHeaderPi xmpHeader = new XmpHeaderPi(Guid.NewGuid().ToString());
XmpTrailerPi xmpTrailer = new XmpTrailerPi(true);
XmpMeta xmpMeta = new XmpMeta();
xmpData = new XmpPacketWrapper(xmpHeader, xmpTrailer, xmpMeta);
img.XmpData = xmpData;
}
Console.WriteLine("Writing XMP Data");
foreach (var mapping in xmpMapping.Descendants("xmpMapping").Elements("add"))
{
var xmpNamespace = mapping.Attribute("namespace").Value;
var xmpName = mapping.Attribute("name").Value;
var xmpPrefix = mapping.Attribute("prefix").Value;
var xmpValue = mapping.Value;
if (xmpData.ContainsPackage(xmpNamespace))
{
// Update or add XMP property value in existing namespace
foreach (var xmpPackage in xmpData.Packages)
{
if (xmpPackage.NamespaceUri.Trim().ToLower() == xmpNamespace.Trim())
{
if (xmpPackage.ContainsKey(xmpPackage.Prefix + ":" + xmpName))
{
xmpPackage[(xmpPackage.Prefix + ":" + xmpName)] = xmpValue;
}
else
{
xmpPackage.AddValue(xmpPackage.Prefix + ":" + xmpName, xmpValue);
}
}
}
}
else
{
// Create XMP namespace, since it does not yet exist
XmpBasicPackage xmp = new XmpBasicPackage(xmpPrefix, xmpNamespace);
xmp.AddValue(xmpPrefix + ":" + xmpName, xmpValue);
xmpData.AddPackage(xmp);
}
}
Console.WriteLine("Saving File..");
img.Save(filePath);
stopwatch.Stop();
Console.WriteLine($"Elapsed Time: {stopwatch.Elapsed} (hh:mm:ss:ms)");
Console.WriteLine("Saving Done");
}
}
catch (Exception e)
{
Console.WriteLine(e);
}
}
You can used the file from my previous post as it is still available and this code used the latest 25.1
I know this is a free support but can you please give us any updates on your findings after this since we also need to give an update to our customer.
Thanks,
Mark
@3stan team works on this issue. At this moment “Index Out of Range” exception is fixed, also speed of processing improved, but the final file can not be opened with PS. The work continues.
@3stan it’s still planned on 25.2, but in the worst case release of this feature will be moved to 25.3
We really need this in 25.2 because of its impact on our customers. If it doesn’t make it in time, would your team be able to patch it on top of 25.2?
@3stan team is actively work on this task. But I can not guarantee that it will be fixed in the top of February.
Any updates on the fix? Are the fix can still make it on 25.2 release? We need to get the updates on the progress as we also need to update our customer.
Thanks
@3stan the issue was more complex. At this moment the issue with saving of files larger than 2gb is fixed. Also, rendering of masks were optimized. The fix should be presented in 25.2
Just want to clarify some things
What to you mean on “the issue was more complex”
- Does this mean that there are still issues?
And
The fix should be present in 25.2
- Does this mean that the saving of files larger than 2gb is fix and be available in 25.2?
- Does the issue on opening of the new generated psb file is also fix and be available on 25.2?
- Is the index out of bound issue will be resolved on 25.2?
Thanks
- Issue with saving file larger than 2Gb is fixed
- Opening and saving of PSB files work fine
- Index out of bounds is fixed
This provided file after the saving still have the visual artifacts. They can be fixed, but the rendering speed will slow down on 25%.
Release 25.2 is planned on the 20th of February estimately.
@Dmitriy.Sorokin, is there update on the 25.2 release?
The issues you have found earlier (filed as PSDNET-2288) have been fixed in this update. This message was posted using Bugs notification tool by yaroslav.lisovskyi