lmdu/pyfastx

Pointer being freed was not allocated error with `memory_index=True`

mihaitodor opened this issue · 2 comments

Hey @lmdu, thank you for this package! I downloaded the GRCh38 build Reference Genome Sequence FASTA file from here https://www.ncbi.nlm.nih.gov/genome/guide/human/ (direct link) and ran the following code:

import pyfastx


GRCh38_ref_seq_fasta = pyfastx.Fasta('FASTA/GRCh38_latest_genomic.fna.gz', memory_index=True)

s = GRCh38_ref_seq_fasta['NC_000005.10']
print(s[10000:10030])

which outputs the following:

taaccctaaccctaaccctaaccctaaccc
Python(44578,0x11e8dcdc0) malloc: *** error for object 0x10facc684: pointer being freed was not allocated
Python(44578,0x11e8dcdc0) malloc: *** set a breakpoint in malloc_error_break to debug
Abort trap: 6

I haven't dug through the code yet, but please let me know if you need more information to diagnose this issue.

lmdu commented

Try the new version 2.0.0

Wonderful, that fixed it. I was on 0.9.1 before and I completely forgot to check if there's a new release. Thank you very much for the quick reply @lmdu! ❤️