Print Page | Close Window

[solved] v18.0.1 multi thread problem

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Skin Framework
Forum Description: Topics Related to Codejock Skin Framework
URL: http://forum.codejock.com/forum_posts.asp?TID=23411
Printed Date: 21 November 2024 at 9:41am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: [solved] v18.0.1 multi thread problem
Posted By: angelsoriasanagustin
Subject: [solved] v18.0.1 multi thread problem
Date 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.



Replies:
Posted By: olebed
Date Posted: 09 August 2017 at 8:05am
Hello,

We need sample application from you to reproduce this issue.

Regards,
 Oleksandr Lebed


Posted By: angelsoriasanagustin
Date 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 !



Posted By: olebed
Date 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


Posted By: angelsoriasanagustin
Date Posted: 10 August 2017 at 6:57am
It works like a charm !

Thanks !


Posted By: olebed
Date 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.


Posted By: olebed
Date 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


Posted By: adrien
Date 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


-------------
http://www.wingate.com - http://www.wingate.com


Posted By: olebed
Date Posted: 15 August 2017 at 5:40am
Hello Adrien,

Unfortunately I don't know when will be next update.


Posted By: angelsoriasanagustin
Date Posted: 25 January 2018 at 11:52am
Hi!

Multithread problems still present in 18.0.2 version Ouch


Posted By: olebed
Date 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 ?


Posted By: angelsoriasanagustin
Date 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.


Posted By: olebed
Date 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.


Posted By: angelsoriasanagustin
Date 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.


Posted By: angelsoriasanagustin
Date 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....


Posted By: mcm
Date 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.


Posted By: angelsoriasanagustin
Date 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. 


Posted By: Rami
Date 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.



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