Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Thank you for your very good advices. As you suggest, I retain the array in my @property:</p> <pre><code> @property (retain) NSArray *list; </code></pre> <h2>If in my code I put:</h2> <pre><code> NSString *fieldName = [[[NSString alloc] initWithString: @"line 1"] retain]; [arrayTmp addObject:fieldName]; [arrayTmp addObject:@"line 2" ]; </code></pre> <p>it's working! </p> <h2>But if I put:</h2> <pre><code>NSString *fieldName = [[[NSString alloc] initWithString: [NSString stringWithFormat: @"line 1"] ] retain]; [arrayTmp addObject:fieldName]; [arrayTmp addObject:@"line 2" ]; </code></pre> <p>it's display well the tableview but if I move the tableView 2 or 3 times with the finger, the iphone freeze.And unfortunately, I need to use stringWithFormat &amp; stringWithUTF8String in order to populate my tableView from a database. </p> <p>The error is still "EXC_BAD_ACCESS". But I don't know how to perform a backtrace. The Debugger shows:</p> <h1>0 0x300c8c18 in objc_msgSend</h1> <h1>1 0x30b524dc in -[UILabel text]</h1> <h1>2 0x30c07b44 in -[UITableViewCell layoutSubviews]</h1> <h1>3 0x30a74020 in -[UIView(CALayerDelegate) _layoutSublayersOfLayer:]</h1> <h1>4 0x31dd20f0 in -[CALayer layoutSublayers]</h1> <h1>5 0x31dd2000 in CALayerLayoutIfNeeded</h1> <h1>6 0x31dd1774 in CAContextCommitTransaction</h1> <h1>7 0x31dd143c in CATransactionCommit</h1> <h1>8 0x3026a0ec in __CFRunLoopDoObservers</h1> <h1>9 0x30269920 in CFRunLoopRunSpecific</h1> <h1>10 0x30269326 in CFRunLoopRunInMode</h1> <h1>11 0x31563e60 in GSEventRunModal</h1> <h1>12 0x30a4feb8 in -[UIApplication _run]</h1> <h1>13 0x30a5961c in UIApplicationMain</h1> <h1>14 0x000020bc in main at main.m:14</h1> <p>asm obj_msgSend 0x300c8cc04:1 0x300c8c04 &lt;+0000> teq r0, #0 ; 0x0</p> <p>0x300c8c08 &lt;+0004> moveq r1, #0 ; 0x0</p> <p>0x300c8c0c &lt;+0008> bxeq lr</p> <p>0x300c8c10 &lt;+0012> stmdb sp!, {r3, r4, r5, r6}</p> <p>0x300c8c14 &lt;+0016> ldr r4, [r0]</p> <h2>0x300c8c18 &lt;+0020> ldr r5, [r4, #8]</h2> <p>0x300c8c1c &lt;+0024> ldr r6, [r5]</p> <p>0x300c8c20 &lt;+0028> add r3, r5, #8 ; 0x8</p> <p>0x300c8c24 &lt;+0032> and r5, r6, r1, lsr #2</p> <p>0x300c8c28 &lt;+0036> ldr r4, [r3, r5, lsl #2]</p> <p>0x300c8c2c &lt;+0040> teq r4, #0 ; 0x0</p> <p>0x300c8c30 &lt;+0044> add r5, r5, #1 ; 0x1</p> <p>0x300c8c34 &lt;+0048> beq 0x300c8c54 </p> <p>0x300c8c38 &lt;+0052> ldr ip, [r4]</p> <p>0x300c8c3c &lt;+0056> teq r1, ip</p> <p>0x300c8c40 &lt;+0060> and r5, r5, r6</p> <p>0x300c8c44 &lt;+0064> bne 0x300c8c28 </p> <p>0x300c8c48 &lt;+0068> ldr ip, [r4, #8]</p> <p>0x300c8c4c &lt;+0072> ldmia sp!, {r3, r4, r5, r6}</p> <p>0x300c8c50 &lt;+0076> bx ip</p> <p>0x300c8c54 &lt;+0080> ldmia sp!, {r3, r4, r5, r6}</p> <p>0x300c8c58 &lt;+0084> b 0x300c8c5c </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload