Backups fail with error: Object reference not set to an instance of an object

It’s a fine shot at the second item. I’m still looking forward to first (logs of original error) and third (test case). Actually, the surprising thing about what you posted is that this isn’t the original error. Did that also happen? “Unexpected difference in fileset” is being reported elsewhere but I’d prefer to look into the original problem, even though it seems to be far less seen (which is one reason I would like some experimentation for item 3).

One thing I was hoping for appears to be missing in the live log, and only present in --log-file logs. Example:

2018-12-16 18:02:34 -05 - [Information-Duplicati.Library.Main.Controller-StartingOperation]: The operation Backup has started
2018-12-16 18:02:34 -05 - [Error-Duplicati.Library.Main.Operation.BackupHandler-FatalError]: Fatal error
Duplicati.Library.Interface.UserInformationException: Unexpected difference in fileset version 0: 11/28/2018 12:04:56 PM (database id: 42), found 0 entries, but expected 1
   at Duplicati.Library.Main.Database.LocalDatabase.VerifyConsistency(Int64 blocksize, Int64 hashsize, Boolean verifyfilelists, IDbTransaction transaction)
   at Duplicati.Library.Main.Operation.Backup.BackupDatabase.<>c__DisplayClass32_0.<VerifyConsistencyAsync>b__0()
   at Duplicati.Library.Main.Operation.Common.SingleRunner.<>c__DisplayClass3_0.<RunOnMain>b__0()
   at Duplicati.Library.Main.Operation.Common.SingleRunner.<DoRunOnMain>d__2`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at Duplicati.Library.Main.Operation.BackupHandler.<RunAsync>d__19.MoveNext()
2018-12-16 18:02:36 -05 - [Information-Duplicati.Library.Modules.Builtin.SendMail-SendMailComplete]: Email sent successfully using server: smtp://smtpauth.earthlink.net:587/?starttls=always

in a --log-file log at --log-file-log-level=Information has prefixes after the time to say what’s going on, and also shows the actual detail of the stack trace. This gives me both the path leading to the error and the error itself. Live log has about the same number of steps, but without detail. I guess in the future I should ask for log-files.

* Dec 16, 2018 6:02 PM: The operation Backup has failed with error: Unexpected difference in fileset version 0: 11/28/2018 12:04:56 PM (database id: 42), found 0 entries, but expected 1

* Dec 16, 2018 6:02 PM: Email sent successfully using server: smtp://smtpauth.earthlink.net:587/?starttls=always

* Dec 16, 2018 6:02 PM: Fatal error

* Dec 16, 2018 6:02 PM: The operation Backup has started

Let me see if I can find anything more from what I have, while you work the other parts and comment on the live log post – does this have any relationship to the original problem? Is it happening before that one can? Typically people seem to either see this immediately on upgrade to 2.0.4.5 on some old version (your case), or get it on version 0 which is the one just made – and I have a test case on how that one can be recreated.