Crashes in V5

Beatrix Willius bwillius at gmx.de
Sun Oct 21 10:20:55 CDT 2012


Hi,

got some crashes from a customer where V5 is crashing:

I reported the first in june or so but never got anything back. The code isn' really complex:

MailboxCursor = theArchive.SqlSelect("select RecID, * from mailbox where MailboxPath ='" + Valentina.EscapeString(currentMailbox) + "'" , EVCursorLocation.kServerSide, EVLockType.kNoLocks, EVCursorDirection.kRandom)

Thread 8 Crashed:
0   libvshared_fat_release.dylib  	0x07ab71c2 fbl::String::String(unsigned short const*, int) + 30
1   V4RB.rbx_0.dylib              	0x079f676a Database_SqlSelect(fbl::smart_ptr<fbl::vsql::I_SqlDatabase>, REALstringStruct*, int, int, int, fbl::smart_ptr<fbl::ArrayOfSmartPtrs<fbl::smart_ptr<fbl::I_Value> > >) + 100
2   V4RB.rbx_0.dylib              	0x079f3852 Database_SqlSelect_1(REALobjectStruct*, REALstringStruct*, int, int, int) + 281
3   com.mothsoftware.mailarchiverx	0x00694892 VDatabase.SqlSelect%o<VCursor>%o<VDatabase>si4i4i4 + 145
4   com.mothsoftware.mailarchiverx	0x00bb8511 WriteMailboxToValentina.CreateMailbox%i4%o<WriteMailboxToValentina> + 7691
5   com.mothsoftware.mailarchiverx	0x00bb63f4 WriteMailboxToValentina.Constructor%%o<WriteMailboxToValentina>so<VDatabase>s + 269
6   com.mothsoftware.mailarchiverx	0x00b8d279 MailParser.parse%i4%o<MailParser> + 1410
7   com.mothsoftware.mailarchiverx	0x00b1a98a ArchiveThread.DoWork%%o<ArchiveThread> + 2438
8   com.mothsoftware.mailarchiverx	0x00b19fa4 ArchiveThread.Event_Run%%o<ArchiveThread> + 56
9   rbframework.dylib             	0x01374ecb ThreadYieldAsNeeded() + 289
10  libsystem_c.dylib             	0x95d8bed9 _pthread_start + 335
11  libsystem_c.dylib             	0x95d8f6de thread_start + 34

The second crash is different. But the code is also simple.

  if theArchive.Table("Message") = nil then Return False
  dim UniqueCursor as VCursor = theArchive.SqlSelect("select RecID from message where InternalMessageID = '" + Valentina.EscapeString(Left(InternalMessageID, 100)) + "'", EVCursorLocation.kServerSide, EVLockType.kNoLocks, EVCursorDirection.kRandom)
  if UniqueCursor <> Nil and UniqueCursor.RecordCount > 0 then
    Return False
  Else
    Return True
  End If


Thread 58 Crashed:
0   libvshared_fat_release.dylib  	0x07bb81c2 fbl::String::String(unsigned short const*, int) + 30
1   V4RB.rbx_0.dylib              	0x07af1c0e Database_GetTableByName(REALobjectStruct*, REALstringStruct*) + 220
2   com.mothsoftware.mailarchiverx	0x006931e9 VDatabase.Table%o<VTable>%o<VDatabase>s + 111
3   com.mothsoftware.mailarchiverx	0x00b95fda MailParser.CheckMailUnique%b%o<MailParser>s + 196
4   com.mothsoftware.mailarchiverx	0x00b8f640 MailParser.parse%i4%o<MailParser> + 10569
5   com.mothsoftware.mailarchiverx	0x00b1a98a ArchiveThread.DoWork%%o<ArchiveThread> + 2438
6   com.mothsoftware.mailarchiverx	0x00b19fa4 ArchiveThread.Event_Run%%o<ArchiveThread> + 56
7   rbframework.dylib             	0x01374ecb ThreadYieldAsNeeded() + 289
8   libsystem_c.dylib             	0x95d8bed9 _pthread_start + 335
9   libsystem_c.dylib             	0x95d8f6de thread_start + 34

Both crashes occur in similar situations. The app is just before writing to the database. Something needs to be checked and then the database crashes. Both crashes didn't occur for V4. The database is flushed after adding a record to the main table.

RealStudio 2011r4, Lion, V4RB b35.


On 19.06.2012, at 13:08, Beatrix Willius <bwillius at gmx.de> wrote:

> Got the second crash report from a user when adding records:
> 
> Thread 8 Crashed:
> 0   libvshared_fat_release.dylib  	0x078438b2 fbl::String::String(unsigned short const*, int) + 30
> 1   V4RB.rbx_0.dylib              	0x0778276a Database_SqlSelect(fbl::smart_ptr<fbl::vsql::I_SqlDatabase>, REALstringStruct*, int, int, int, fbl::smart_ptr<fbl::ArrayOfSmartPtrs<fbl::smart_ptr<fbl::I_Value> > >) + 100
> 2   V4RB.rbx_0.dylib              	0x0777f852 Database_SqlSelect_1(REALobjectStruct*, REALstringStruct*, int, int, int) + 281
> 3   com.mothsoftware.mailarchiverx	0x0074a256 VDatabase.SqlSelect%o<VCursor>%o<VDatabase>si4i4i4 + 145
> 4   com.mothsoftware.mailarchiverx	0x00c53157 MailParser.CheckMailUnique%b%o<MailParser>i4 + 245
> 5   com.mothsoftware.mailarchiverx	0x00c4cb84 MailParser.parse%i4%o<MailParser> + 12094
> 6   com.mothsoftware.mailarchiverx	0x00bde987 ArchiveThread.DoWork%%o<ArchiveThread> + 2438
> 7   com.mothsoftware.mailarchiverx	0x00bddfa1 ArchiveThread.Event_Run%%o<ArchiveThread> + 56
> 8   rbframework.dylib             	0x01433ecb ThreadYieldAsNeeded() + 289
> 9   libsystem_c.dylib             	0x9772eed9 _pthread_start + 335
> 10  libsystem_c.dylib             	0x977326de thread_start + 34
> 
> The sql of CheckMailUnique isn't really complicated
> 
> dim CheckSumCursor as VCursor = theArchive.SqlSelect("select RecID from message where CheckSum = " + Str(CheckSum) , EVCursorLocation.kServerSide, EVLockType.kNoLocks, EVCursorDirection.kRandom)
> 
> The checksum is a unique constraint for my records. There are no indexes on the field because it isn't used for sorting and searching. For Valentina 5 there are no indexes available for new records anyway because I add them after adding records is finished. I don't want to make the field unique because I need duplicate records for testing.
> 
> This crash did NOT occur with Valentina 4.9. Does anyone have an idea what might cause the crash here? Using Real.Studio 2012r4, Mac OS 10.7.4, latest Valentina beta.

Mit freundlichen Grüßen/Regards

Trixi Willius

http://www.mothsoftware.com
Mail Archiver X: The email archiving solution for professionals

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macserve.net/pipermail/valentina-beta/attachments/20121021/4dc27bdf/attachment-0001.html>


More information about the Valentina-beta mailing list