Got a nice reproducable crash report from a customer (see below). He was trying to read an mbox file with 275.000 mails. Does anyone have a clue why the BinaryStream.Read crashes and what Msgbox and IPC socket do here?
Xojo 2014r2, Mac OS 10.01.
Thread 8 Crashed:
0 com.xojo.XojoFramework 0x016b877f IPCSocketBytesLeftToSend + 18319
1 com.xojo.XojoFramework 0x016c3975 VB_RuntimeMsgBox + 1957
2 com.xojo.XojoFramework 0x017472e8 BinaryStreamRead + 120
3 com.mothsoftware.mailarchiverx 0x000b1714 BinaryStream.Read%s%oi4o + 96
4 com.mothsoftware.mailarchiverx 0x00cd7388 mboxIterator.nextObject%s%o + 658
5 com.mothsoftware.mailarchiverx 0x00cc7d60 MailParser.parse%i4%o + 7960
6 com.mothsoftware.mailarchiverx 0x00c65e36 ArchiveThread.DoWork%%o + 3673
7 com.mothsoftware.mailarchiverx 0x00c64f7d ArchiveThread.Event_Run%%o + 56
8 com.xojo.XojoFramework 0x017848ba threadRun + 746
9 libsystem_pthread.dylib 0x99bd6ecf _pthread_body + 138
10 libsystem_pthread.dylib 0x99bd6e45 _pthread_start + 162
11 libsystem_pthread.dylib 0x99bd4f0e thread_start + 34
Since the mbox files can be so large I read them piece by piece. I figure out where mails start and put this into an array. Then I read the file again with these start values:
[code]Function nextObject() As String
'return the text of a mail
currentMail = currentMail + 1
if inputBinary = nil then Return “”
if Globals.StopArchiving then return “” 'parsing cancelled by user
if currentMail > UBound(StartValues) then Return “”
dim SingleMail as String
SingleMail = inputBinary.Read(StartValues(currentMail) - StartValues(currentMail - 1)) ’ <— crash here
SingleMail = myReplaceLineEndings(SingleMail, EndOfLine.Macintosh)
if Left(singleMail, 1) = EndOfLine.Macintosh then
singleMail = Mid(singleMail, 2, Len(singleMail) - 1)
end if
return singleMail
End Function[/code]
But mails are getting larger and larger…