I’ve encountered the occasional issue in the past, which was easily solvable by restoring my main database via TimeMachine, but this one has me a bit worried:
Today, upon opening said database, verification said there was one inconsistency. Upon clicking “repair”, the message said that repair has been successful.
However, at this point DT just froze completely (spinning wheel). There was neither a crash, nor did DT “unfreeze” and become operable again. Whenever I open this database, the same behavior reoccurs.
So I tried restoring a previous version of the database that I know worked flawlessly before and certainly was not corrupted when the backup was made. BUT: The issue persists with that version of the database as well!
The only thing that changed on my system is that I installed Adobe Acrobat Pro 2020 yesterday. There was actually a warning in DT, that the Adobe viewer plugin is incompatible, which I initially disregarded. I have now uninstalled Adobe Acrobat just in case, this did not help either. I have also rebooted several times.
Any troubleshooting suggestions are most welcome and appreciated.
Could you please launch Apple’s Activity Monitor application (see Applications > Utilities), select the frozen DEVONthink 3 the list of processes, choose the menu item View > Sample Process and send the result to cgrunenberg - at - devon-technologies.com? Thanks in advance!
In addition, where in the filesystem are your databases actually located?
Is there enough disk space available on your startup volume? Did DEVONthink ever crash or freeze? To fix this you could try to restore an older backup. Afterwards please verify & repair the database - are any issues reported? I would also suggest to completely rebuild the database (see File menu).
Yes, several of my smart rules do use embedded apple scripts, although I did not change any of them recently.
To test whether this would solve the freezing, I tried setting all SmartRules to OnDemand before opening the database in question. Voilà, it now opens without an issue!!!
So it seems that the reason only this database caused the freezing is that the Smart Rules containing apple scripts all have just this database in scope. I believe that the database itself is fine, and will go on to verify this now. I’m confident that this is solved, since standard restoring and rebuilding has always been super reliable when I needed it in the past.
The mystery remains, why script-based Smart Rules that worked fine over the past months suddenly caused an issue. But I’m just really happy that everything is fine, and it seems pretty clear that this was not caused by an issue in DT as such.
A huge thank you goes to @cgrunenberg for your help! I never would have guessed it’s an issue with apple scripts I’m using in smart rules.
Just to confirm: Problem solved, all data is intact (and was never in danger)
I’m now trying to figure out, which smart rule script caused the issue (which is tough, since they’ve been working flawlessly for a while now).
One possible cause:
In an effort to simplify and consolidate, I had added two embedded scripts into one Smart Rule with the same scope a few days ago. Previously, these scripts were in two separate smart rules, with one script each. Combining them in one smart rule did seem to be working as intended, but I don’t really see anything else that could have been at the root of the issue.
Just to clarify, I didn’t actually merge the scripts (not enough scripting knowledge), but rather I added a second “Execute Script” trigger in the same smart rule.
It’s the “exclude from wiki linking” script from this thread, which I modified to exclude from tagging (embedded script 1) and from classification (embedded script 2).
The scripts do produce the intended effects and have always worked flawlessly when each had its own smart rule. After combining them, they did seem to work just as well as before.
@cgrunenberg I wanted to provide an update on this, in case it’s useful or it helps to identify a causal factor.
The issue has reoccured twice, each time after verification found missing files. However, I believe come closer to identifying the cause, and mitigated it for my specific setup.
Some observations:
After exporting and removing all AppleScript smart rules, the database opens normally and there’s no spinning wheel
If, with the database open, I then import two smart rules containing the same apple script (applied under different conditions), then I get the spinning wheel. However, this is only the case, if these smart rules are also set to run in intervals (Hourly, every minute, etc.)
If I set the smart rules containing the same AppleScript to “After Saving”, then I can import them with the database open and there is no spinning wheel.
My theory
It seems that DT runs interval-based smart rules immediately upon opening the database, and that if two smart rules contain the same script this causes the spinning wheel issue. But only after repairing a missing file error.
I believe that setting the Smart Rules to “after saving” will resolve the issue for my setup, since they will no longer be triggered at the same time after opening the database following a “Missing File” message and automatic repair, which seems to cause the issue.
Thank you for the info! Which script did you actually use, could you please post the source or a link? However, smart rules are never executed concurrently, only one after another. Therefore please choose Help > Report Bug while pressing the Alt modifier key and send the result to cgrunenberg - at - devon-technologies.com - thanks! Maybe the logs contain some additional hints.
As emphasized earlier, I doubt something is wrong with this script as such. Probably the cause is in how I’m applying it or something in my local setup. It has always worked as intended.
Unfortunately, I can’t send the logs since they contain file names and I’m not comfortable with that… Sorry.
But all good from my side. I’m hopeful that the issue won’t reoccur anymore based on the described settings change.