You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by SteveKing <st...@gmx.ch> on 2004/04/22 16:04:24 UTC

crash when getting status with remote

Hi,

Even though this is about a crash in TortoiseSVN, I think that the 
problem lies somewhere in the subversion library. So please read on (if 
it turns out that I'm wrong, then beat me later :)

For some time now I'm receiving crash reports for TortoiseSVN from users 
who used the "Check for Updates" dialog. In this dialog, TSVN uses the 
svn_client_status() function with the update flag set to TRUE (so that 
the repository is contacted).

The analysis of those crashreports didn't help me much finding the bug. 
All I can say is that I really checked the TSVN source and couldn't find 
anything. The crash occurs in the file libsvn_wc/status.c, line 1325 
(from the 1.0.2 tag). But no stacktrace available to find parent functions.

The previous line (on where the crash occurs) is:
dir_status = apr_hash_get (pb->statii, db->path, APR_HASH_KEY_STRING);
I think that here the dir_status gets set to zero (because of the crash 
in the next line), but I have no idea what could cause this to become zero.

Some users also reported that this crash doesn't occur all the time, and 
only if a folder got deleted in the repository by another user.

I'd really appreciate it if someone more familliar with that part of the 
subversion code could give me a hint on how to track this bug down.

Stefan

---
Children in backseats cause accidents. Accidents in backseats cause 
children.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: crash when getting status with remote

Posted by David Kimdon <da...@kimdon.org>.
Something does appear to be wrong with that code, though I'm not sure
what (subversion/libsvn_wc/status.c:1321) :

      /* See if the directory was deleted or replaced. */
      dir_status = apr_hash_get (pb->statii, db->path, APR_HASH_KEY_STRING);
      if ((dir_status->repos_text_status == svn_wc_status_deleted)
          || (dir_status->repos_text_status == svn_wc_status_replaced))
        was_deleted = TRUE;

      /* Now do the status reporting. */
      SVN_ERR (handle_statii (eb, dir_status ? dir_status->entry : NULL,
                              db->path, db->statii, was_deleted, TRUE, pool));

Immediately after the call to apr_hash_get() we assume that
'dir_status' != NULL.   But then when we call handle_statii() we admit
that 'dir_status' might be NULL.  From what Steve described it sounds
like the first assumption is the incorrect one, but I haven't figured
out what would make 'dir_status' == NULL. . . 

-David

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org