I also used to get that error (more or less) and it usually occurred while either reloading the UI or entering the world after switching characters.
In my case, though, every time I got the error only one addon was mentioned in the crash log text: Learning Aid. That addon was mentioned specifically in the error log for every time that error occurred. Here's a link to the ticket I filed
Learning Aid Bug Ticket on CurseForge. Thankfully, Learning Aid was updated (not specifically for that error, but the update had the side effect of curing it for me....) and that error has stopped happening.