Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - [solved] Infinite loop with High Contrast Theme
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

[solved] Infinite loop with High Contrast Theme

 Post Reply Post Reply
Author
Message
acunningham1 View Drop Down
Newbie
Newbie
Avatar

Joined: 05 December 2016
Location: Champaign IL
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote acunningham1 Quote  Post ReplyReply Direct Link To This Post Topic: [solved] Infinite loop with High Contrast Theme
    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. :)

Back to Top
olebed View Drop Down
Admin Group
Admin Group


Joined: 01 July 2014
Location: Ukraine
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote olebed Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
acunningham1 View Drop Down
Newbie
Newbie
Avatar

Joined: 05 December 2016
Location: Champaign IL
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote acunningham1 Quote  Post ReplyReply Direct Link To This Post 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?


Back to Top
olebed View Drop Down
Admin Group
Admin Group


Joined: 01 July 2014
Location: Ukraine
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote olebed Quote  Post ReplyReply Direct Link To This Post Posted: 06 December 2016 at 11:32am
I think this will be helpful.

Also you can test new version as "30 Day Trial".
Back to Top
acunningham1 View Drop Down
Newbie
Newbie
Avatar

Joined: 05 December 2016
Location: Champaign IL
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote acunningham1 Quote  Post ReplyReply Direct Link To This Post Posted: 06 December 2016 at 2:55pm
Originally posted by olebed olebed wrote:

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.

Back to Top
acunningham1 View Drop Down
Newbie
Newbie
Avatar

Joined: 05 December 2016
Location: Champaign IL
Status: Offline
Points: 10
Post Options Post Options   Thanks (1) Thanks(1)   Quote acunningham1 Quote  Post ReplyReply Direct Link To This Post 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.



Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.172 seconds.