You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by "Prystash,John" <pr...@oclc.org> on 2007/08/21 13:45:25 UTC

Perl bindings: SVN::Repos::open() seg fault

Hey Everyone, I'm getting a segmentation fault when attempting to run
the following code in Perl 

	use Carp;
	use SVN::Core;
	use SVN::Fs;
	use SVN::Repos;

	my $path = shift;

	croak "Repository path required.\n" unless $path;

	print "\nOpening repository: $path\n\n";
	my $repos = SVN::Repos::open($path);

When I try to step into the SVN::Repos::open() call, the debugger hangs,
so I'm having a hard time narrowing things down.

When building the bindings, everything passed and went well, I've had no
other problems I can think of.

Thanks in advance for any insight.

__________________
John Prystash x6469


RE: RE: Perl bindings: SVN::Repos::open() seg fault

Posted by "Prystash,John" <pr...@oclc.org>.
Ok I should be ashamed of myself... $path was not being passed in, so
SVN::Repos::open was being called with an empty $path... :) 

-----Original Message-----
From: Prystash,John 
Sent: Wednesday, August 22, 2007 12:57 PM
To: Prystash,John; David Glasser
Cc: dev@subversion.tigris.org
Subject: RE: RE: Perl bindings: SVN::Repos::open() seg fault


Well I guess I should of added the pool to the subroutine call?  Same
result however

    my $pool  = SVN::Pool->new_default;
    my $repos = SVN::Repos::open($path, $pool); 

-----Original Message-----
From: Prystash,John [mailto:prystasj@oclc.org]
Sent: Wednesday, August 22, 2007 12:47 PM
To: David Glasser
Cc: dev@subversion.tigris.org
Subject: RE: Perl bindings: SVN::Repos::open() seg fault


I tried creating a pool with no change.

Also, I'm using the bindings that came with 1.4.3.

    # try opening a pool to take care of the segmentation faults
    my $pool = SVN::Pool->new_default();

    # open the repository
    print "\nOpening repository: $path\n\n";

    my $repos = SVN::Repos::open($path);

Debugger listing, segmentation fault occurs during the call to
SVN::Repos::open()

main::list_transactions(list_txns.pl:21):
21:         my $pool = SVN::Pool->new_default();
  DB<1> n
main::list_transactions(list_txns.pl:24):
24:         print "\nOpening repository: $path\n\n";
  DB<1> x $pool
0  SVN::Pool=REF(0xb2f280)
   -> _p_apr_pool_t=SCALAR(0xb30350)
         -> 12034024
  DB<2> n

Opening repository: 

main::list_transactions(list_txns.pl:26):
26:         my $repos = SVN::Repos::open($path); 

-----Original Message-----
From: dglasser@gmail.com [mailto:dglasser@gmail.com] On Behalf Of David
Glasser
Sent: Tuesday, August 21, 2007 9:56 AM
To: Prystash,John
Cc: dev@subversion.tigris.org
Subject: Re: Perl bindings: SVN::Repos::open() seg fault

On 8/21/07, Prystash,John <pr...@oclc.org> wrote:
>
>
>
>
> Hey Everyone, I'm getting a segmentation fault when attempting to run 
> the following code in Perl
>
>         use Carp;
>         use SVN::Core;
>         use SVN::Fs;
>         use SVN::Repos;
>
>         my $path = shift;
>
>         croak "Repository path required.\n" unless $path;
>
>         print "\nOpening repository: $path\n\n";
>         my $repos = SVN::Repos::open($path);
>
> When I try to step into the SVN::Repos::open() call, the debugger 
> hangs, so I'm having a hard time narrowing things down.
>
> When building the bindings, everything passed and went well, I've had 
> no other problems I can think of.

I haven't played with the bindings for a while, but you might have to
set up a pool first with SVN::Pool->new_default; ?

--dave

--
David Glasser | glasser@davidglasser.net | http://www.davidglasser.net/

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

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


Re: RE: Perl bindings: SVN::Repos::open() seg fault

Posted by Stefan Sperling <st...@elego.de>.
On Wed, Aug 22, 2007 at 12:56:45PM -0400, Prystash,John wrote:
> 
> Well I guess I should of added the pool to the subroutine call?  Same
> result however
> 
>     my $pool  = SVN::Pool->new_default;
>     my $repos = SVN::Repos::open($path, $pool); 

No, the current default pool is used if you don't pass an explicit pool.
You might also want a subpool there, not a new default pool.
See the SVN::Core man page.

-- 
Stefan Sperling <st...@elego.de>                 Software Developer
elego Software Solutions GmbH                            HRB 77719
Gustav-Meyer-Allee 25, Gebaeude 12        Tel:  +49 30 23 45 86 96 
13355 Berlin                              Fax:  +49 30 23 45 86 95
http://www.elego.de                 Geschaeftsfuehrer: Olaf Wagner

RE: RE: Perl bindings: SVN::Repos::open() seg fault

Posted by "Prystash,John" <pr...@oclc.org>.
Well I guess I should of added the pool to the subroutine call?  Same
result however

    my $pool  = SVN::Pool->new_default;
    my $repos = SVN::Repos::open($path, $pool); 

-----Original Message-----
From: Prystash,John [mailto:prystasj@oclc.org] 
Sent: Wednesday, August 22, 2007 12:47 PM
To: David Glasser
Cc: dev@subversion.tigris.org
Subject: RE: Perl bindings: SVN::Repos::open() seg fault


I tried creating a pool with no change.

Also, I'm using the bindings that came with 1.4.3.

    # try opening a pool to take care of the segmentation faults
    my $pool = SVN::Pool->new_default();

    # open the repository
    print "\nOpening repository: $path\n\n";

    my $repos = SVN::Repos::open($path);

Debugger listing, segmentation fault occurs during the call to
SVN::Repos::open()

main::list_transactions(list_txns.pl:21):
21:         my $pool = SVN::Pool->new_default();
  DB<1> n
main::list_transactions(list_txns.pl:24):
24:         print "\nOpening repository: $path\n\n";
  DB<1> x $pool
0  SVN::Pool=REF(0xb2f280)
   -> _p_apr_pool_t=SCALAR(0xb30350)
         -> 12034024
  DB<2> n

Opening repository: 

main::list_transactions(list_txns.pl:26):
26:         my $repos = SVN::Repos::open($path); 

-----Original Message-----
From: dglasser@gmail.com [mailto:dglasser@gmail.com] On Behalf Of David
Glasser
Sent: Tuesday, August 21, 2007 9:56 AM
To: Prystash,John
Cc: dev@subversion.tigris.org
Subject: Re: Perl bindings: SVN::Repos::open() seg fault

On 8/21/07, Prystash,John <pr...@oclc.org> wrote:
>
>
>
>
> Hey Everyone, I'm getting a segmentation fault when attempting to run 
> the following code in Perl
>
>         use Carp;
>         use SVN::Core;
>         use SVN::Fs;
>         use SVN::Repos;
>
>         my $path = shift;
>
>         croak "Repository path required.\n" unless $path;
>
>         print "\nOpening repository: $path\n\n";
>         my $repos = SVN::Repos::open($path);
>
> When I try to step into the SVN::Repos::open() call, the debugger 
> hangs, so I'm having a hard time narrowing things down.
>
> When building the bindings, everything passed and went well, I've had 
> no other problems I can think of.

I haven't played with the bindings for a while, but you might have to
set up a pool first with SVN::Pool->new_default; ?

--dave

--
David Glasser | glasser@davidglasser.net | http://www.davidglasser.net/

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

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


RE: Perl bindings: SVN::Repos::open() seg fault

Posted by "Prystash,John" <pr...@oclc.org>.
I tried creating a pool with no change.

Also, I'm using the bindings that came with 1.4.3.

    # try opening a pool to take care of the segmentation faults
    my $pool = SVN::Pool->new_default();

    # open the repository
    print "\nOpening repository: $path\n\n";

    my $repos = SVN::Repos::open($path);

Debugger listing, segmentation fault occurs during the call to
SVN::Repos::open()

main::list_transactions(list_txns.pl:21):
21:         my $pool = SVN::Pool->new_default();
  DB<1> n
main::list_transactions(list_txns.pl:24):
24:         print "\nOpening repository: $path\n\n";
  DB<1> x $pool
0  SVN::Pool=REF(0xb2f280)
   -> _p_apr_pool_t=SCALAR(0xb30350)
         -> 12034024
  DB<2> n

Opening repository: 

main::list_transactions(list_txns.pl:26):
26:         my $repos = SVN::Repos::open($path); 

-----Original Message-----
From: dglasser@gmail.com [mailto:dglasser@gmail.com] On Behalf Of David
Glasser
Sent: Tuesday, August 21, 2007 9:56 AM
To: Prystash,John
Cc: dev@subversion.tigris.org
Subject: Re: Perl bindings: SVN::Repos::open() seg fault

On 8/21/07, Prystash,John <pr...@oclc.org> wrote:
>
>
>
>
> Hey Everyone, I'm getting a segmentation fault when attempting to run 
> the following code in Perl
>
>         use Carp;
>         use SVN::Core;
>         use SVN::Fs;
>         use SVN::Repos;
>
>         my $path = shift;
>
>         croak "Repository path required.\n" unless $path;
>
>         print "\nOpening repository: $path\n\n";
>         my $repos = SVN::Repos::open($path);
>
> When I try to step into the SVN::Repos::open() call, the debugger 
> hangs, so I'm having a hard time narrowing things down.
>
> When building the bindings, everything passed and went well, I've had 
> no other problems I can think of.

I haven't played with the bindings for a while, but you might have to
set up a pool first with SVN::Pool->new_default; ?

--dave

--
David Glasser | glasser@davidglasser.net | http://www.davidglasser.net/

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


Re: Perl bindings: SVN::Repos::open() seg fault

Posted by David Glasser <gl...@davidglasser.net>.
On 8/21/07, Prystash,John <pr...@oclc.org> wrote:
>
>
>
>
> Hey Everyone, I'm getting a segmentation fault when attempting to run the
> following code in Perl
>
>         use Carp;
>         use SVN::Core;
>         use SVN::Fs;
>         use SVN::Repos;
>
>         my $path = shift;
>
>         croak "Repository path required.\n" unless $path;
>
>         print "\nOpening repository: $path\n\n";
>         my $repos = SVN::Repos::open($path);
>
> When I try to step into the SVN::Repos::open() call, the debugger hangs, so
> I'm having a hard time narrowing things down.
>
> When building the bindings, everything passed and went well, I've had no
> other problems I can think of.

I haven't played with the bindings for a while, but you might have to
set up a pool first with SVN::Pool->new_default; ?

--dave

-- 
David Glasser | glasser@davidglasser.net | http://www.davidglasser.net/

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