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

Re: Crash during manual log cache update

From: Michael Geisinger <Sidewinder_GER_at_hotmail.com>
Date: Thu, 27 May 2010 23:55:57 +0200


Am 11.05.2010 19:25, schrieb Stefan Küng:
> I've disabled the possibility to update multiple caches at once some
> time ago on trunk. That takes care of the crash :)

Sorry for the late answer, but I was waiting for a nightly to contain
the fix, but so far I couldn't find one, at least not on the
subversion-1.6.x line, and I don't want to risk my working copies being
upgraded to 1.7. I have tested 1.6.99, Build 19540 64bit.

So I digged some further into this and I think the bug is actually *not*
completely fixed :) That's also why I couldn't find it fixed on trunk,
because I intuitively used a "workaround" for the fix. But read on.

It's correct that in r17700 from Nov 2009 you introduced some measures
to disable the "Update" button while an update is running. See diff:


The important part clearly is:

253 InterlockedExchange(&dialog->m_bThreadRunning, TRUE);
257 dialog->DialogEnableWindow(IDC_CACHEUPDATE, false);
316 dialog->DialogEnableWindow(IDC_CACHEUPDATE, true);
318 InterlockedExchange(&dialog->m_bThreadRunning, FALSE);

However, if one changes the selection in the list view while an update
is running (which is possible because the update window is not modal),
the following code gets active, actually re-enabling the "Update" button:

323 UINT count = m_cRepositoryList.GetSelectedCount();
325 GetDlgItem(IDC_CACHEUPDATE)->EnableWindow(count == 1);

I guess this should be changed to:

                EnableWindow(!m_bThreadRunning && count == 1);

(assuming there are no synchronization mechanisms needed to access

We should probably also avoid any items from being deleted or looked up
details upon while the update is running, which is why all lines 331-334
should be updated with the additional check.

Do you agree?

Best regards,
Michael 'Sidewinder' Geisinger
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2010-05-27 23:56:34 CEST

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