Crash while backing up

Opus crashed while backing up the config via a button.

@toggle:disable
Set UTILITY=off
Close ALLVIEWERS
Close ALLLISTERS

@set bakFile=/dropbox\System\Opus\ocb\Opus.Config.{date|yyyyMMdd}-{time|HHmmss}.ocb
Prefs BACKUP=all TO="{$bakFile}" QUIET
GO LAYOUT=Center PATH="{$bakFile}" OPENCONTAINER

ID 188

The backup was not corrupted.

Haven't been able to repro the crash so far, but I have seen the button do nothing at all after closing the windows.

The command will never work reliably because it's closing the lister that is running it. (Close ALLLISTERS is also asynchronous, which is why the command will work sometimes and not others. It only really makes sense as the very last line in a command.)

I would go the easy route and just have it do a normal backup without closing all the windows first. But you could probably run a second batch or script, launching it async before the main button closes anything, and have that script wait a second and then do the last three lines.

Would still like to fix the crash so it fails more gracefully, but I have a feeling it's very dependent on timing.

This button has been generating backups consistently since at least 2016 (don't ask me how I know :blush: ). The only recorded crash occurred last year during the early beta days (see here). Generally, it functions quite well. I'm not too worried about the occasional crashes since I don't initiate backups when I'm in the middle of something.

What if we give the Prefs BACKUP command a flag that lets you tell it not to save any open windows?

That should remove the need to close the listers before doing the backup. If wanted, they could still be closed afterwards.

1 Like

Excellent idea! The primary reason for closing is to prevent them from being opened after restoring the backup on a second system with different folders and potentially invalid paths.

I've added that for the next beta (likely to be 13.3.1, so it won't be in 13.3 non-beta):

Prefs BACKUP=all,notabs TO="{$bakFile}" QUIET

(Also a checkbox in the backup GUI which does the same thing.)

3 Likes

Works fine in 13.3.1 :+1:

notabs seems to be missing from the list of suggestions:

image

1 Like