Crash at "StringDBCSMid2"

Got a nice crash from a beta tester with the following from the crash log:

Thread 3 Crashed:
0 rbframework.dylib 0x01637bc3 0x14f8000 + 1309635
1 rbframework.dylib 0x01637c53 0x14f8000 + 1309779
2 rbframework.dylib 0x015926e0 0x14f8000 + 632544
3 rbframework.dylib 0x01593790 0x14f8000 + 636816
4 rbframework.dylib 0x016386d9 0x14f8000 + 1312473
5 rbframework.dylib 0x0163ce92 0x14f8000 + 1330834
6 rbframework.dylib 0x01639cfe 0x14f8000 + 1318142
7 rbframework.dylib 0x01578afa StringDBCSMid2 + 42
8 com.mothsoftware.mailarchiverx 0x0022d0e1 REALbasic.Mid%s%si4 + 69
9 com.mothsoftware.mailarchiverx 0x00a8b8fa splitMultipart.Constructor%%osss + 1536
10 com.mothsoftware.mailarchiverx 0x00e03c47

SplitMultipart is part of my mime parser which splits mails into pieces and a lot of strings go through this function. Does anyone have an idea what could cause this issue.

Cocoa, Mac OS 10.9, Xojo 2013r3.

You wouldn’t happen to be using a pragma to speed up processing in this method, would you? Like

#pragma boundschecking false

I’ll check, but I don’t think so.

I totally forgot about this, but now I have a second customer with this issue. There is no pragma in this method.

You should file a bug report with the whole crash report attached.

Done: <https://xojo.com/issue/31385>