Copy link to clipboard
Copied
Hello support-team and community,
we developed a plugin for Adobe Illustrator 2018 and now adapted and compiled this plugin for Illustrator 2020 (24.3 64-bit), using the latest 2020-SDK and Visual Studio 2017.
After compilation, everything works fine under Windows 7 professional.
But under Windows 10 Illustrator crashes every time our plugin tool is used on the elements of a ring (compound path) consisting of "fills".
Please see the attached screenshot.
The crash always happens, when the function sAIPathStyle->GetPathStyle is called for the elements of the compound path.
The debugging shows the Error-Message:
Exception triggered by 0x00007FF6D8A85828 in Illustrator.exe:
0xC0000005: Access violation reading at position *some memory address*
Please also see the attached screenshot.
Unfortunately, I cannot debug into the function sAIPathStyle->GetPathStyle and therefore I do not know at which point exactly the exception occurs.
Is there some kind of debug-output functionality for adobe-functions which shows further information?
If someone has an idea about the cause of this exception and why only under Windows 10 and compound paths, I would be grateful for every help.
Thank you very much in advance.
System Data:
Windows 10 Pro 64-Bit
AMD Ryzen 7 2700X 3.80 GHz
16GB Ram
NVIDIA GeForce GT 710
Update 24.09.2020 - Problem solved!:
The crash of Illustrator 2020 under Windows 10 was caused by casting-operations.
The following simple example works fine under Windows 7 but leads to a crash under Windows 10:
AIPathStyle pathStyle;
AIBoolean hasAdvFill = false;
AIArtHandle testArtHandle = art;
sAIPathStyle->GetPathStyle(testArtHandle, &pathStyle, &hasAdvFill);
unsigned long artHandleAsLong = HandleToULong(testArtHandle);
testArtHandle = (AIArtHandle)ULongToHandle(artHandleAsLong);
sAIPathStyle-
...
Copy link to clipboard
Copied
Update 24.09.2020 - Problem solved!:
The crash of Illustrator 2020 under Windows 10 was caused by casting-operations.
The following simple example works fine under Windows 7 but leads to a crash under Windows 10:
AIPathStyle pathStyle;
AIBoolean hasAdvFill = false;
AIArtHandle testArtHandle = art;
sAIPathStyle->GetPathStyle(testArtHandle, &pathStyle, &hasAdvFill);
unsigned long artHandleAsLong = HandleToULong(testArtHandle);
testArtHandle = (AIArtHandle)ULongToHandle(artHandleAsLong);
sAIPathStyle->GetPathStyle(testArtHandle, &pathStyle, &hasAdvFill); //Crashes under Win10
The same goes for the following example:
AIPathStyle pathStyle;
AIBoolean hasAdvFill = false;
AIArtHandle testArtHandle = art;
sAIPathStyle->GetPathStyle(testArtHandle, &pathStyle, &hasAdvFill);
unsigned long artHandleAsLong = PtrToUlong(testArtHandle);
testArtHandle = (AIArtHandle)ULongToPtr(artHandleAsLong);
sAIPathStyle->GetPathStyle(testArtHandle, &pathStyle, &hasAdvFill); //Crashes under Win10
To solve this problem, the datatype "uintptr_t" has to be used:
AIPathStyle pathStyle;
AIBoolean hasAdvFill = false;
AIArtHandle testArtHandle = art;
sAIPathStyle->GetPathStyle(testArtHandle, &pathStyle, &hasAdvFill);
uintptr_t artHandleAsUintptr = reinterpret_cast<uintptr_t>(testArtHandle);
testArtHandle = reinterpret_cast<AIArtHandle>(artHandleAsUintptr);
sAIPathStyle->GetPathStyle(testArtHandle, &pathStyle, &hasAdvFill); //Works fine under Win7 and Win10
Hopefully, this helps people having trouble with Illustrator 2020 and Win10.
Best Regards,
Fabian T.