Trying to nail down a problem that’s been haunting me for some time. A very few users are reporting issues saving a file from my application (Windows OS) where the application simply goes away. Nothing is found in the logs either.
The code to save the file looks like this:
f = dlg.ShowModal
if f <> Nil then
if f.IsWriteable then
try
out_str = BinaryStream.Create(f, true)
out_str.Write attach
out_str.Close
dim w as new wndDownloadComplete
w.Title = me.TrueWindow.Title
w.TheFolderItem = f
w.ShowModal
catch err as RuntimeException
Dialogs.FailureMessage(app.translate.langSubs1(97, f.NativePath), "", self)
end try
default_save_directory = f.Parent
else
Dialogs.FailureMessage(app.translate.strings(216), "", self)
end if
end if
I have a nagging feeling that the BinaryStream.Create() may behave when saving to a remote fileshare. Could the call return too soon so the Write() doesn’t work properly, but doesn’t raise an exception?