Created
April 1, 2014 21:21
-
-
Save brendanzagaeski/9923465 to your computer and use it in GitHub Desktop.
Xamarin Pixate component, potential bug on Xcode 5.1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Under certain circumstances the Pixate library can cause an assertion error: | |
> *** Assertion failure in -[UITableView _configureCellForDisplay:forIndexPath:], /SourceCache/UIKit_Sim/UIKit-2903.23/UITableView.m:6246 | |
OR | |
> *** Assertion failure in -[UITableView _configureCellForDisplay:forIndexPath:], /SourceCache/UIKit/UIKit-2935.137/UITableView.m:6509 | |
Continuing through the assertion produces an unhandled exception, and stack traces. It turns out the most interesting part of the stack traces is the involvement of `[PXUITableView layoutSubviews]`. | |
Apparently the Pixate library "takes over" the default UITableView class as soon as it's included in the project by the compiler: | |
A. If you remove the Pixate library entirely, the problem stops. | |
B. If you then add back just a reference to the Pixate library, the problem does not return. | |
C. If you then add the following line (or any other use of the library) anywhere in the project, the problem _does_ return. | |
`var x = PixateFreestyle.BuildDate;` | |
This error might depend on the Xcode version used to compile the app. It definitely happens with Xcode 5.1. It might not happen with Xcode 5.0. The timing of adding a `UITableViewSource` to the `UITableView`, and calling `UITableView.ReloadData()` seem to play a part as well. | |
## Stack trace after continuing through the assertion error. | |
Unhandled managed exception: Objective-C exception thrown. Name: NSInternalInconsistencyException Reason: UITableView dataSource must return a cell from tableView:cellForRowAtIndexPath: (MonoTouch.Foundation.MonoTouchException) | |
at (wrapper managed-to-native) MonoTouch.UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr) | |
at MonoTouch.UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x0004c] in /Developer/MonoTouch/Source/monotouch/src/UIKit/.pmcs-compat.UIApplication.cs:38 | |
at SinDelantalMx.Application.Main (System.String[] args) [0x0002d] in /Volumes/Cases/iOS_UITableViewCell_ConfigureForDisplay_Assertion_BScheiman_2014_04_01/src/SinDelantalMx/Main.cs:15 | |
mono-rt: Stacktrace: | |
mono-rt: | |
Native stacktrace: | |
mono-rt: 0 libmonoboehm-2.0.dylib 0x03891ce7 mono_handle_native_sigsegv + 327 | |
mono-rt: 1 libmonoboehm-2.0.dylib 0x038e737a sigabrt_signal_handler + 122 | |
mono-rt: 2 libsystem_c.dylib 0x0446294b _sigtramp + 43 | |
mono-rt: 3 ??? 0xffffffff 0x0 + 4294967295 | |
mono-rt: 4 libsystem_sim_c.dylib 0x041f2e12 abort + 127 | |
mono-rt: 5 SinDelantalMx 0x0020a813 monotouch_unhandled_exception_handler + 291 | |
mono-rt: 6 libmonoboehm-2.0.dylib 0x0389252b mono_invoke_unhandled_exception_hook + 91 | |
mono-rt: 7 libmonoboehm-2.0.dylib 0x0389153c mono_handle_exception_internal + 6588 | |
mono-rt: 8 libmonoboehm-2.0.dylib 0x0388fb79 mono_handle_exception + 41 | |
mono-rt: 9 libmonoboehm-2.0.dylib 0x038e0e49 mono_x86_throw_exception + 137 | |
mono-rt: 10 ??? 0x0dfaae57 0x0 + 234532439 | |
mono-rt: 11 SinDelantalMx 0x001fb9f1 monotouch_exception_handler + 177 | |
mono-rt: 12 CoreFoundation 0x03f24a1d __handleUncaughtException + 749 | |
mono-rt: 13 libobjc.A.dylib 0x03be0b5c _ZL15_objc_terminatev + 100 | |
mono-rt: 14 libc++abi.dylib 0x03df9f60 _ZSt11__terminatePFvvE + 14 | |
mono-rt: 15 libc++abi.dylib 0x03df997d _ZN10__cxxabiv1L22exception_cleanup_funcE19_Unwind_Reason_CodeP17_Unwind_Exception + 0 | |
mono-rt: 16 libobjc.A.dylib 0x03be09cd _ZL26_objc_exception_destructorPv + 0 | |
mono-rt: 17 CoreFoundation 0x03e94448 +[NSException raise:format:arguments:] + 136 | |
mono-rt: 18 Foundation 0x00e26fee -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 116 | |
mono-rt: 19 UIKit 0x015d33d5 __53-[UITableView _configureCellForDisplay:forIndexPath:]_block_invoke + 426 | |
mono-rt: 20 UIKit 0x0154c3ef +[UIView(Animation) performWithoutAnimation:] + 82 | |
mono-rt: 21 UIKit 0x0154c438 +[UIView(Animation) _performWithoutAnimation:] + 40 | |
mono-rt: 22 UIKit 0x015d3226 -[UITableView _configureCellForDisplay:forIndexPath:] + 108 | |
mono-rt: 23 UIKit 0x015d963d -[UITableView _createPreparedCellForGlobalRow:withIndexPath:] + 442 | |
mono-rt: 24 UIKit 0x015d96f3 -[UITableView _createPreparedCellForGlobalRow:] + 69 | |
mono-rt: 25 UIKit 0x015bd774 -[UITableView _updateVisibleCellsNow:] + 2378 | |
mono-rt: 26 UIKit 0x015d0e95 -[UITableView layoutSubviews] + 213 | |
mono-rt: 27 SinDelantalMx 0x001d0131 callSuper0 + 57 | |
mono-rt: 28 SinDelantalMx 0x001d8e9d -[PXUITableView layoutSubviews] + 113 | |
mono-rt: 29 UIKit 0x01555267 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 355 | |
mono-rt: 30 libobjc.A.dylib 0x03bf281f -[NSObject performSelector:withObject:] + 70 | |
mono-rt: 31 QuartzCore 0x00c952ea -[CALayer layoutSublayers] + 148 | |
mono-rt: 32 QuartzCore 0x00c890d4 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 380 | |
mono-rt: 33 QuartzCore 0x00c88f40 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 26 | |
mono-rt: 34 QuartzCore 0x00bf0ae6 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 294 | |
mono-rt: 35 QuartzCore 0x00bf1e71 _ZN2CA11Transaction6commitEv + 393 | |
mono-rt: 36 QuartzCore 0x00bf2544 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 92 | |
mono-rt: 37 CoreFoundation 0x03e5c4ce __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 30 | |
mono-rt: 38 CoreFoundation 0x03e5c41f __CFRunLoopDoObservers + 399 | |
mono-rt: 39 CoreFoundation 0x03e3a344 __CFRunLoopRun + 1076 | |
mono-rt: 40 CoreFoundation 0x03e39ac3 CFRunLoopRunSpecific + 467 | |
mono-rt: 41 CoreFoundation 0x03e398db CFRunLoopRunInMode + 123 | |
mono-rt: 42 GraphicsServices 0x04b139e2 GSEventRunModal + 192 | |
mono-rt: 43 GraphicsServices 0x04b13809 GSEventRun + 104 | |
mono-rt: 44 UIKit 0x014ead3b UIApplicationMain + 1225 | |
mono-rt: 45 ??? 0x0e74f590 0x0 + 242546064 | |
mono-rt: 46 ??? 0x0e74e124 0x0 + 242540836 | |
mono-rt: 47 ??? 0x0e4d4cdc 0x0 + 239946972 | |
mono-rt: 48 ??? 0x0e4d4e5f 0x0 + 239947359 | |
mono-rt: 49 libmonoboehm-2.0.dylib 0x037ee96b mono_jit_runtime_invoke + 843 | |
mono-rt: 50 libmonoboehm-2.0.dylib 0x039a0bef mono_runtime_invoke + 127 | |
mono-rt: 51 libmonoboehm-2.0.dylib 0x039a65e1 mono_runtime_exec_main + 401 | |
mono-rt: 52 libmonoboehm-2.0.dylib 0x039a63a4 mono_runtime_run_main + 628 | |
mono-rt: 53 libmonoboehm-2.0.dylib 0x0385c8ed mono_jit_exec + 93 | |
mono-rt: 54 SinDelantalMx 0x001f46f4 main + 2788 | |
mono-rt: 55 libdyld.dylib 0x043e4725 start + 0 | |
mono-rt: | |
================================================================= | |
Got a SIGABRT while executing native code. This usually indicates | |
a fatal error in the mono runtime or one of the native libraries | |
used by your application. | |
================================================================= |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment