Summary of file reading/writing issues on Windows


I have fixed the file saving issues on Windows as far as I can see, but
will summarize what I have found. This is on a Windows XP VMWare virtual
machine, installing from the installers available on the SourceForge
site into clean installation directories (C:\Program
Files\Avogadro-0-9-3, etc) so that I could quickly compare each version.
So, first for saving a new file,

  • Avogadro 0.9.3 - file.cml and The file.cml could be
    read and was correct.

  • Avogadro 0.9.4 - just, this could be renamed and read,
    but fails otherwise.

  • Avogadro 0.9.5a/b - this now saves just file.cml that can be read -
    earlier issue now fixed.

I did not notice the extra file in my tests of 0.9.3, and to be honest
was busy and did not compile or test the 0.9.4 release on Windows. With
0.9.5 I missed the zero length file issue initially, but in the new
executables produced by Tim and myself there is a lot of extra logic I
added in order to ensure you are never left with a zero length file. So
that is the state of file saving to the best of my knowledge. Replacing
files is also working here at least.

On to file reading. I tested all three versions of Avogadro again. None
of them can open the fragments with the file endings that are
non-Windows when using the file open dialog. All of them can insert
fragments though, and so it would appear that this is a problem with the
file mode used to open, header include order or something of that
nature. Tim was looking into this issue yesterday at the same time I was
testing the fix to file saving.

Short term we can just change the line endings in all files we package
with Avogadro, but I would much rather fix this properly. In terms of
the crash Uwe observed I cannot reproduce that, but it could be due to
the Avogadro settings embedded in CML files. Samples of files would help
me to check that out, we will quite possibly need to filter settings
from older files. This would only affect CML files, but certainly
requires attention if a CML file can crash Avogadro.

I am going to see if I can build a Windows binary with debug symbols,
but this may take some time as I have not done this before. I have
always done my own checks, but Uwe made a good point - we should have a
checklist of core functionality we test before releasing a binary for
any platform.

I will take a look at the difference between main window and the insert
fragment extension.