segfaults with write_xml
read/write completes without segfault in v0