Playground crashes when calling a method from drawRect of a custom UIView
| Originator: | alexander.rupsch | ||
| Number: | rdar://18260587 | Date Originated: | |
| Status: | Open | Resolved: | |
| Product: | Developer Tools | Product Version: | 6.0 beta7 (6A280n) |
| Classification: | Crash | Reproducible: | Always |
Summary:
When executing the following (also attached as file) playground it will call drawRect many times until it crashes.
import UIKit
import XCPlayground
class CustomView : UIView
{
override func drawRect(rect: CGRect)
{
// this works (as drawing code does as well)
println(3)
// This will call the method very often until it crashes
self.aMethodWithInt(4)
}
func aMethod()
{
}
func aMethodWithInt(aInt: Int)
{
println(aInt)
}
}
let view = CustomView(frame: CGRectMake(0, 0, 800, 400))
// The method itself works fine
view.aMethodWithInt(6)
XCPShowView("graph", view)
Steps to Reproduce:
1. Open the playground
2. wait until it crashes
Expected Results:
drawRect should be called once per execution. That would enable to use sub methods to playing around with drawRect implementation.
Actual Results:
crash
PlayGroundDrawRectBug.playground/: error: Playground execution aborted: Execution was interrupted, reason: EXC_BAD_ACCESS (code=2, address=0x7fff514606e8).
Version:
Xcode 6 beta7 (6A280n)
Notes:
Configuration:
MacBook Pro Retina (Mid 2012), OS X Yosemite 10.10 preview 7
Attachments:
'PlaygroundDrawRectBug.zip' was successfully uploaded.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!