[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: Re: TortoiseProc.exe Hangs on Initial startup

From: Terry Fisher <terry_at_tfisher.ca>
Date: Fri, 8 Feb 2013 07:14:07 -0800 (PST)

My subsequent tests yielded the expected results: removing OnBnClickedRefresh() from OnInitDialog() and pressing "Refresh" causes the application to hang as soon as I press "Refresh".

Changing OnBnClickedRefresh() to directly call ChangedStatusThread() instead of spinning it off in another thread again corrects this problem.

I'm not an expert on MFC, but didn't think that MFC objects were thread-safe. My understanding is that any object derived from a CWnd object should not be accessed across threads because there is thread-specific info stored in these objects. In order to access these objects in a separate thread, you should Attach() a new control using the windows HWND.

eg:
CListCtrl tmpCtrl;
tmpCtlr.Attach( hwnd );

...manipulate the control using tmpCtrl

tmpCtrl.Detach();

I can't think of anything else I can try to shed more light on the problem...if there's something you want me to try, just let me know.

Terry

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3048127

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2013-02-08 16:14:11 CET

This is an archived mail posted to the TortoiseSVN Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.