[Bioperl-l] Query re segementation error from Bio::Index::Fasta

Jason Stajich jason@cgt.mc.duke.edu
Mon, 16 Dec 2002 14:29:55 -0500 (EST)


Nice one Peter - I remember us batting something like this before around.
I can't remember what the reason was though...  Will try dig it out from
memory.  But can definitely reproduce this on RH7.3 too.  Can you submit
it to bugzilla (http://bugzilla.bioperl.org) so we can start a log around
this (and be able to find it again when needed).

-jason

On Mon, 16 Dec 2002, 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
>

--
Jason Stajich
Duke University
jason at cgt.mc.duke.edu