Hi you all,
after installing the Fall Creators Update of Windows 10 64bit we noticed a delay in the follwoing functions:
When starting - takse very long to open a new document.
Copy an object (rectangle) - takes about 30 sec. (busy clock apears)
Print dialog appears after a long delay of about 1 min.
Export to web dialog appears after a long delay of about 1 min.
There might be other problems, but we uninstalled the update. After reinstalling it again, same problems. Now permernatently uninstalled. Normal behavior again.
Any ideas? Does anyone have similar problems?
Thanks for your response.
It's a porblem of the Fall Creators Update and CorelDRAW.
The problem: Some Winows API functions are terrible slow since Windows 10 Fall Creators Update. There are also dependencies to display drivers. In Windows Save Mode, all functions are still very fast.
CorelDRAW calls those funcitons many times with same parameters without need. They could store and reuse the results, but they call the functions ten times for each new/copy/export/..., especially EnumColorProfilesW().
I created a Visual C++ program that tests the system, here is the code:
#include <Windows.h> #include <Icm.h> // mscms.lib needed
void main() { ENUMTYPE zType; ZeroMemory( &zType, sizeof( zType ) ); zType.dwSize = sizeof( zType ); zType.dwVersion = 0x300u; zType.dwFields = ET_DEVICENAME | ET_SIGNATURE; zType.pDeviceName = L"Microsoft print to PDF"; zType.dwDeviceClass = CLASS_PRINTER; BYTE abBuffer[ 2u ]; DWORD dwSize = 2u; DWORD dwProfiles = 0u; DWORD dwStart = GetTickCount(); if( EnumColorProfiles( NULL, &zType, abBuffer, &dwSize, &dwProfiles ) ) { DWORD dwDuration = GetTickCount() - dwStart; TCHAR acMessage[ 1000u ]; if( dwDuration > 10u ) { swprintf_s( acMessage, sizeof( acMessage ), L"Duration of EnumColorProfiles(): %u ms. This is slow!\n" L"E.g. CorelDRAW would take about %u ms to copy an object to clipbord, export images or create a new document.", dwDuration, 10u * dwDuration ); MessageBox( NULL, acMessage, L"Duration", MB_OK | MB_ICONEXCLAMATION ); } else { swprintf_s( acMessage, sizeof( acMessage ), L"Duration of EnumColorProfiles(): %u ms (that's ok).", dwDuration ); MessageBox( NULL, acMessage, L"Duration", MB_OK | MB_ICONINFORMATION ); } return; } MessageBox( NULL, L"Error: EnumColorProfiles() failed!", L"Error", MB_OK | MB_ICONERROR ); }
I used different graphics cards and drivers with my system, and the results are differing enormously: - Safe mode: 3 ms - No driver installed (normal mode): 90 ms - ASUS nVidia GTX1060-6G with newest driver: 110 ms - AMD Radeon R9 200 series card with driver version Crimson 17.7.2: 520 ms - AMD Radeon R9 200 series card with driver version Adrenalin 18.1.1 (newest): 4950 ms On other systems, the effect with Fall Creators Update is smaller, but still present (eg. 13 ms on my wife’s pc).
I provided this information to the customer support. I hope, the software developers get notice. I now work with the patched ones, until corel raises an update. I am a professional software developer and suggested them a solution that would work. I also patched the corel-dlls for test purposes, and then the delay was short.
I now work with the patched ones, until corel raises an update.
I hope they do their job.
I also provided the information to Microsoft.
Great work, any chance of getting those patched DLLs ? :-)
Hi Nathan, my DLLs are only for test purposes. They might be instable or could result in wrong colors. I cannot recommend to use these for productive work (but I do so). I deactivated only the calls to the slow functions (they are in most cases not needed). I didn’t implement a proper replacement for the return values. This would be much more work. Corel could do this with two lines of code in my eyes.
Furthermore, it would be illegal to give the DLLs away. But I can tell you what I did (only 64-Bit-Version):
I used a HEX editor (XVI32), opened “C:\Program Files\Corel\CorelDRAW Graphics Suite 2017\Programs64\CRLCLR.dll” and replaced 6 Bytes at Address B1E4 (value FF 15 8E BC 05 00) with 90 90 90 90 90 90.
Then I opened “C:\Program Files\Corel\CorelDRAW Graphics Suite 2017\Programs64\CdrPrn.dll” and replaced 6 Bytes at Address 5DB04 (value FF 15 7E 23 10 00) with 90 90 90 90 90 90.
Before I did this, I have made a copy of both DLLs. Furthermore the locations is read only, so the modified DLL files must be safed in some other place an then copied or moved to C:\Program Files\...
For explanation: 90 is the no operation code, FF 15 is a call, the following 4 bytes are the address. So I simply deactivated the call. The return values are not set to safe values, so if CorelDRAW interprets them, this could lead to a crash or to wrong results. Keep this in mind.
I can give no warrenty and do not know the possible negative impacts of this changes. You can try it on your own risk.
I can't find those values in the DLLs at all, have searched. This machine I am working with is running Corel Draw Technical Suite. Perhaps it has slightly different code? We are running the X6 version.. old I know :-(
Hi Nathan,
the problem is the same with X6 (I've tested it by myself). But the DLLs are of older versions, so the values are different. I had installed X6 until last week, but unfortunately uninstalled it then and cannot reinstall it. Otherwise i had ben able to find out the X6 values.
With a Visual Studio 2017 installed, there would be a chance to find the correct values and addresses. The free community version of VS should work. Some professional should do this. Connect debugger to a running instance of CorelDRW.exe. Load all Microsoft symbols from symbol server. Set a breakpoint on EnumColorProfilesW (64 bit Unicode) or maybe EnumColorProfilesA (could be in 32 bit, if it uses ANSI) in Mscms.dll, called from CRLCLR.dll. Go back the call stack one step. Here you are. To set the breakpoint, type into the breakpoints window: {,,mscms.dll}EnumColorProfilesW
The second function is CreateICW (64-Bit Unicode) or CreateICA (could be in 32 bit, if it uses ANSI) in gdi32.dll, called from CrlPrn.dll. Type into the breakpoints window: {,,gdi32.dll}CreateICW
Now I'm running out of time. I hope, this helps.