Hey All-
I am writing an application with under win32, and I've run into a number 
of bugs I think have to do with the perl bindings. I have:
perl 5.8.8 (This is perl, v5.8.8 built for MSWin32-x86-multi-thread)
SVN/Perl bindings 1.3.1
One error that is sporadic and difficult to reproduce is the "Attempting 
to free an unreferenced scalar" error. I can cause it in my application, 
but every time I try to make a simplified test case, it goes away *shrug*
Another error that is reproducible though is this:
Argument "Test Log Message" isn't numeric in subroutine entry at 
c:/vanilla-perl/perl/site/lib/SVN/Core.pm line 417.
After that, the perl interpreter segfaults.
"Test Log Message" is the value returned by the log_msg callback. Below 
is the script that causes the error, and after that I have pasted the 
output of the script. If I comment out the line that sets the log_msg 
callback, the error doesn't occur (although, nothing happens to the 
repository, so it's not really an option)
Thanks in advance-
Andrew
---svnerror.pl--
#!/usr/bin/perl
use strict;
use warnings;
use SVN::Client;
use SVN::Core;
use Data::Dumper;
print STDERR "SVN Version: " . $SVN::Core::VERSION ."\n";
main->mkdir ( 'clients/1' );
main->delete( 'clients/1' );
sub _getClient {
        my $ctx = new SVN::Client();
        $ctx->log_msg( \&log_msg );
        return $ctx;
}
# XXX replace this
sub getSVNRepos { return "file:///f:/mine/dev/wofpanel/svnrepos/"; }
sub mkdir {
        my $self = shift;
        my $dir = shift;
        my $ctx       = _getClient();
        $ctx->mkdir([getSVNRepos() . $dir]);
}
sub delete {
        my $self = shift;
        my $del = shift;
        my $ctx       = _getClient();
        $ctx->delete([getSVNRepos() . $del],1);
}
sub log_msg {
        print "Incoming Log: " . Dumper \@_;
        my $logmsg = "Test Log Message";					
        $_[0] = \$logmsg;
        1;
}
--output--
F:\mine\dev\wofpanel\backend\bin>perl svnerror.pl
SVN Version: 1.3.1
Incoming Log: $VAR1 = [
           \undef,
           \undef,
           [
             bless( do{\(my $o = 12984552)}, _p_svn_client_commit_item_t' )
           ],
           bless( do{\(my $o = 12894264)}, '_p_apr_pool_t' )
         ];
Incoming Log: $VAR1 = [
           \undef,
           \undef,
           [
             bless( do{\(my $o = 13063752)}, '_p_svn_client_commit_item_t' )
           ],
           bless( do{\(my $o = 13006264)}, '_p_apr_pool_t' )
         ];
Argument "Test Log Message" isn't numeric in subroutine entry at 
c:/vanilla-perl
/perl/site/lib/SVN/Core.pm line 417.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Jun  3 07:29:03 2006