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

Re: Crash in svn_client_switch()

From: SteveKing <steveking_at_gmx.ch>
Date: 2005-06-23 20:51:16 CEST

Philip Martin wrote:
> SteveKing <steveking@gmx.ch> writes:
>
>
>>another crashreport sent for TSVN, but happens actually in the
>>Subversion lib:
>>
>>svn_client_switch() (switch.c: line 154)
>> svn_wc_crawl_revisions2() (adm_crawler.c: line 489)
>>
>>The reason for the crash:
>>the line 489 in adm_crawler.c reads
>> base_rev = parent_entry->revision;
>>and 'parent_entry' is NULL.
>>
>>The 'parent_entry' should be set in svn_wc_entry(), but obviously it
>>isn't and no error is returned.
>
>
> svn_wc_entry documents when NULL will be returned, it's not an error.

Well, then you should check if 'parent_entry' is NULL before you access
a member of it.

> The question (as always) is how do you trigger this crash. Can you

That's (as always) the problem. You see, I just receive crashreports,
i.e. dump files automatically generated, by mail. And even though we
tell users to describe what they were doing when the crash happened and
what their working copy looked like, ... they don't do that. Mostly
because they don't speak english. For example, this crashreport was sent
from a .ru domain, so no chance for me to get an answer.

> describe the working copy state and the switch parameters? If we
> decide to trap the NULL, which looks like a reasonable thing to do to
> me, then I guess we simply return an ENTRY_NOT_FOUND error which means
> the switch will fail.

 From the paths used (which are sometimes visible in the crashreport,
depending on where the crash happened) I figure it's a nested wc layout.
The path was c:/dev/<some utf8 chars>/nested_2/ - so I guess the
'nested_2' indicates another working copy inside the real working copy.

I think for situations like this, where we can't be sure why a crash
happens I suggest to insert an svnassert() function which returns an
error with a text like
"a situation occured which shouldn't have. Please report this on the
Subversion mailing list, and include the command you used, what your
working copy looks like, ... and be prepared to answer questions from
the developers trying to fix this issue"

That way, a crash can be avoided, and the users know that they should
report this on the mailing list for further investigation.

Stefan

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Jun 23 20:52:42 2005

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

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