Total for C++ 20.2 crashed with dynamic loading

Hi,

I use dynamic loading. App crashed when free dlls.

Testsdk.zip (228.4 KB)

BTW: I bought this for half a year. But still not run well.

Thanks.

@kngstr,
Could you please elaborate it a bit more. I have tried both options “Test Words” and “Test Pdf” but the application did not crash. We will analyze the details and provide our feedback accordingly.

@ahsaniqbalsidiqui

The key point is dynamic loading.

My VS verison: Visual Studio 2017 15.9
Steps:

  1. Compile and run
  2. Wait for one minute to three minutes.
  3. Close the exe
    Then you will get the exception.

@kngstr

We need to test dynamic assembly loading and for the purpose a ticket as PDFCPP-1206 has been logged in our issue tracking system. We will surely inform you as soon as we have some results against investigation and ticket resolution. Please spare us some time.

We are sorry for the inconvenience.

@asad.ali

OK. Thanks.

@kngstr

We would like to share with you that we have investigated the issue and it will be fixed in upcoming 20.3 version of the API. As a workaround, you can change order of ::FreeLibrary() calls (in Testsdk.cpp):

    case WM_DESTROY:
        if (libhandle1) {
            ::FreeLibrary(libhandle1);
            OutputDebugString(L"卸载 Aspose.Pdf.Cpp_vc14x64.dll\n");
        }
        if (libhandle2) {
            ::FreeLibrary(libhandle2);
            OutputDebugString(L"卸载 Aspose.Words.Cpp_vc14x64.dll\n");
        }

In this case, access violation exception will not be thrown.

@asad.ali

Thanks.
I’ll be waiting.

PS: The workaround didn’t work for me. Because I load pdf & words & slides & cells

@kngstr

We would like to share with you that Aspose.PDF for C++ 20.3 has been released. Please try using it in your environment and let us know in case you still face any issue.

@asad.ali

Thanks. It does work.

BTW.
How about Slides for C++ 20.3?
My application still can not work well without it

@kngstr

Aspose.Slides for C++ 20.3 has been released today. You may please try using that as well and in case you face any issue, please let us know.

@asad.ali

Thanks. I tested all. The issue was fixed.

@asad.ali

I found another bug.
Load Slides and Cells, operate slides will get

‘c0000005 ACCESS_VIOLATION’

Even if just run

pres->get_Slides()->get_Count()

Today I tested the sample in Aspose.Slides for C++ 20.3, and I got those errors:

pres->Save(u"out/SampleAddText.pptx", Export::SaveFormat::Pptx);
pres->Save(out_file + u".xps", Export::SaveFormat::Xps);

0x000007FEFCE9A06D 处(位于 Sample.exe 中)引发的异常: Microsoft C++ 异常: System::ExceptionWrapperSystem::Details_ArgumentException,位于内存位置 0x0000000000253FA8 处。
0x000007FEFCE9A06D 处(位于 Sample.exe 中)引发的异常: Microsoft C++ 异常: [rethrow],位于内存位置 0x0000000000000000 处。
0x000007FEFCE9A06D 处(位于 Sample.exe 中)引发的异常: Microsoft C++ 异常: System::ExceptionWrapperSystem::Details_ArgumentException,位于内存位置 0x0000000000253FA8 处。
0x000007FEFCE9A06D 处(位于 Sample.exe 中)引发的异常: Microsoft C++ 异常: System::ExceptionWrapperSystem::Details_ArgumentException,位于内存位置 0x0000000000253FA8 处。
0x000007FEFCE9A06D 处(位于 Sample.exe 中)引发的异常: Microsoft C++ 异常: [rethrow],位于内存位置 0x0000000000000000 处。
0x000007FEFCE9A06D 处(位于 Sample.exe 中)引发的异常: Microsoft C++ 异常: System::ExceptionWrapperSystem::Details_ArgumentException,位于内存位置 0x0000000000253FA8 处。
0x000007FEFCE9A06D 处(位于 Sample.exe 中)引发的异常: Microsoft C++ 异常: System::ExceptionWrapperSystem::Details_ArgumentException,位于内存位置 0x0000000000253CE8 处。
0x000007FEFCE9A06D 处(位于 Sample.exe 中)引发的异常: Microsoft C++ 异常: [rethrow],位于内存位置 0x0000000000000000 处。
0x000007FEFCE9A06D 处(位于 Sample.exe 中)引发的异常: Microsoft C++ 异常: System::ExceptionWrapperSystem::Details_ArgumentException,位于内存位置 0x0000000000253CE8 处。
0x000007FEFCE9A06D 处(位于 Sample.exe 中)引发的异常: Microsoft C++ 异常: System::ExceptionWrapperAspose::Fonts::TTF::ExceptionHandling::Details_TTCFormatException,位于内存位置 0x000000000025B768 处。
0x000007FEFCE9A06D 处(位于 Sample.exe 中)引发的异常: Microsoft C++ 异常: System::ExceptionWrapperAspose::Fonts::TTF::ExceptionHandling::Details_TTCFormatException,位于内存位置 0x000000000025B170 处。
0x000007FEFCE9A06D 处(位于 Sample.exe 中)引发的异常: Microsoft C++ 异常: [rethrow],位于内存位置 0x0000000000000000 处。
0x000007FEFCE9A06D 处(位于 Sample.exe 中)引发的异常: Microsoft C++ 异常: System::ExceptionWrapperAspose::Fonts::TTF::ExceptionHandling::Details_TTCFormatException,位于内存位置 0x000000000025B170 处。
0x000007FEFCE9A06D 处(位于 Sample.exe 中)引发的异常: Microsoft C++ 异常: System::ExceptionWrapperAspose::Fonts::TTF::ExceptionHandling::Details_TTCFormatException,位于内存位置 0x000000000025B768 处。
0x000007FEFCE9A06D 处(位于 Sample.exe 中)引发的异常: Microsoft C++ 异常: System::ExceptionWrapperAspose::Fonts::TTF::ExceptionHandling::Details_TTCFormatException,位于内存位置 0x000000000025B170 处。
0x000007FEFCE9A06D 处(位于 Sample.exe 中)引发的异常: Microsoft C++ 异常: [rethrow],位于内存位置 0x0000000000000000 处。
0x000007FEFCE9A06D 处(位于 Sample.exe 中)引发的异常: Microsoft C++ 异常: System::ExceptionWrapperAspose::Fonts::TTF::ExceptionHandling::Details_TTCFormatException,位于内存位置 0x000000000025B170 处。
0x000007FEFCE9A06D 处(位于 Sample.exe 中)引发的异常: Microsoft C++ 异常: System::ExceptionWrapperAspose::Fonts::TTF::ExceptionHandling::Details_TTCFormatException,位于内存位置 0x000000000025B768 处。
0x000007FEFCE9A06D 处(位于 Sample.exe 中)引发的异常: Microsoft C++ 异常: System::ExceptionWrapperAspose::Fonts::TTF::ExceptionHandling::Details_TTCFormatException,位于内存位置 0x000000000025B170 处。
0x000007FEFCE9A06D 处(位于 Sample.exe 中)引发的异常: Microsoft C++ 异常: [rethrow],位于内存位置 0x0000000000000000 处。
0x000007FEFCE9A06D 处(位于 Sample.exe 中)引发的异常: Microsoft C++ 异常: System::ExceptionWrapperAspose::Fonts::TTF::ExceptionHandling::Details_TTCFormatException,位于内存位置 0x000000000025B170 处。

@kngstr,

I have observed the stacktrace and it seems to be an issue. Please share the source file and used sample code with which you have reproduced the issue. We will be able to proceed further with investigation on our end on provision of requested information.

@mudassir.fayyaz

What you are talking about is the issue ‘c0000005 ACCESS_VIOLATION’ or pres->Save?

If it’s the first one, like this topic said, the key point is dynamic loading
If it’s the second one, just in your source code: aspose-slides-cpp-20.3\sample

@kngstr,

I am actually referring to this issue that you have shared after installing Aspose.Slides for C++ 20.3.

@mudassir.fayyaz

Thanks. But how about the first one?

@kngstr,

We have internally discussed the issue on our end. Regarding ‘dynamic loading’ and ‘c0000005 ACCESS_VIOLATION’ we need a sample code , that reproduces the issue. Please share that so that we may proceed further with investigation on our end.

@mudassir.fayyaz

Sorry. It’s my fault. Slides imported old common library.
Now it works fine.

@asad.ali

Did Aspose.PDF for C++ 20.3 remove RTTI infomation?
Some of my functions did’t work.