[Bioperl-l] Query re segementation error from Bio::Index::Fasta
Lincoln Stein
lstein@cshl.org
Mon, 16 Dec 2002 15:29:45 -0500
Does it only happen with NDBM installed, or is it happening with DB_File as
well? I have been having problems with NDBM-based scripts of all sorts
segfaulting since updating to 5.6.1
Lincoln
On Monday 16 December 2002 02:03 pm, Peter Schattner wrote:
> Hi folks
>
> I'm not sure whether I've found a bug or I'm just being dumb.
>
> When I run this test script:
> ###########
>
> #! /usr/local/bin/perl -w
>
> use strict;
> use Bio::Index::Fasta;
> my $inx = Bio::Index::Fasta->new('-filename' =>
> '/home/peter/genome_data/yeast/Other_yeast.index');
>
> exit(0);
>
> sub test {
> my ($record_id) = @_;
> my $record;
> if ($record_id) { $record = $inx->fetch($record_id)};
> }
> ###########
>
> I get:
>
> [peter@pschattner test]$ perl -w scripts/test-debug.segfault.pl
> Segmentation fault
>
> When I move one line so the script reads:
> ###########
>
> #! /usr/local/bin/perl -w
>
> use strict;
> use Bio::Index::Fasta;
>
> exit(0);
>
> sub test {
> my ($record_id) = @_;
> my $record;
> my $inx = Bio::Index::Fasta->new('-filename' =>
> '/home/peter/genome_data/yeast/Other_yeast.index');
> if ($record_id) { $record = $inx->fetch($record_id)};
> }
> ###########
>
> The segmentation fault message goes away:
> [peter@pschattner test]$ perl -w scripts/test-debug.seg-no-fault.pl
> [peter@pschattner test]$
>
> Although moving the line has solved my problem, I would sure like to
> know why the first script crashes. Is the first script doing something
> illegal or is there a bug in Bio::Index?
>
> Thanks
>
> Peter
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l
--
========================================================================
Lincoln D. Stein Cold Spring Harbor Laboratory
lstein@cshl.org Cold Spring Harbor, NY
========================================================================