I have seen a layerless document. I’m unsure if it’s the same bug as this or not. I could never reproduce it, so I didn’t report it, but I’ve encountered it three or four times, from last November to just this Tuesday.
The fact that the layers docker is greyed-out in your screenshot may actually be a result of a different bug, where no layer is selected in some circumstances.
In my case, it always seemed to happen after I’d been working on a document for a while. I decide to make a new layer and nothing happens.
That is, nothing happens in the Layers Docker; but the Undo History shows that the new layer actually was created. But whatever I do, adding or moving a layer in the stack does not affect the Layers docker; even reopening the same or a new document shows no layers. The docker behaves fine otherwise.
Krita might crash when interacting with the empty layers docker, but it will also just crash on normal exit. Restarting Krita, everything is fine again.
This is the crash from simply closing Krita, apparently crashing while trying to clear a popup menu:
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 QtWidgets 0x108c040f0 QWidget::actions() const + 20
1 QtWidgets 0x108d34440 QMenu::clear() + 36
2 libkritaui.20.0.0.dylib 0x1061dff0c KisPopupWidgetAction::end(QEvent*)::$_0::operator()() const + 160 (KisPopupWidgetAction.cpp:73) [inlined]
3 libkritaui.20.0.0.dylib 0x1061dff0c QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, KisPopupWidgetAction::end(QEvent*)::$_0>::call(KisPopupWidgetAction::end(QEvent*)::$_0&, void**) + 160 (qobjectdefs_impl.h:146) [inlined]
4 libkritaui.20.0.0.dylib 0x1061dff0c void QtPrivate::Functor<KisPopupWidgetAction::end(QEvent*)::$_0, 0>::call<QtPrivate::List<>, void>(KisPopupWidgetAction::end(QEvent*)::$_0&, void*, void**) + 160 (qobjectdefs_impl.h:256) [inlined]
5 libkritaui.20.0.0.dylib 0x1061dff0c QtPrivate::QFunctorSlotObject<KisPopupWidgetAction::end(QEvent*)::$_0, 0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) + 232 (qobjectdefs_impl.h:443)
6 QtCore 0x109885ab0 QObject::event(QEvent*) + 596
7 QtWidgets 0x108bd650c QApplicationPrivate::notify_helper(QObject*, QEvent*) + 292
It may be that a popup menu not getting closed correctly is the cause of the layers docker not working, I’m not sure. One of the times this happened, I realized the Script Error window was open, and closing that fixed the layers docker, but that’s unlikely to have been present the other times.