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

Re: Visual Studio loader lock errors

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: Fri, 03 Oct 2008 19:43:37 +0200

Chris Marshall wrote:
> On Oct 2, 7:52 pm, Stefan Küng <tortoise..._at_gmail.com> wrote:
>> A CWinApp in a COM-object is not good. But if it's required, it
>> shouldn't cause much problems (depending on your InitInstance).
>>
> ...
>> If that's all your InitInstance is doing, then that's ok.
>> And make sure that you don't have any global objects which do something
>> in their constructors.
>
> I agree using a CWinApp is odd - it's not my code ;) - and I can't see
> exactly why it was done that way. I've gone through the code as best I
> can and can't find any suspicious initializations
>
>> In the settings dialog, activate the option:
>> Settings->Icon overlays->Show overlays and context menu items only in
>> explorer
>
> Changing this doesn't make any difference. The loader lock errors
> still occur.
>
> Since TortoiseSVN is all native code, as is the DLL where the problem
> occurs it's looking increasingly likely that this is either a false
> positive from Visual Studio, or the problem is somewhere else
> entirely. Not sure how I'm going to track it down though. So far the
> presence/absence of TortoiseSVN is the only thing that seems to affect
> it.
>
> The only other idea that I can come up with at the moment is that this
> is some kind of timing issue. Whilst my app isn't multithreaded I know
> the .NET runtimes have background threads (e.g for the garbage
> collector). Maybe one of these is trying to run something in the
> background whilst the DLL still has the loader lock. Have you made any
> changes since 1.4.8 that could significantly affect the time it takes
> to load/initialize the DLLs? That said the behavior is quite
> consistent, which would be unusual for a timing issue.

If you enabled the option to only show overlays in explorer, then only
the TortoiseStub dll is loaded. That dll checks the name of the process
it is loaded in and prevents loading the 'real' dll from getting loaded.
And the stub dll is the bare minimum:
http://tortoisesvn.tigris.org/svn/tortoisesvn/trunk/src/TortoiseShell/TortoiseStub.c
(username 'guest', leave password emtpy)

> I'm going to have to see if I can reproduce this in a simpler example.
> Just out of curiosity, do the TortoiseSVN DLLs get loaded into all
> processes or does the app need to do/depend on something to cause them
> to be brought in?

Not every process. It is loaded by some shell APIs, and of course the
file-open/save dialogs.

Stefan

-- 
       ___
  oo  // \\      "De Chelonian Mobile"
 (_,\/ \_/ \     TortoiseSVN
   \ \_/_\_/>    The coolest Interface to (Sub)Version Control
   /_/   \_\     http://tortoisesvn.net

Received on 2008-10-03 19:43:51 CEST

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.