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

dng-pileup: Segmentation fault when converts from tad to ad #214

Closed
stevenhwu opened this issue Jan 23, 2017 · 0 comments
Closed

dng-pileup: Segmentation fault when converts from tad to ad #214

stevenhwu opened this issue Jan 23, 2017 · 0 comments

Comments

@stevenhwu
Copy link
Collaborator

Two test files are created pTest1.ad and pTest1.tad from the same ref and bam.

## ad to tad
$ ./dng-pileup pTest1.ad -o pTest1AdToTad.tad
## Idential results
$ diff -s pTest1.tad pTest1AdToTad.tad
Files pTest1.tad and pTest1AdToTad.tad are identical

## Segmentation fault when converting from tad to ad
$ ./dng-pileup pTest1.tad -o pTest1TadtoAd.ad
Segmentation fault (core dumped)
$ ./dng-pileup -o pTest1TadtoAd.ad pTest1.tad
Segmentation fault (core dumped)

## DNG version 
$ git log -1 --oneline 
c4d067f Merge branch 'develop' of github.com:denovogear/denovogear into develop

$ git branch -vv
* develop c4d067f [origin/develop] Merge branch 'develop' of github.com:denovogear/denovogear into develop
@stevenhwu stevenhwu changed the title dng-pileup results Segmentation fault when converting from tad to ad dng-pileup: Segmentation fault when converting from tad to ad Jan 23, 2017
@stevenhwu stevenhwu changed the title dng-pileup: Segmentation fault when converting from tad to ad dng-pileup: Segmentation fault when converts from tad to ad Jan 23, 2017
stevenhwu added a commit to stevenhwu/denovogear that referenced this issue Jan 24, 2017
Output after the fix

```
$ dng-pileup pTest1.ad -o pTest1a2t.tad
$ dng-pileup pTest1.tad -o pTest1t2a.ad
$ diff -s pTest1.ad pTest1t2a.ad
Files pTest1.ad and pTest1t2a.ad are identical
$ diff -s pTest1.tad pTest1a2t.tad
Files pTest1.tad and pTest1a2t.tad are identical
```

The segmentation fault was cause at
line 828 in `ad.cc` -> `last_data_[i] = line.data()[i];`
Where `last_data_` in `io::Ad output` was not initilised.
reedacartwright added a commit that referenced this issue Feb 12, 2017
Fix issue #214, error when converting tad to ad
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants