asl / BandageNG

a Bioinformatics Application for Navigating De novo Assembly Graphs Easily
GNU General Public License v3.0
116 stars 10 forks source link

Invalid path missing segment orientation causes crash upon loading graph #166

Open ASLeonard opened 5 days ago

ASLeonard commented 5 days ago

In the case of a malformed path in the gfa, specifically a segment missing its orientation, BandageNG will just instantly crash and exit (at least on macos).

This graph is able to reproduce the behaviour (or the path segment 1,2+). Changing to the valid 1+,2+ will load the graph successfully)

S       1       TAG
S       2       CAT
L       1       +       2       +       0M
P       foo     1+,2    0M

It seems like oriented_segment in io/gfa.cpp should handle invalid input and complain later, but this just crashes.

Best, Alex