Tuesday, August 2, 2016

FMod - Automated image export glitch

Yesterday I received a report of Abiathar's image exporter failing under some circumstances. Fortunately, the reporter included the exact configuration under which the problem occurred. I was able to reproduce the issue when I set an automatic filename pattern for the exported image. It only happened when the dependency file hadn't been saved. One of the things passed to the string formatter was the path of the dependency file, after going through some .NET IO functions to make sure it's a full rooted path.

When the dependency file is unsaved, the path to it is blank, and that causes those functions to fail, throwing an exception (even if the format string didn't use its results). I'll solve the problem by checking to see if the file is on disk before passing the path through those functions.

No comments:

Post a Comment