We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Aspose.Pdf C++ keeps crashing when creating a RedactionAnnotation object

I’m trying to create a RedactAnnotation object as follows

auto doc = MakeObject<Document>(filePath); auto pages = doc->get_Pages(); auto redactAnnot = MakeObject<Annotations::RedactionAnnotation>(pages->idx_get(2), MakeObject<Rectangle>(200, 400, 400, 600));

but the code keeps crashing in smart_ptr.h with exception being thrown:

Exception thrown at 0x00AA7F5F in HelloWorld.exe: 0xC0000005: Access violation reading location 0xDDDDDDE1.

Selection_153.png (42.6 KB)

Any ideas on this would be very much appreciated!

@zpopswat

Thanks for contacting support.

Would you please share which version of the API you are using at your side. Also, please share which Visual Studio version you are running as it would help us testing the scenario in our environment and address it accordingly.

@asad.ali

API: Aspose PDF for C++ 19.1

Microsoft Visual Studio Community 2017
Version 15.9.7
VisualStudio.15.Release/15.9.7+28307.423
Microsoft .NET Framework
Version 4.6.01055

Installed Version: Community

Visual C++ 2017 00369-60000-00001-AA629
Microsoft Visual C++ 2017

ASP.NET and Web Tools 2017 15.9.04012.0
ASP.NET and Web Tools 2017

C# Tools 2.10.0-beta2-63501-03+b9fb1610c87cccc8ceb74a770dba261a58e39c4a
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Common Azure Tools 1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

JavaScript Language Service 2.0
JavaScript Language Service

Microsoft JVM Debugger 1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

Microsoft MI-Based Debugger 1.0
Provides support for connecting Visual Studio to MI compatible debuggers

Microsoft Visual C++ Wizards 1.0
Microsoft Visual C++ Wizards

Microsoft Visual Studio VC Package 1.0
Microsoft Visual Studio VC Package

MLGen Package Extension 1.0
MLGen Package Visual Studio Extension Detailed Info

NuGet Package Manager 4.6.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

ProjectServicesPackage Extension 1.0
ProjectServicesPackage Visual Studio Extension Detailed Info

ResourcePackage Extension 1.0
ResourcePackage Visual Studio Extension Detailed Info

ResourcePackage Extension 1.0
ResourcePackage Visual Studio Extension Detailed Info

Test Adapter for Boost.Test 1.0
Enables Visual Studio’s testing tools with unit tests written for Boost.Test. The use terms and Third Party Notices are available in the extension installation directory.

Test Adapter for Google Test 1.0
Enables Visual Studio’s testing tools with unit tests written for Google Test. The use terms and Third Party Notices are available in the extension installation directory.

Visual Basic Tools 2.10.0-beta2-63501-03+b9fb1610c87cccc8ceb74a770dba261a58e39c4a
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual Studio Code Debug Adapter Host Package 1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio

Visual Studio Tools for CMake 1.0
Visual Studio Tools for CMake

@zpopswat

Thanks for sharing your environment details.

We have tested the scenario in our environment and were able to replicate the issue that you have mentioned. We have logged this issue as PDFCPP-907 in our issue tracking system for the sake of correction. We will further look into details of the issue and keep you posted with its resolution status. Please be patient and spare us little time.

We are sorry for the inconvenience.

@asad.ali Ok, Thanks for the info.