title: Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer bounds contains NaN: [0 0; 49.0686 nan]'
body: <p>I have a tableView with custom cells. each of the cells has a UIView inside and a UILabel.</p>
  
  <p>The data for the first two cells are fine - when I scroll in the third one the app crashes with the error :</p>
  
  <pre><code>Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer bounds contains NaN: [0 0; 49.0686 nan]'
  </code></pre>
  
  <p>The code that this is happening is this :</p>
  
  <pre><code>BarView *bar = [[BarView alloc] initWithFrame:CGRectMake((barFullWidth - barWidth)/2 + _index*(barFullWidth),  plotView.height - roundf([[barInfo objectForKey:@"value"] floatValue]*barHeightRatio), barWidth, roundf([[barInfo objectForKey:@"value"] floatValue]*barHeightRatio))];
  </code></pre>
  
  <p>which calls this :</p>
  
  <pre><code>- (id)initWithFrame:(CGRect)frame {
      self = [super initWithFrame:frame];
  </code></pre>
  
  <p>Where should I look at? I cannot even understand what this error means.</p>
  
  <p>The bar is the UIView inside the cell. The bar itself is created and is visible, even though the app crashes.</p>