Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

invalid memory address or nil pointer dereference #99

Closed
5 tasks done
komalsrathi opened this issue Jan 25, 2019 · 2 comments
Closed
5 tasks done

invalid memory address or nil pointer dereference #99

komalsrathi opened this issue Jan 25, 2019 · 2 comments

Comments

@komalsrathi
Copy link

komalsrathi commented Jan 25, 2019

Hi,

Here are the details of the issue I am facing. I have attached drive links to the query and annotation vcf files (they are both very small).

conf:

[[annotation]]
file="gnomad.exomes.r2.0.1.sites.subset.no-VEP.nohist.tidy.vcf.gz"
fields = ["AF", "AF_AFR", "AF_AMR", "AF_ASJ", "AF_FIN", "AF_NFE", "AF_OTH", "AF_SAS"]
names = ["gnomad_AF", "gnomad_AF_AFR", "gnomad_AF_AMR", "gnomad_AF_ASJ", "gnomad_AF_FIN", "gnomad_AF_NFE", "gnomad_AF_OTH", "gnomad_AF_SAS"]
ops=["max", "max", "max", "max", "max", "max", "max", "max"] 

Gnomad annotation (minimal subset):
https://drive.google.com/open?id=1Adra0ddMWJEeGbEy9_CEWhYXDEsVkLt6

Minimal query file (vcf.gz):
https://drive.google.com/open?id=1i4ndYYhn81iSxg6aV7kXX8WFXX_kZd3Y

Command:

vcfanno -lua rare-disease.lua rare-disease.conf 27571P-gatk-haplotype-annotated.vcf.gz | gzip -c > 27571P-gatk-haplotype-gnomad-annotated.vcf.gz

Error:


=============================================
vcfanno version 0.2.8 [built with go1.8]

see: https://github.com/brentp/vcfanno
=============================================
vcfanno.go:115: found 8 sources from 1 files
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0xf8 pc=0x4fa206]

goroutine 1 [running]:
github.com/biogo/hts/bgzf.(*Reader).Read(0x0, 0xc4204aa000, 0x10000, 0x10000, 0x4, 0xc4203810c8, 0xc4201b93d0)
	/home/brentp/go/src/github.com/biogo/hts/bgzf/reader.go:513 +0x26
bufio.(*Reader).fill(0xc42046c2a0)
	/home/brentp/go/go1.8/src/bufio/bufio.go:97 +0x117
bufio.(*Reader).ReadSlice(0xc42046c2a0, 0xc4201b940a, 0x40ec92, 0xc4203a7f80, 0x30, 0x30, 0x79f7a0)
	/home/brentp/go/go1.8/src/bufio/bufio.go:338 +0xbb
bufio.(*Reader).ReadBytes(0xc42046c2a0, 0x20a, 0x7591c0, 0xc4201b9501, 0xc4202ffa00, 0x30, 0x0)
	/home/brentp/go/go1.8/src/bufio/bufio.go:416 +0x66
bufio.(*Reader).ReadString(0xc42046c2a0, 0xa, 0x40, 0xc4202ffa00, 0x0, 0x40)
	/home/brentp/go/go1.8/src/bufio/bufio.go:456 +0x38
github.com/brentp/vcfgo.NewReader(0x92b9e0, 0x0, 0x934301, 0xc420498000, 0xc4201b98b8, 0x4f95f6)
	/home/brentp/go/src/github.com/brentp/vcfgo/reader.go:70 +0x4b3
github.com/brentp/irelate/parsers.Vopen(0x92b9e0, 0x0, 0x0, 0x0, 0x0, 0xc4200c4ea0)
	/home/brentp/go/src/github.com/brentp/irelate/parsers/vcf.go:40 +0x48a
github.com/brentp/irelate/parsers.VCFIterator(0x92b9e0, 0x0, 0x1, 0x0, 0x92b9a0, 0xc420014470, 0x0)
	/home/brentp/go/src/github.com/brentp/irelate/parsers/vcf.go:83 +0x42
main.main()
	/home/brentp/go/src/github.com/brentp/vcfanno/vcfanno.go:154 +0xbd0
  • minimal conf and lua files that you are using.
  • urls or actual files for annotations in conf file.
  • minimal query file.
  • the command you used to invoke vcfanno
  • the full error message
@brentp
Copy link
Owner

brentp commented Jan 30, 2019

hi, sorry for the delay and thanks for the full data to reproduce. I am looking into it.
You can get around this, it seems, by using -p 1 argument to vcfanno. I'll have a look at a real fix.

@brentp brentp closed this as completed in 16701a1 Jan 30, 2019
@brentp
Copy link
Owner

brentp commented Jan 30, 2019

I pushed a fix for this, it will be out in next release. You can circumvent by either using a single thread, or by using a bgzipped query file (yours was just gzipped). Thanks again for reporting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants