Issue opening really big text file

I am trying to open a really big text file right now and am getting this error. Known pipe types:
CocoaGraphicsPipe
(all display modules loaded.)
Assertion failed: (!first_glyph->is_whitespace()), function assemble_row, file panda/src/text/textAssembler.cxx, line 1630.
Abort trap: 6

Could you share a reproduction test case?

Download this in plain text utf-8.
gutenberg.org/ebooks/10
Run this code

from direct.showbase.ShowBase import ShowBase
from panda3d.core import *
from direct.gui.OnscreenText import OnscreenText
from direct.gui.DirectGui import *
base = ShowBase()
text = TextNode("node name")
textfile = open('pg10.txt')
text.setText(textfile.read())
textNodePath = aspect2d.attachNewNode(text)
textNodePath.setScale(0.5)
textNodePath.setPos(0,30,0)
textNodePath.reparentTo(render)
text.setTextColor(0,0,0,1)
font = text.getFont()
font.setPixelsPerUnit(26)
text.setWordwrap(40)
text.setFont(font)
base.setBackgroundColor(1,1,1)
base.useTrackball()
base.trackball.node().setPos(-7.55,0,6)
base.run()

I can’t reproduce this in the latest version (also, in the latest version, that assertion is no longer on line 1630 of textAssembler.cxx). Which version of Panda are you seeing this issue in?