Hi I'm getting a Sigsegv error after add rows to uitableview
this is my code:
this method it called after callback from server request
public void addContacts(){
InvokeOnMainThread (delegate {
try{
items.AddRange(itemsAdd);//Add to
tableview data
tableContact.ReloadData();
tableContact.SetNeedsLayout();
}catch(Exception e){
Console.WriteLine(e.StackTrace);
}
ICLayoutMgr.Get().SetBusy(false);
tableContact.ScrollEnabled = true;
});
}
GetCell Method
public override UITableViewCell GetCell (UITableView tableView, NSIndexPath
indexPath)
{
var cell = tableView.DequeueReusableCell
(cellIdentifier) as
ICTableContactCell;
var itemC = tableItems [indexPath.Row];
if (cell == null) {
cell = new ICTableContactCell (itemC,
new NSString (cellIdentifier));
if(cells==null){
cells=new
List<ICTableContactCell>();
}
cells.Add(cell);
}
itemC.index = indexPath.Row;
if(itemC!=null)
cell.UpdateCell (itemC);
return cell as UITableViewCell;
}
the error log
Feb 26 17:50:16 iPod-touch CardReader_iOS[324] <Error>: Stacktrace:
Feb 26 17:50:16 iPod-touch CardReader_iOS[324] <Error>: at <unknown>
<0xffffffff>
Feb 26 17:50:16 iPod-touch CardReader_iOS[324] <Error>: at (wrapper
managed-to-native) MonoTouch.UIKit.UIApplication.UIApplicationMain
(int,string[],intptr,intptr) <0xffffffff>
Feb 26 17:50:16 iPod-touch CardReader_iOS[324] <Error>: at
MonoTouch.UIKit.UIApplication.Main (string[],string,string) [0x0004c] in
/Developer/MonoTouch/Source/monotouch/src/UIKit/.pmcs-compat.UIApplication.cs:38
Feb 26 17:50:16 iPod-touch CardReader_iOS[324] <Error>: at
CardReader_iOS.Application.Main (string[]) [0x00008] in
/Users/developer/Documents/InstantCustomerDev/instantcustomerdev/InstantCustomer/CardReader_iOS/CardReader_iOS/Main.cs:18
Feb 26 17:50:16 iPod-touch CardReader_iOS[324] <Error>: at (wrapper
runtime-invoke) object.runtime_invoke_dynamic (intptr,intptr,intptr,intptr)
<0xffffffff>
Feb 26 17:50:16 iPod-touch CardReader_iOS[324] <Error>:
Native stacktrace:
Feb 26 17:50:16 iPod-touch CardReader_iOS[324] <Error>: 0
CardReader_iOS
0x00332ed5 mono_handle_native_sigsegv + 260
Feb 26 17:50:16 iPod-touch CardReader_iOS[324] <Error>: 1
CardReader_iOS
0x0033bfad mono_sigsegv_signal_handler + 176
Feb 26 17:50:16 iPod-touch CardReader_iOS[324] <Error>: 2
libsystem_platform.dylib 0x3a1c1063 _sigtramp + 42
Feb 26 17:50:16 iPod-touch CardReader_iOS[324] <Error>: 3
CardReader_iOS
0x0004d84c
CardReader_iOS_ICTableContactSource_GetCell_MonoTouch_UIKit_UITableView_MonoTouch_Foundation_NSIndexPath
+ 344
Feb 26 17:50:16 iPod-touch CardReader_iOS[324] <Error>: 4
CardReader_iOS
0x001f10d0
wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr
+ 200
Feb 26 17:50:16 iPod-touch CardReader_iOS[324] <Error>: 5
CardReader_iOS
0x0033e087 mono_jit_runtime_invoke + 1134
Feb 26 17:50:16 iPod-touch CardReader_iOS[324] <Error>: 6
CardReader_iOS
0x00378d2d mono_runtime_invoke + 88
Feb 26 17:50:16 iPod-touch CardReader_iOS[324] <Error>: 7
CardReader_iOS
0x0030e4af
native_to_managed_trampoline_CardReader_iOS_ICTableContactSource_GetCell +
402
Feb 26 17:50:16 iPod-touch CardReader_iOS[324] <Error>: 8 UIKit
0x3212ea5b <redacted> + 410
Feb 26 17:50:16 iPod-touch CardReader_iOS[324] <Error>: 9 UIKit
0x320d6e7d <redacted> + 1804
Feb 26 17:50:16 iPod-touch CardReader_iOS[324] <Error>: 10 UIKit
0x320d6699 <redacted> + 184
Feb 26 17:50:16 iPod-touch CardReader_iOS[324] <Error>: 11 UIKit
0x31ffcda3 <redacted> + 346
Feb 26 17:50:16 iPod-touch CardReader_iOS[324] <Error>: 12 QuartzCore
0x31c83c6b <redacted> + 142
Feb 26 17:50:16 iPod-touch CardReader_iOS[324] <Error>: 13 QuartzCore
0x31c7f47b <redacted> + 350
Feb 26 17:50:16 iPod-touch CardReader_iOS[324] <Error>: 14 QuartzCore
0x31c7f30d <redacted> + 16
Feb 26 17:50:16 iPod-touch CardReader_iOS[324] <Error>: 15 QuartzCore
0x31c7ed1f <redacted> + 230
Feb 26 17:50:16 iPod-touch CardReader_iOS[324] <Error>: 16 QuartzCore
0x31c7eb2f <redacted> + 314
Feb 26 17:50:16 iPod-touch CardReader_iOS[324] <Error>: 17 QuartzCore
0x31cd3825 <redacted> + 516
Feb 26 17:50:16 iPod-touch CardReader_iOS[324] <Error>: 18
IOMobileFramebuffer 0x348c976d <redacted> + 104
Feb 26 17:50:16 iPod-touch CardReader_iOS[324] <Error>: 19 IOKit
0x3056ba75 IODispatchCalloutFromCFMessage + 248
Feb 26 17:50:16 iPod-touch CardReader_iOS[324] <Error>: 20
CoreFoundation
0x2f849e21 <redacted> + 136
Feb 26 17:50:16 iPod-touch CardReader_iOS[324] <Error>: 21
CoreFoundation
0x2f8549df <redacted> + 34
Feb 26 17:50:16 iPod-touch CardReader_iOS[324] <Error>: 22
CoreFoundation
0x2f85497b <redacted> + 346
Feb 26 17:50:16 iPod-touch CardReader_iOS[324] <Error>: 23
CoreFoundation
0x2f85314f <redacted> + 1398
Feb 26 17:50:16 iPod-touch CardReader_iOS[324] <Error>: 24
CoreFoundation
0x2f7bdc27 CFRunLoopRunSpecific + 522
Feb 26 17:50:16 iPod-touch CardReader_iOS[324] <Error>: 25
CoreFoundation
0x2f7bda0b CFRunLoopRunInMode + 106
Feb 26 17:50:16 iPod-touch CardReader_iOS[324] <Error>: 26
GraphicsServices 0x344ad283 GSEventRunModal + 138
Feb 26 17:50:16 iPod-touch CardReader_iOS[324] <Error>: 27 UIKit
0x32061049 UIApplicationMain + 1136
Feb 26 17:50:16 iPod-touch CardReader_iOS[324] <Error>: 28
CardReader_iOS
0x000e3ef8
wrapper_managed_to_native_MonoTouch_UIKit_UIApplication_UIApplicationMain_int_string___intptr_intptr
+ 272
Feb 26 17:50:16 iPod-touch CardReader_iOS[324] <Error>: 29
CardReader_iOS
0x000c02b4 MonoTouch_UIKit_UIApplication_Main_string___string_string + 300
Feb 26 17:50:16 iPod-touch CardReader_iOS[324] <Error>: 30
CardReader_iOS
0x00027148 CardReader_iOS_Application_Main_string__ + 172
Feb 26 17:50:16 iPod-touch CardReader_iOS[324] <Error>: 31
CardReader_iOS
0x001f10d0
wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr
+ 200
Feb 26 17:50:16 iPod-touch CardReader_iOS[324] <Error>: 32
CardReader_iOS
0x0033e087 mono_jit_runtime_invoke + 1134
Feb 26 17:50:16 iPod-touch CardReader_iOS[324] <Error>: 33
CardReader_iOS
0x00378d2d mono_runtime_invoke + 88
Feb 26 17:50:16 iPod-touch CardReader_iOS[324] <Error>: 34
CardReader_iOS
0x0037c8b5 mono_runtime_exec_main + 276
Feb 26 17:50:16 iPod-touch CardReader_iOS[324] <Error>: 35
CardReader_iOS
0x0037c705 mono_runtime_run_main + 424
Feb 26 17:50:16 iPod-touch CardReader_iOS[324] <Error>: 36
CardReader_iOS
0x0032c6e1 mono_jit_exec + 48
Feb 26 17:50:16 iPod-touch CardReader_iOS[324] <Error>: 37
CardReader_iOS
0x003af704 main + 2468
Feb 26 17:50:16 iPod-touch CardReader_iOS[324] <Error>: 38
libdyld.dylib
0x3a0a6ab7 <redacted> + 2
Feb 26 17:50:16 iPod-touch CardReader_iOS[324] <Error>:
=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================
--
View this message in context:
http://monotouch.2284126.n4.nabble.com/SigSegv-error-in-UITableViewSource-GetCell-after-Add-rows-to-UITableView-tp4658547.html
Sent from the MonoTouch mailing list archive at Nabble.com.
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch