Unity randmly crashes after a few seconds (2019.30f5) with error "pointer being freed was not allocated"

Recently my project started crashing after a few seconds. The following error is shown in the Mac OS log:

Crashed Thread:        41  UnityGfxDeviceWorker

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Application Specific Information:
abort() called
Unity(81894,0x700002009000) malloc: *** error for object 0x1a1ac0010: pointer being freed was not   allocated

Unity Log:

[2020-04-16T05:17:12.059Z][INFO] Starting Server
[2020-04-16T05:17:12.062Z][INFO] Server started on port [55016]
[2020-04-16T05:17:12.121Z][INFO] Health Request received
[2020-04-16T05:18:15.214Z][ERROR] [Unity Package Manager (Upm)]
Parent process [82231] was terminated

Does anyone know what is causing this?

Full MAC OS error Log:

I updated to the newest version and the error doesn’t occur anymore.