Hard crashes with DataGrid loading data from VServer

Beatrix Willius bwillius at gmx.de
Tue Dec 27 04:33:08 CST 2011


Do I need to handle data from VServer differently from Valentina local? The reason I'm asking is because I'm getting hard crashes when loading data from VServer instead of Valentina local.

For Valentina local everything works nicely for Cocoa. When I change this to VServer I get crashes as soon as data is loaded. The crash log is below. The code is quite simple:

Sub RequestRowData(RowNumber as Integer,Row as DataGridRow)
  
  'add rows in the listbox: into cells for non-id fields, into a rowtag Dictionary for id fields
  
  dim theCol as integer = 1
  dim FieldCount as Integer = DataCursor.FieldCount
  dim RowIDInformation as new Dictionary
  DataCursor.Position = RowNumber
  
  For currentField as Integer = 1 to FieldCount
    
    If left(DataCursor.Field(currentField).Name, 6) = "order_" then
      'ignore, is just for sorting because Valentina doesn't sort case IN-sensitive on Lion anymore
    Elseif InStr(DataCursor.Field(currentField).Name, "ID") = 0 then
      Row.CellText(theCol) = DataCursor.Field(currentField).GetString
      theCol = theCol + 1
    else
      RowIDInformation.Value(DataCursor.Field(currentField).Name) = DataCursor.Field(currentField).GetString
    end if
  next
  Row.ItemData = RowIDInformation
  
End Sub

Between row 14 and 18 the crash occurs. When I change the row

      Row.CellText(theCol) = DataCursor.Field(currentField).GetString

to 

      Row.CellText(theCol) = "test"

then there is no crash! Do I have a senior moment? Or am I simply doing something wrong?

Using Real.Studio 2011R4, latest plugins for DataGrid and Valentina. 10.7.2, Cocoa!

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   com.apple.CoreFoundation      	0x94f47352 CFStringCreateCopy + 18
1   com.apple.CoreFoundation      	0x94fd28b8 CFAttributedStringCreate + 104
2   DataGrid.rbx_0.dylib          	0x0477008c CCell::Draw(CGRect*, long, CColumn*, COffscreenDC*, unsigned char) + 960
3   DataGrid.rbx_0.dylib          	0x04779314 DrawRowCell(int, int, CRow*, int, int, bool, TableControlData*, CGRect*, long*, unsigned char) + 748
4   DataGrid.rbx_0.dylib          	0x04779a11 DrawRow(REALgraphicsStruct*, TableControlData*, CRow*, int, int, int, CGContext*) + 431
5   DataGrid.rbx_0.dylib          	0x047752bd DrawTableData(REALgraphicsStruct*, TableControlData*, CGContext*) + 167
6   DataGrid.rbx_0.dylib          	0x0477a57f DrawControlLayout(TableControlData*, REALgraphicsStruct*) + 305
7   rbframework.dylib             	0x0140d45d RuntimeCustomControlPane::Redraw(Graphics*) + 95
8   rbframework.dylib             	0x014f3c10 ToolButtonClass() + 14266
9   rbframework.dylib             	0x01503376 CocoaPagePanel::CocoaPagePanel(SubPane*, int, Rect, unsigned char) + 698
10  com.apple.AppKit              	0x913e08c2 -[NSView _drawRect:clip:] + 3717
11  com.apple.AppKit              	0x91410483 -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 1958
12  com.apple.AppKit              	0x91410824 -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2887
13  com.apple.AppKit              	0x91410824 -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2887
14  com.apple.AppKit              	0x91410824 -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2887
15  com.apple.AppKit              	0x91410824 -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2887
16  com.apple.AppKit              	0x913de21f -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 708
17  com.apple.AppKit              	0x913dd82b -[NSThemeFrame _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 259
18  com.apple.AppKit              	0x913d8eaa -[NSView _displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:] + 4817
19  com.apple.AppKit              	0x913d1dce -[NSView displayIfNeeded] + 1365
20  com.apple.AppKit              	0x914b63ae -[NSView display] + 117
21  rbframework.dylib             	0x014f64e6 CocoaPaneDelegate::Refresh() + 42
22  rbframework.dylib             	0x01408674 SubPane::Refresh() + 26
23  rbframework.dylib             	0x014086a7 SubPane::TriggerRefresh() + 23
24  rbframework.dylib             	0x0144a41f RuntimeControlRefresh + 85
25  DataGrid.rbx_0.dylib          	0x0477373f SelectionChanged(SelectionClassData*) + 71
26  com.mothsoftware.mailarchiverx	0x002ac7a0 DataGridSelection.AddRows%%o<DataGridSelection>i4i4 + 68
27  com.mothsoftware.mailarchiverx	0x00c4c4f9 V4RB_Grid.GetListFromCursor%%o<V4RB_Grid>o<VCursor> + 1466
28  com.mothsoftware.mailarchiverx	0x00c7ccec VCursorController.AfterQueryLists%%o<VCursorController> + 374
29  com.mothsoftware.mailarchiverx	0x00c7d3ef VCursorController.AfterQuery%%o<VCursorController> + 171
30  com.mothsoftware.mailarchiverx	0x00c7fdd4 VCursorController.Query%%o<VCursorController>ss + 2602
31  com.mothsoftware.mailarchiverx	0x00c6cc76 V4RB_ListBoxHierarchical.ReloadDependendData%%o<V4RB_ListBoxHierarchical>s + 2132
32  com.mothsoftware.mailarchiverx	0x00c612f8 V4RB_ListBoxHierarchical.Event_CellClick%%o<V4RB_ListBoxHierarchical>i4i4i4i4 + 887
33  com.mothsoftware.mailarchiverx	0x00882754 AppleListbox.Event_CellClick%b%o<AppleListbox>i4i4i4i4 + 6289
34  rbframework.dylib             	0x014c6edb RuntimeListbox::HandleCellClick(long, long, long, long, Rect) + 89
35  rbframework.dylib             	0x014c7124 RuntimeListbox::HandleRowClick(int, int, int, int) + 288
36  rbframework.dylib             	0x014e1216 NuListbox::HandleClick(int, int, int) + 382
37  rbframework.dylib             	0x014c0ff1 RuntimeListbox::HandleClick(int, int, int) + 271
38  rbframework.dylib             	0x014f298f ToolButtonClass() + 9529
39  rbframework.dylib             	0x01503f13 CocoaPagePanel::CocoaPagePanel(SubPane*, int, Rect, unsigned char) + 3671
40  com.apple.AppKit              	0x914637b1 -[NSWindow sendEvent:] + 7533
41  com.apple.AppKit              	0x913fb6ff -[NSApplication sendEvent:] + 4788
42  rbframework.dylib             	0x014fd9d7 CocoaMenu::AddChild(RunMenuItem*) + 1181
43  rbframework.dylib             	0x014fd691 CocoaMenu::AddChild(RunMenuItem*) + 343
44  com.mothsoftware.mailarchiverx	0x0001da10 Delegate.Invoke%% + 34
45  com.mothsoftware.mailarchiverx	0x000c2750 Application._CallFunctionWithExceptionHandling%%o<Application>p + 248
46  rbframework.dylib             	0x01433534 CallFunctionWithExceptionHandling(void (*)()) + 316
47  rbframework.dylib             	0x014fd92a CocoaMenu::AddChild(RunMenuItem*) + 1008
48  com.apple.AppKit              	0x9138cc82 -[NSApplication run] + 1007
49  rbframework.dylib             	0x014fdaac CocoaMenu::AddChild(RunMenuItem*) + 1394
50  rbframework.dylib             	0x014335ff mainloop() + 155
51  rbframework.dylib             	0x013e4104 RuntimeRun + 48
52  com.mothsoftware.mailarchiverx	0x00234395 REALbasic._RuntimeRun + 34
53  com.mothsoftware.mailarchiverx	0x0001d7a0 _Main + 245
54  com.mothsoftware.mailarchiverx	0x0000265c % main + 36
55  com.mothsoftware.mailarchiverx	0x01018950 _start + 116
56  com.mothsoftware.mailarchiverx	0x010188a6 start + 43

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