RubTextEditor allocates a huge RubEditingArea, around 100GB, by default
The RubTextEditor class, that is used in TextMorph is initialized with invalid values.
To reproduce:
- Inspect the following expression:
(GrowlMorph openWithContents: 'assa') editor
- Then, click on the inspector to inspect the textArea instance variable:
This should break the image
Note that the area of the full bounds of the RubEditingArea is rather large and is related to #defaultMaxExtent for RubAbstractTextArea as follows:
(GrowlMorph openWithContents: 'assa') editor textArea fullBounds area
= (RubAbstractTextArea defaultMaxExtent // 2 * 50)
So for that RubEditingArea, #inspectionMorph tries to, through #imageForm, make a rather large Form as well (at 4 bytes per pixel, around 100GB).
A commit that’s somewhat related as I mentioned #defaultMaxExtent there as well: commit 853be80e38cab1dc.
@Rinzwind should we update the defaultMaxExtent ?
Maybe, but I’m not sure what the value should be to be both large enough to express ‘infinite’ and small enough to avoid a problem in #inspectionMorph. Perhaps #inspectionMorph should instead limit the extent of the form like how #inspectionString limits the size of the string.