Print Page | Close Window

[solved] Infinite loop with High Contrast Theme

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=23221
Printed Date: 23 December 2024 at 2:25pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: [solved] Infinite loop with High Contrast Theme
Posted By: acunningham1
Subject: [solved] Infinite loop with High Contrast Theme
Date Posted: 05 December 2016 at 12:52pm
We recently upgraded our compiler from Visual Studio 2012 to Visual Studio 2015.
Also we are using an older version of ToolkitPro... 1625
Everything has been working fine except when using the High Contrast Theme in Windows (both in Windows 8 and Window 10).

It seems to be stuck in an infinite loop when first try to create anything.  This only happens with high contrast mode.

In this particular instance it is trying to create a CXTPListBox
It seems to always be stuck in a call to: _Init_thread_wait

Here is the callstack:

  ntdll.dll!00007ffc4ad885d4() Unknown
  ntdll.dll!00007ffc4ad4bed9() Unknown
  KernelBase.dll!00007ffc47f28cc8() Unknown
  ToolkitPro1625vc140x64U.dll!_Init_thread_wait(const unsigned long timeout=0x00000064) Line 139 C++
  ToolkitPro1625vc140x64U.dll!_Init_thread_header(int * pOnce=0x000000005b14b890) Line 188 C++
  ToolkitPro1625vc140x64U.dll!CXTPColorManager::Instance() Line 184 C++
  ToolkitPro1625vc140x64U.dll!CXTPColorManager::RefreshGradientColors() Line 452 C++
  ToolkitPro1625vc140x64U.dll!CXTPColorManager::RefreshColors(int bResetCustomColors) Line 667 C++
  ToolkitPro1625vc140x64U.dll!CXTPColorManager::CXTPColorManager() Line 176 C++
  ToolkitPro1625vc140x64U.dll!CXTPColorManager::Instance() Line 184 C++
  ToolkitPro1625vc140x64U.dll!RefreshXtremeColors(int bResetCustomColors=0x00000000) Line 472 C++
  ToolkitPro1625vc140x64U.dll!CXTPAuxData::UpdateSysColors() Line 168 C++
  ToolkitPro1625vc140x64U.dll!CXTPAuxData::CXTPAuxData() Line 103 C++
  ToolkitPro1625vc140x64U.dll!XTPAuxData() Line 474 C++
  ToolkitPro1625vc140x64U.dll!CXTPListBox::Initialize(bool bAutoFont) Line 94 C++
> Editor_debug.exe!editor_recovery_dialog::OnInitDialog() Line 43 C++


Any help would be appreciated. :)




Replies:
Posted By: olebed
Date Posted: 06 December 2016 at 6:54am
Hello,

Incompatibility with VS2015 and local static variable behavior (singletons) has been fixed for version 17.0 ReleaseCandidate. Changes are complex.
I can offer to update ToolkitPro to latest version 17.3.

Regards,
 Oleksandr Lebed


Posted By: acunningham1
Date Posted: 06 December 2016 at 11:07am
Originally posted by olebed olebed wrote:

Hello,

Incompatibility with VS2015 and local static variable behavior (singletons) has been fixed for version 17.0 ReleaseCandidate. Changes are complex. I can offer to update ToolkitPro to latest version 17.3.

Regards,
 Oleksandr Lebed

Hey thanks for the reply. :)
That's interesting and good to know. 
What exactly do we have to do to get that upgrade?  Do we have to purchase the whole ToolkitPro again?




Posted By: olebed
Date Posted: 06 December 2016 at 11:32am
http://www.codejock.com/purchase/renewals.asp" rel="nofollow - I think this will be helpful.

Also you can test new version as "30 Day Trial".


Posted By: acunningham1
Date Posted: 06 December 2016 at 2:55pm
Originally posted by olebed olebed wrote:

http://www.codejock.com/purchase/renewals.asp" rel="nofollow - I think this will be helpful.

Also you can test new version as "30 Day Trial".

Ok, thank you.

Can you give a bit more info about the 2015 singleton issue you referred to?
We might just want to attempt to fix it on our own with the current code we have.



Posted By: acunningham1
Date Posted: 06 December 2016 at 4:10pm
Ok so it was deadlocking on a critical section.  This critical section was part of the singleton thread safety added to VS2015.   
Adding the compiler option /Zc:threadSafeInit- to all configurations when building ToolkitPro libs/dls from source fixed the problem.
That compiler option turns off the new thread safety in vs2015 and reverts to the old behavior of 2012.






Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net