Crash after deleting records

Beatrix Willius bwillius at gmx.de
Mon Sep 23 01:26:54 CDT 2013


Hi guys,

one of my customers had a crash when deleting some records from a database. My database has a very simple structure, only 3 tables: mailbox, message and attachment with the obvious relationshipt: mailbox message 1:n, message attachment 1:n. The crash below is from deleting mailboxes:

  dim theSQL as string = "Delete from Mailbox where MailboxPath = '" + Valentina.EscapeString(currentMailbox) + "'"
  call theDatabase.SqlExecute theSQL
  
  'get the children and delete these, too
  dim SelectedRow as AppleListboxRow = getSelectedRow
  dim theChildRows(-1) as AppleListboxRow = SelectedRow.GetAllChildren
  for each theMailbox as AppleListboxRow in theChildRows
    theSQL = "Delete from Mailbox where MailboxPath = '" + Valentina.EscapeString(theMailbox.Tag) + "'"
    call theDatabase.SqlExecute theSQL
  next
  
The crash looks like a problem with the index. Can I tell the customer to re-index and try again?

Is there a re-index after deleting? Would it speed up things if I did only one delete instead of possibly several for mailboxes and sub-mailboxes?

Valentina version 5.3, Mac OS 10.8.4, Realstudion 2011r4.

http://www.valentina-db.com/bt/view.php?id=6576

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libvkernel_fat_release.dylib  	0x0ae8051b fbl::Index_String_Page::get_ValueArraySize() const + 53
1   libvkernel_fat_release.dylib  	0x0ae80a0f fbl::Index_String_Page::SetPointersTo(char*, bool) + 87
2   libvkernel_fat_release.dylib  	0x0ae79ef1 non-virtual thunk to fbl::Index_NotUnique_Page::SetMorePointers() + 45
3   libvkernel_fat_release.dylib  	0x0ae1c5ac fbl::Page::Lock(fbl::EVAccessType) + 126
4   libvkernel_fat_release.dylib  	0x0ae7ffea fbl::Index_String_Page::Lock(fbl::EVAccessType) + 30
5   libvkernel_fat_release.dylib  	0x0ae8002f non-virtual thunk to fbl::Index_String_Page::Lock(fbl::EVAccessType) + 27
6   libvkernel_fat_release.dylib  	0x0ae1c8b0 fbl::Page::GoToPhysicalPage(unsigned int) + 78
7   libvkernel_fat_release.dylib  	0x0ae1c940 fbl::Page::GoToLogicalPage(unsigned int) + 130
8   libvkernel_fat_release.dylib  	0x0ae85357 fbl::Index_Page_imp::GoToLogicalPage(unsigned int) + 29
9   libvkernel_fat_release.dylib  	0x0ae854f0 fbl::Index_Page_imp::Split(fbl::TIndexContext&) + 154
10  libvkernel_fat_release.dylib  	0x0ae85171 fbl::Index_Page_imp::AddPair(fbl::TIndexContext&) + 33
11  libvkernel_fat_release.dylib  	0x0ae70a88 fbl::Index_Imp::AddPair_on_locked(fbl::smart_ptr<fbl::I_Value const>, unsigned int) + 206
12  libvkernel_fat_release.dylib  	0x0ae885f7 fbl::Index_String::AddPair_on_locked_words(fbl::smart_ptr<fbl::I_Value const>, unsigned int) + 361
13  libvkernel_fat_release.dylib  	0x0ae7e830 fbl::Index_String::AddPair(fbl::smart_ptr<fbl::I_Value const>, unsigned int) + 108
14  libvkernel_fat_release.dylib  	0x0ae6f0ea fbl::BuildIndex_General(fbl::smart_ptr<fbl::I_Field>, fbl::smart_ptr<fbl::I_Index>, fbl::smart_ptr<fbl::BitSet>) + 284
15  libvkernel_fat_release.dylib  	0x0ae6f5f3 fbl::BuildIndex_Dispatcher(fbl::smart_ptr<fbl::I_Field>, fbl::smart_ptr<fbl::I_Index>, fbl::smart_ptr<fbl::BitSet>) + 384
16  libvkernel_fat_release.dylib  	0x0ae6f850 fbl::Alg_BuildIndex_OnTable(fbl::smart_ptr<fbl::I_Field>, fbl::smart_ptr<fbl::I_Index>, fbl::smart_ptr<fbl::BitSet>) + 358
17  libvkernel_fat_release.dylib  	0x0ae6e74b fbl::Alg_BuildIndex(fbl::smart_ptr<fbl::I_Field>, fbl::smart_ptr<fbl::I_Index>, fbl::smart_ptr<fbl::BitSet>) + 921
18  libvkernel_fat_release.dylib  	0x0ae17c1f fbl::FldStorage::Reindex() + 217
19  libvkernel_fat_release.dylib  	0x0aac8fdf fbl::Field_Imp::Reindex() + 123
20  libvkernel_fat_release.dylib  	0x0ab24735 fbl::Table::put_IndexChanges(bool) + 151
21  V4RB.rbx_0.dylib              	0x0a73643e Table_SetIndexChanges(REALobjectStruct*, int, int) + 142
22  com.mothsoftware.mailarchiverx	0x00715dad VTable.IndexChanges.Set%%o<VTable>i4b + 77
23  com.mothsoftware.mailarchiverx	0x00efb183 CCMailboxList.CCMailboxList.DeleteMailboxFromDatabase%%o<CCMailboxList.CCMailboxList>s + 2513


Mit freundlichen Grüßen/Regards

Trixi Willius

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



More information about the Valentina mailing list