mm2 / Little-CMS

A free, open source, CMM engine. It provides fast transforms between ICC profiles.
https://www.littlecms.com
MIT License
572 stars 177 forks source link

Application Verifier warns about "Critical section not initialized" #289

Closed alvinhochun closed 2 years ago

alvinhochun commented 3 years ago

https://bugs.kde.org/show_bug.cgi?id=444875

It appears that the critical section is to be initialized in cmsCreateContext, but in Krita we never call this function. This leads me to believe that placing the block of code which handles initialization of the critical section inside cmsCreateContext is not correct.

mm2 commented 2 years ago

I have tried to reproduce the issue with no success. The code is called and critical section initialized. How you managed to get this error?

alvinhochun commented 2 years ago

Are you testing with a Krita release? When I enabled the check in Application Verifier and start krita.exe in a debugger I always get the warning when starting up.

mm2 commented 2 years ago

Oh, I see. This may be due to recent changes. It is harmless, but AppVerifier complains. So, there is a fix for that on 0728390fb452d26c445546a912c634f186d58381

alvinhochun commented 2 years ago

Thanks for the fix! :)

I can't test it now, but as soon as we update our dependencies to include the fix I will test it and report back.

alvinhochun commented 2 years ago

Verified that I no longer get the warning with AppVerifier after updating lcms to 2.13rc2. Thanks again!