var layer = psdImage.Layers[3] as TextLayer;
layer.UpdateText("xxxx"); // throw NPE System.NullReferenceException:“Object reference not set to an instance of an object.”
in my test , 2023.8 can UpdateText and save as PNG , but png will lost font ,start 2023.9 will get above error
Could please clarify which version of .NET is used. I can not reproduce this exception. According to our investigation this exception appears only if cache is broken, so FontSettings.RemoveFontCacheFile() should fix the issue.
// throw NPE System.NullReferenceException:“Object reference not set to an instance of an object.”
Please try to remove these files:
“C:\ProgramData\AsposeImagingFontsInfoJson.cache”
“C:\ProgramData\AsposeImagingFontsInfo.cache”
“C:\Users<yourusername>\AppData\Local\AsposeImagingFontsInfoJson.cache”
“C:\Users<yourusername>\AppData\Local\AsposeImagingFontsInfo.cache”
Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.
at Aspose.PSD.FontParsing.OpenType.Serialization.OpenTypeFontInfo..ctor )
at .(String[] )
at .(Boolean )
at .(String )
at .(String )
at .(String )
at .(String , Boolean )
at ⸮.(ITextStyle )
at ⸮.(ITextPortion )
at ⸮.(ITextPortion[] )
at ⸮.(ITextPortion[] , SizeF )
at ⸮.()
at ⸮.(Boolean )
at .UpdateLayerData()
at ⸮.(String , Point , Single , Color)
at .(Object )
at .(Object )
at .(MethodBase , Boolean )
at ( , )
at ()
at .(Boolean )
at .(Object )
at .(Object )
at .()
at .(Object , UInt32 )
at .(Boolean )
at .(Object[] , Type[] , Type[] , Object[])
at .(Stream , String , Object[] , Type[], Type[] , Object[] )
at .(Stream , String , Object[] )
at .(Stream , String , Object[] )
at ⸮.UpdateText(String , Point , Single , Color)
at Aspose.PSD.FileFormats.Psd.Layers.TextLayer.UpdateText(String text)
The font is installed normally on my computer, and Photoshop can edit it normally
at my test, it broken at this.Style = OpenTypeFontInfo.\u0002(u0006_u0005_u0003_u2.\u0002()); in class Aspose.PSD.FontParsing.OpenType.Serialization
This is our own font that can recognize edited content normally in Photoshop,Do you need me to send you the font?
@lsl
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): PSDNET-1855
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
The issues you have found earlier (filed as PSDNET-1855) have been fixed in this update. This message was posted using Bugs notification tool by yaroslav.lisovskyi
var layer = psdImage.Layers[3] as TextLayer;
layer.UpdateText("xxxx");
above code will throw exception {System.IndexOutOfRangeException: Index was outside the bounds of the array. at ..(String , FontStyle , Dictionary2 )}`
We reproduced this issue, but we need additional time for the investigation. This issue appears only on blank new project if Aspose.PSD referenced as Nuget Package. Our internal tests passed succesfully.
@lsl
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): PSDNET-2071
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.