When deleting an attachment I get NullPointerException

Hi, Everybody is good
I install XWiki 12.10.5 with tomcat 9, PostgreSQL 13.2 and java 9.0.4. when deleting an attachment I get NullPointerException:
XWiki “xwiki.cfg” Storage config:
xwiki.store.recyclebin.content.hint=file
xwiki.store.attachment.hint=file
xwiki.store.attachment.versioning.hint=file
xwiki.store.attachment.recyclebin.content.hint=file

xwiki.recyclebin=0
storage.attachment.recyclebin=0
xwiki.store.versioning=1
xwiki.store.attachment.versioning=0

I hope to get your help, thank you.
2021-12-01 10:13:17,503 [http-nio-8080-exec-6 - http://localhost:8080/xwiki/bin/delattachment/Main/WebHome/text.txt?form_token=P0DnFgZQ6GR8S48Ky2Ri4w&xredirect=%2Fxwiki%2Fbin%2Fview%2FMain%2F%23Attachments] ERROR .o.i.DefaultObservationManager - Failed to send event [org.xwiki.bridge.event.DocumentUpdatedEvent@5dbb6c1e] to listener [com.xpn.xwiki.internal.event.AttachmentEventGeneratorListener@17be3a9]
java.lang.NullPointerException: null
at com.xpn.xwiki.doc.XWikiDocument.retrieveDeletedAttachment(XWikiDocument.java:6772)
at com.xpn.xwiki.doc.XWikiDocument.getAttachmentDiff(XWikiDocument.java:6732)
at com.xpn.xwiki.internal.event.AttachmentEventGeneratorListener.onDocumentUpdatedEvent(AttachmentEventGeneratorListener.java:139)
at com.xpn.xwiki.internal.event.AttachmentEventGeneratorListener.onEvent(AttachmentEventGeneratorListener.java:88)
at org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:320)
at org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:285)
at com.xpn.xwiki.XWiki.afterSave(XWiki.java:1997)
at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:2073)
at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:1963)
at com.xpn.xwiki.web.DeleteAttachmentAction.action(DeleteAttachmentAction.java:140)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:555)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:250)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:626)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:122)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at org.xwiki.wysiwyg.filter.ConversionFilter.doFilter(ConversionFilter.java:109)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at org.xwiki.container.servlet.filters.internal.SetHTTPHeaderFilter.doFilter(SetHTTPHeaderFilter.java:63)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:111)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at org.xwiki.resource.servlet.RoutingFilter.doFilter(RoutingFilter.java:132)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:687)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:346)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:374)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:887)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1684)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.base/java.lang.Thread.run(Unknown Source)