The BAM file isn't the problem. It seems that you're trying to use a custom fasta file where the sequences are on lines of variable length (this commonly occurs if each chromosome/contig is on its own line). The simplest way to fix that is to simply run:
fold -w 80 foo.fa > bar.fa
and then import
bar.fa. This will work as long as you don't have any really long chromosome/contig descriptors (just check those with
grep ">" foo.fa).
Looked at their code that is throwing this error (search for the error message) seems the index file (fai) is giving issues for the fasta file you are using as a reference
//We loop through, generating a new FastaSequenceIndexEntry //every time we see a new header line, or when the file ends.
//The last line can have a different number of bases/bytes
To troubleshoot you can try loading the bam file with a standard reference sequence (hg19/18).