Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Skin Framework
  New Posts New Posts RSS Feed - [solved] v18.0.1 multi thread  problem
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

[solved] v18.0.1 multi thread problem

 Post Reply Post Reply
Author
Message
angelsoriasanagustin View Drop Down
Groupie
Groupie


Joined: 16 September 2015
Location: Spain
Status: Offline
Points: 46
Post Options Post Options   Thanks (0) Thanks(0)   Quote angelsoriasanagustin Quote  Post ReplyReply Direct Link To This Post Topic: [solved] v18.0.1 multi thread problem
    Posted: 09 August 2017 at 7:03am
Hi.
My code was working good with v 17, when I updated to v18.0.1 I had found a strange problem:
I'm using XTPSkinManager()->LoadSkin(...)

This is the normal appearance:


When I create a Working Thread with: m_pThread = AfxBeginThread( process, this );

The appearance changes, and the Main window bar show the menu bar duplicated ¿¿?? Only works the upper copy:


Can you help me ?

Thanks.
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: 09 August 2017 at 8:05am
Hello,

We need sample application from you to reproduce this issue.

Regards,
 Oleksandr Lebed
Back to Top
angelsoriasanagustin View Drop Down
Groupie
Groupie


Joined: 16 September 2015
Location: Spain
Status: Offline
Points: 46
Post Options Post Options   Thanks (0) Thanks(0)   Quote angelsoriasanagustin Quote  Post ReplyReply Direct Link To This Post Posted: 09 August 2017 at 10:31am
Hi !

Here it's it: https://www.dropbox.com/s/ywnczbu5ohar1er/Test.zip?dl=0

Look at MainFrm.cpp

////////// If you comment this, all works fine ////////////
CClient c;
c.LaunchThread();
/////////////////////////////////////////////////////////////

Thanks
Best regards !

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: 09 August 2017 at 6:54pm
Hello,

Just delete in method CXTPSkinManagerApiHook::InitializeHookManagement()   line 

    IncrementAllModulesReferenceCounters(&moduleList);

and rebuild SkinFramework or ToolkitPro library.

Regards,
 Oleksandr Lebed
Back to Top
angelsoriasanagustin View Drop Down
Groupie
Groupie


Joined: 16 September 2015
Location: Spain
Status: Offline
Points: 46
Post Options Post Options   Thanks (0) Thanks(0)   Quote angelsoriasanagustin Quote  Post ReplyReply Direct Link To This Post Posted: 10 August 2017 at 6:57am
It works like a charm !

Thanks !
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: 10 August 2017 at 7:02am
Thank you for sample application and information about this bug. It made investigation much easy.
I think this will fix many strange issues in SkinFramework.
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: 12 August 2017 at 4:02am
Hello,

Problem was deeper than just reference counter, changes are complex. If you find more problems with multi threads and SkinFramework then create a support ticket and we can share new version of files.

Regards,
 Oleksandr Lebed
Back to Top
adrien View Drop Down
Senior Member
Senior Member


Joined: 30 April 2007
Location: New Zealand
Status: Offline
Points: 449
Post Options Post Options   Thanks (0) Thanks(0)   Quote adrien Quote  Post ReplyReply Direct Link To This Post Posted: 14 August 2017 at 8:22pm
Hi Oleksandr

does this mean we can expect an updated CJ (18.0.2) soon with this fixed?

Regards

Adrien
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: 15 August 2017 at 5:40am
Hello Adrien,

Unfortunately I don't know when will be next update.
Back to Top
angelsoriasanagustin View Drop Down
Groupie
Groupie


Joined: 16 September 2015
Location: Spain
Status: Offline
Points: 46
Post Options Post Options   Thanks (0) Thanks(0)   Quote angelsoriasanagustin Quote  Post ReplyReply Direct Link To This Post Posted: 25 January 2018 at 11:52am
Hi!

Multithread problems still present in 18.0.2 version Ouch
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: 25 January 2018 at 12:05pm
there is no version 18.0.2. 
We even have called next version after 
18.0.1  as 18.2.0  to prevent  confusing with 18.1.0 Smile

I have tried your sample with 18.2 and it works fine. What is problem in this time ?
Back to Top
angelsoriasanagustin View Drop Down
Groupie
Groupie


Joined: 16 September 2015
Location: Spain
Status: Offline
Points: 46
Post Options Post Options   Thanks (0) Thanks(0)   Quote angelsoriasanagustin Quote  Post ReplyReply Direct Link To This Post Posted: 26 January 2018 at 7:46am
Same as first post.

I don't have the test project that I sent you, please send to me and I'll try with it.
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: 26 January 2018 at 9:03am
I have tested your sample also with current repository and all work as expected. I will send it later because don't have access to it right now.
Back to Top
angelsoriasanagustin View Drop Down
Groupie
Groupie


Joined: 16 September 2015
Location: Spain
Status: Offline
Points: 46
Post Options Post Options   Thanks (0) Thanks(0)   Quote angelsoriasanagustin Quote  Post ReplyReply Direct Link To This Post Posted: 01 February 2018 at 12:29pm
I have tested the sample and works fine. I'm going to test the main app... I will inform you...
Thanks.
Back to Top
angelsoriasanagustin View Drop Down
Groupie
Groupie


Joined: 16 September 2015
Location: Spain
Status: Offline
Points: 46
Post Options Post Options   Thanks (0) Thanks(0)   Quote angelsoriasanagustin Quote  Post ReplyReply Direct Link To This Post Posted: 02 February 2018 at 7:13am
The Sample code works fine, but my main app has the same problem as first post, and It's is related with the threads.
I'm trying to reproduce It in the sample project....
Back to Top
mcm View Drop Down
Newbie
Newbie


Joined: 05 March 2018
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote mcm Quote  Post ReplyReply Direct Link To This Post Posted: 05 March 2018 at 8:29am
I am experiencing the same issue in my multi threaded application. On some computers it works and on others usually fast computers it doesn't work. If I run the application in debug mode it works but not in release mode where everything is executes faster.

This is a racing condition.

From what I have been able to gather, the problem is the critical sections of various natur that has been implemented in ToolkitPro. The implementation of the critical sections allows for racing conditions, and hence they fail under incertain conditions.

So far I have replaced the content of the CXTPSimpleCriticalSection with a CMutex which does half the trick.
I'm trying to understand how the other critical sections were intended to work, and exchange these with standard synchronisation objects like CMutes.

I would appreciate any feedback.
Back to Top
angelsoriasanagustin View Drop Down
Groupie
Groupie


Joined: 16 September 2015
Location: Spain
Status: Offline
Points: 46
Post Options Post Options   Thanks (0) Thanks(0)   Quote angelsoriasanagustin Quote  Post ReplyReply Direct Link To This Post Posted: 06 March 2018 at 6:33am
Hi.
We can't find a reason. A sample application sent to CodeJock fails with older version, but with the actual version works, but the main application still having same problem. We don't find any cause, and need more time to investigate. We will check your conclusions.

CodeJock team, please don't forget this problem. We are using old libraries, because new ones are not working for us. 
Back to Top
Rami View Drop Down
Newbie
Newbie


Joined: 15 January 2019
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote Rami Quote  Post ReplyReply Direct Link To This Post Posted: 10 February 2019 at 9:41pm
Hi.

I'm experiencing the same issue with Xtreme Toolkit Pro v18.6.0.

The test project is no longer available for me to download.

Can it be made available again?

Thank you.
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.156 seconds.