Some time ago I asked about hard crashes in the Mid function. See Crash at "StringDBCSMid2" - General - Xojo Programming Forum . I even did a Feedback issue(<https://xojo.com/issue/31385>).
Since then I’ve got also crashes in MidB and Join. The Join joins some strings. The MidB is from ages old SplitByRegex from Joe Strout:
Protected Function SplitByRegEx(source As String, delimPattern As String, checkSource as Boolean = False) As String()
Dim out(-1) As String
Dim startPos As Integer
Dim re As New RegEx
re.SearchPattern = delimPattern
Dim rm As RegExMatch = re.Search(source)
while rm <> nil
out.Append MidB(source, startPos + 1, rm.SubExpressionStartB(0) - startPos)
startPos = re.SearchStartPosition
rm = re.Search
wend
if startPos < source.LenB then out.Append MidB(source, startPos + 1)
if UBound(out) > 0 then return out
End Function
All this is old code, which parses one single mail in a thread. Mails over 1 mb are rather rare.
I even tried to use StringHandleMBS. But this is way slower and also crashes.
Are these really memory problems? If yes, why didn’t they show up under Carbon? How do I work around these?