maxmods / bah.mod

A collection of BlitzMax modules by Brucey
25 stars 17 forks source link

libxml crash #38

Open DruggedBunny opened 7 years ago

DruggedBunny commented 7 years ago

Just trying example1.bmx from libxml, and it crashes in both debug and release modes ("EXCEPTION_ACCESS_VIOLATION"), then says:

aaa.xml:3: parser error : XML declaration allowed only at the start of the document
<?xml version="1.0"?>
     ^

There are indeed two XML declarations in aaa.xml, but I imagine a crash isn't what's meant to happen!

Seems to crash, then give the error after dismissing the dialog, then just sit there hung.

Tried on a local HTML file and it gives similar results, ie. crash, list the imperfections in the HTML (guess they must sit in the stdout buffer or something), then hang.

woollybah commented 7 years ago

The code should really be checking for a null "doc" instance before trying to access its contents. It will be null if there was a parsing error.