Assertion error in collisionLoop causes crash

I managed to reproduce the error, albeit in contracted form:

Assertion failed: _ref_count == 0 || _ref_count == local_ref_count at line 108 of c:\buildslave\sdk-windows-amd64\build\built1.10\include\referenceCount.I
Assertion failed: _node != nullptr at line 37 of c:\buildslave\sdk-windows-amd64\build\built1.10\include\nodePathComponent.I

Using this python code:

from direct.showbase.ShowBase import ShowBase
from direct.task import Task
from direct.interval.IntervalGlobal import *
from panda3d.core import *
from direct.gui.DirectGui import *
from direct.particles.ParticleEffect import ParticleEffect
from panda3d.physics import *

class run_me(ShowBase):
    def __init__(self):
        ShowBase.__init__(self)
        #Async-task to load up the collision-meshes:
        taskMgr.setupTaskChain('chain_name', numThreads = 1, tickClock = None,threadPriority = None, frameBudget = None,frameSync = True, timeslicePriority = None)
        taskMgr.add(self.worldExpandTest,"worldExpandTestNom", taskChain = "chain_name")
        #taskMgr.add(self.worldExpandTest,"worldExpandTestNom")
        #Collider:
        minimum=Point3(0,0,0)
        maximum=Point3(4,4,4)
        box=CollisionBox(minimum,maximum)
        cn=render.attachNewNode(CollisionNode('cnode'))
        cn.node().addSolid(box)
        cn.show()
        cn.node().setFromCollideMask(BitMask32.allOn())
        cn.node().setIntoCollideMask(BitMask32.allOff())
        self.boxQueue=CollisionHandlerQueue()
        self.traverser = CollisionTraverser('traverser')
        base.cTrav = self.traverser
        base.cTrav.addCollider(cn, self.boxQueue)
        #taskMgr.add(self.parseTest, 'testParse')
        
    def worldExpandTest(self,task):
        for i in range(1):
            if(not render.find("dummi_"+str(i))):
                print("NUMZ?: ",i)
                fNomWall="mesh"+str(i+1)+".bam"
                terrainTest=base.loader.loadModel(fNomWall)
                terrainTest.reparentTo(render)
                terrainTest.setName("dummi_"+str(i))
        return task.cont
        
w = run_me()
w.run()

Loading this model:
mesh1.bam (2.9 KB)
It only consists of four flat faces that have been generated from c++ and then saved as a .bam file via write_bam_file. Simply running the code with any collision-checking enabled crashes with the aforementioned error. I generated 8 other files just in case that one does not reproduce the error on your pc. I am using panda3d version 1.10.10. I’m so sorry to ask this, but would it be possible to tell me what’s wrong from looking at the file alone?

I could provide the main portions of the c++ code that produced the file as well if needed, since I don’t want to congest this post unnecessarily.