I'm fairly new to c++ but I'm trying to learn. I've been tasked with implementing an old software called snpomatic in our pipelines. I could successfully build the program and run it with some datasets (i.e. a genome in fasta format and sequencing reads in fastq). However, I started getting segmentation fault errors if the fasta files used are above a size threshold (around 50-60 Mb).
I understand that it may be difficult because it's an already developed software, but I've been trying to investigate this. I wondered if anyone has any advice or could help, just in case I'm missing something easy enough.
So I've taken a look at the coredump (pasted below) and supposedly tracked the error to the line 20 in this script. I believe the stacked is overflowing when I use larger files, but I'm not sure on how I could address this.
Any advice would be appreciated. Thank you very much
The core dump by gdb:
Program terminated with signal SIGSEGV, Segmentation fault. #0 0x000055fad7b707f1 in TAlignmentOutput::add_align (this=<error reading variable: No se puede acceder a la memoria en la dirección 0x7ffca1fcd2d8>, seq=<error reading variable: No se puede acceder a la memoria en la dirección 0x7ffca1fcd2d0>, quality=<error reading variable: No se puede acceder a la memoria en la dirección 0x7ffca1fcd2c8>, pos=<error reading variable: No se puede acceder a la memoria en la dirección 0x7ffca1fcd2c4>, chromosome=<error reading variable: No se puede acceder a la memoria en la dirección 0x7ffca1fcd2c0>) at src/TAlignmentOutput.cpp:20 20 if ( align[twotoone(lane,pos)] + align[twotoone(lane,pos+seql/2-1)] + align[twotoone(lane,pos+seql-1)] == 96 ) break ;