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

Re: Tortoise brings down xplorer2

From: Tobias Schäfer <tobiasschaefer_at_gmx.de>
Date: 2006-05-10 18:40:02 CEST

Forwarding and hoping that someone has an idea.

Tobias

---------- Forwarded Message ----------

Subject: Xplorer2 and tortoiseSVN
Date: Wednesday 10 May 2006 16:37
From: "zabkat info" <info@zabkat.com>

Hi Tobias and thanks for checking out the crash I posted to the developers
group; I tried to reply there but my outlook express looks daft so anyway I
hope you won't mind my contacting you directly!

Here's what I try to post in the group:

"Tobias Schäfer" <tobiasschaefer@gmx.de> wrote in message
news:200605092204.19199.tobiasschaefer@gmx.de...

> I can confirm that this crash is also reproducible with the latest
> nightly build of TSVN

thanks for looking into it Tobias! we get the same crash at the exact same
location

> "Unhandled exception at 0x7c9fb06f in xplorer2_UC.exe: 0xC0000005: Access
> violation reading location 0x01840044."

this address is a bit weird but could be down to the "funny" way OLE
 exposes dataobjects to different threads

> Stacktrace:
> TortoiseSVN.dll!ItemIDList::toString() Line 95 + 0x22 bytes C++
> TortoiseSVN.dll!CShellExt::Initialize(const _ITEMIDLIST *
> pIDFolder=0x00000000, IDataObject * pDataObj=0x00cee310, HKEY__ *
> __formal=0x0000025e) Line 162 + 0x12 bytes C++
>
> Abviously parent_ is not null but not valid either. The same also applies
> to the variable item_ in line 106. It is also not null but not valid.

I don't have access to the source code (I don't want to either :), but I
return the IDList requested as such within the medium:

HGLOBAL hMem = GlobalAlloc(GMEM_SHARE | GMEM_MOVEABLE, m_uTotalSize);
LPVOID pv = GlobalLock(hMem);
memcpy(pv, m_pCIDA, m_uTotalSize);
GlobalUnlock(hMem);
pmedium->hGlobal = hMem;
pmedium->tymed = TYMED_HGLOBAL;

could tortoise be doing any assumptions about movable memory? are you
locking the memory before access?

also note that the way x2 prepares the CIDA for multiple folders is such
that the "root" is the common folder and as such not necessarily the
desktop, e.g if you had 2 items like:

c:\temp\a.txt
c:\temp\folder\b.cpp

the root folder would be "c:\temp" and the 2 items will be stored as
 "a.txt" and "folder\b.cpp" (of course as pidls). But if you use the
 following macros to access the items and you merge the root with each one
 you shouldn't have any problems:

#define HIDA_GetPIDLFolder(pida)
(LPCITEMIDLIST)(((LPBYTE)pida)+(pida)->aoffset[0])
#define HIDA_GetPIDLItem(pida, i)
(LPCITEMIDLIST)(((LPBYTE)pida)+(pida)->aoffset[i+1])

could tortoise assume that the root in the cida would be the desktop and
each item below would be a full pidl?

thanks
nikos

---
www.zabkat.com
-------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Wed May 10 18:40:44 2006

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

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