This happens when activating/deactivating add-ons if it takes a long time to rebuild the add-on caches and you/someone accesses the forum while caches are still rebuilding. In this case, it is possible to access a page where some of the caches have different add-on active states than others, resulting in class-not-found or other errors. It might be possible to catch only some of these.