On 25.10.2013 14:31, Maximo, Andre (GE Global Research) wrote:
> Thanks Bert again and Ben for joining.
>
> I am handling the error in the code (I just omitted for clarity), but the execution I am describing never throws an error. I also have tested passing the same pool and using the GetBuffer() method, but down to the same segfault at the svn_client_url_from_path2() call. Here is the updated code:
>
> void CVCS::svnURLPath(CString& urlPath, const CString& fullPath)
> {
> CError svnErr;
> const char *url = NULL;
> CString path(fullPath);
> svnErr.err = svn_client_url_from_path2(&url, path.GetBuffer(), m_svn_ctx, m_svn_pool, m_svn_pool);
> if (svnErr.err != NULL)
> throw svnErr;
> if (url != NULL)
> urlPath = CString(url);
> }
>
> When I pass fullPath = "C:\\WD", an error is thrown with the message: "'C:\WD' is not a working copy" (ok here, don't think it was a fluke). I then checkout from the repository to it and update it using SVN api (all ok), now "C:\WD" exists and when I call svnURLPath on it, the url is returned fine.
> I try to find another path inside it, like fullPath = "C:\\WD\\History Items\\Documents\\File.txt". The behavior I expect is an error thrown saying this path does not exist in the repository (because it really still doesn't), but the execution just crashes inside svnURLPath, more specifically in the svn_client_url_from_path2(). (I also tested with a more simple fullPath = "C:\\WD\\Test" and crashes the same). Looking at this function I notice the svn_dirent_get_absolute() call with the same "path_or_url" argument and jumped to the conclusion that this was the problem. But it may well be the second function svn_wc__node_get_url(), getting lost with an unknown path. I am not, maybe it is a Windows specific problem?
Not impossible, though highly unlikely; we'd have noticed that.
I suggest that, instead of guessing, you run this in a debugger so that
you can see exactly where the crash occurs and why. Post the result (the
stack trace with all parameter values, and local variable values at the
point of the crash) to the dev@ list.
-- Brane
--
Branko Čibej | Director of Subversion
WANdisco // Non-Stop Data
e. brane_at_wandisco.com
Received on 2013-10-25 15:46:27 CEST