chocar la segunda vez que cargo una celda

This is how I load the cell:

zimmerCell = (ZimmerCell*)[tableView dequeueReusableCellWithIdentifier:@"ZimmerCell"];
        if (zimmerCell == nil) {
            ZimmerCell* loadedCell;
            loadedCell = [[[NSBundle mainBundle] loadNibNamed:@"ZimmerCell" owner:self options:nil] objectAtIndex:0];
            zimmerCell = [loadedCell retain];
            [zimmerCell prepare];
        }
        return zimmerCell;

It works the first time I open the table. When I exit the view controller and enter it again, it crashes with the following:

* Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer bounds contains NaN: [0 0; nan 7.27683e-38]' * Call stack at first throw: ( 0 CoreFoundation 0x01a44be9 excepciónPreproceso + 185 1 libobjc.A.dylib
0x01b995c2 objc_exception_throw + 47 2 CoreFoundation
0x019fd628 +[NSException raise:format:arguments:] + 136 3
CoreFoundation 0x019fd59a +[NSException raise:format:] + 58 4 QuartzCore
0x008b63ee _ZL16CALayerSetBoundsP7CALayerRKN2CA4RectEb + 227 5
QuartzCore 0x008b62b6 -[CALayer setBounds:] + 122 6 UIKit 0x0121eac0 -[UIView _createLayerWithFrame:] + 401 7 UIKit 0x0121a13b UIViewCommonInitWithFrame + 421 8 UIKit
0x0121b063 -[UIView initWithFrame:] + 113 9 UIKit
0x013ae909 -[UITableViewCell initWithCoder:] + 1218 10 PrivatQuadrat 0x00021e87 -[ZimmerCell initWithCoder:] + 62 11 UIKit
0x013e0265 -[UIClassSwapper initWithCoder:] + 237 12 UIKit
0x014c69e4 UINibDecoderDecodeObjectForValue + 2592 13 UIKit
0x014c7693 -[UINibDecoder decodeObjectForKey:] + 398 14 UIKit
0x013dff43 -[UIRuntimeConnection initWithCoder:] + 212 15 UIKit
0x014c69e4 UINibDecoderDecodeObjectForValue + 2592 16 UIKit
0x014c62dc UINibDecoderDecodeObjectForValue + 792 17 UIKit
0x014c7693 -[UINibDecoder decodeObjectForKey:] + 398 18 UIKit
0x013df200 -[UINib instantiateWithOwner:options:] + 804 19 UIKit
0x013e1081 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 168 20 PrivatQuadrat
0x00021401 -[ErweitertViewController tableView:cellForRowAtIndexPath:] + 202 21 UIKit 0x0125d7fa -[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:withIndexPath:] + 634 22 UIKit 0x0125377f -[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:] + 75 23 UIKit 0x01268450 -[UITableView(_UITableViewPrivate) _updateVisibleCellsNow:] + 1561 24 UIKit 0x01260538 -[UITableView layoutSubviews] + 242 25 QuartzCore 0x008bc451 -[CALayer layoutSublayers] + 181 26 QuartzCore
0x008bc17c CALayerLayoutIfNeeded + 220 27 QuartzCore
0x008b537c _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 310 28 QuartzCore 0x008b50d0 _ZN2CA11Transaction6commitEv + 292 29 QuartzCore 0x008e57d5 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 99 30 CoreFoundation 0x01a25fbb __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION
+ 27 31 CoreFoundation 0x019bb0e7 __CFRunLoopDoObservers + 295 32 CoreFoundation 0x01983bd7 __CFRunLoopRun + 1575 33 CoreFoundation 0x01983240 CFRunLoopRunSpecific + 208 34 CoreFoundation
0x01983161 CFRunLoopRunInMode + 97 35 GraphicsServices
0x02487268 GSEventRunModal + 217 36 GraphicsServices
0x0248732d GSEventRun + 115 37 UIKit
0x011f842e UIApplicationMain + 1160 38 PrivatQuadrat
0x00002184 main + 102 39 PrivatQuadrat
0x00002115 inicio + 53

¿Alguna idea?

preguntado el 08 de noviembre de 11 a las 11:11

edited, made mistake while copy-pasting it. -

Try debugging by setting environment variable NSZombieEnabled to YES. Last time I saw similar crash in my Application it was because I was overreleasing an object that I populate in UITableView. -

0 Respuestas

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.