This has been reported in GnuCash multiple times (https://bugzilla.gnome.org/show_bug.cgi?id=576163 collects these reports): some banks create incomplete ofx sgml, missing some closing tags. Such statements crash in ofx.
The missing tags are </BANKMSGSRSV1> and </OFX>.
This appears to happen when multiple statements are grouped together in one download file.
I will attach a sample ofx file that shows this behaviour (taken from one of the GnuCash bugs).