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

Re: seg fault in svn_client_revprop_set

From: Jeremy Pereira <jeremyp_at_jeremyp.net>
Date: 2007-06-27 11:51:53 CEST

On 26 Jun 2007, at 22:14, Ryan McLelland wrote:

> Hi,
> I am building an svn client using the c/c++ apis and I am trying to
> provide project-based version numbers for the users, (even though
> all projects will be in one repository). I'm trying to do it by
> setting properties of each projects folder in the repository, i.e.
> set property "v1" to "rev1", then when they commit this project the
> next time, set property "v2" to "revxx", with xx being whatever
> revision the whole repository is at that point. I can then read
> the properties and checkout the appropriate revision when they ask
> for version x of their project. Anyway, I'm getting a segmentation
> fault in the following line of code:
> long rev_set;
> err = svn_client_revprop_set("latest_v",(svn_string_t*) ltoa
> (current_revision).c_str(),
> proj_url.c_str(), &rev,
> (svn_revnum_t*) &rev_set, TRUE, ctx, pool);

It's a long time since I've done any C++ and maybe the conversion is
done automatically, but it looks to me like you are passing a char*
as the second parameter and not an svn_string_t*.

> the current_revision is taken from the commit_info struct of a
> commit just before this call, and it is correct. The following is a
> stack trace from my debugger:
> _memcpy, FP=fc374cf0
> apr_file_write, FP=fc374cf0
> apr_file_write_full, FP=fc374d70
> svn_io_file_write_full, FP=fc374de0
> create_temp_file, FP=fc374e60
> ...pos__hooks_pre_revprop_change, FP=fc374f18
> svn_repos_fs_change_rev_prop2, FP=fc374fa8
> svn_ra_local__change_rev_prop, FP=fc375030
> svn_ra_change_rev_prop, FP=fc3750a0
> svn_client_revprop_set, FP=fc375130
> C++ **My Function**, FP=fc37a428
> any help would be much appreciated.
> Thanks,
> -Ryan

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Jun 27 12:01:26 2007

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

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