pec1985/ExpandableTextArea — Issue #46: Crash with iOS 5 SDK
Author: sindresorhus
Created: 2011-10-29 17:39:18+00:00
State: open

When building the example app (commit 9f56bfad474711ec7f0f807a63994ec7c2eba814) with the iOS 5 SDK it crashes. It works fine with 1.4.2.

Titanium Mobile SDK 1.7.3

Console dump:

```
[ERROR] The application has crashed with an unhandled exception. Stack trace:

0 CoreFoundation 0x02e49052 __exceptionPreprocess + 178

1 libobjc.A.dylib 0x02c69d0a objc_exception_throw + 44

2 CoreFoundation 0x02df1a78 +[NSException raise:format:arguments:] + 136

3 CoreFoundation 0x02df19e9 +[NSException raise:format:] + 57

4 UIKit 0x009ffda4 __windowForView + 158

5 UIKit 0x00a01bf2 -[UIView(Hierarchy) _postMovedFromSuperview:] + 30

6 UIKit 0x00a06a4f -[UIView(Internal) _addSubview:positioned:relativeTo:] + 1633

7 UIKit 0x00a0072b -[UIView(Hierarchy) addSubview:] + 56

8 SMSViewTest 0x0031fe9f -[PESMSTextArea layoutSubviews] + 275

9 UIKit 0x00a08322 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 178

10 CoreFoundation 0x02e4ae72 -[NSObject performSelector:withObject:] + 66

11 QuartzCore 0x01cbc92d -[CALayer layoutSublayers] + 266

12 QuartzCore 0x01cc6827 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 231

13 QuartzCore 0x01c4cfa7 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 377

14 QuartzCore 0x01c4eea6 _ZN2CA11Transaction6commitEv + 374

15 QuartzCore 0x01c4e580 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 80

16 CoreFoundation 0x02e1d9ce __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 30

17 CoreFoundation 0x02db4670 __CFRunLoopDoObservers + 384

18 CoreFoundation 0x02d804f6 __CFRunLoopRun + 1174

19 CoreFoundation 0x02d7fdb4 CFRunLoopRunSpecific + 212

20 CoreFoundation 0x02d7fccb CFRunLoopRunInMode + 123

21 GraphicsServices 0x0285d879 GSEventRunModal + 207

22 GraphicsServices 0x0285d93e GSEventRun + 114

23 UIKit 0x009c9a9b UIApplicationMain + 1175

24 SMSViewTest 0x0000479a main + 442

25 SMSViewTest 0x000030e5 start + 53

2011-10-29 19:27:27.999 SMSViewTest[5789:17603] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Requesting the window of a view () with a nil layer. This view probably hasn't received initWithFrame: or initWithCoder:.'

*** First throw call stack:

(0x2e49052 0x2c69d0a 0x2df1a78 0x2df19e9 0x9ffda4 0xa01bf2 0xa06a4f 0xa0072b 0x31fe9f 0xa08322 0x2e4ae72 0x1cbc92d 0x1cc6827 0x1c4cfa7 0x1c4eea6 0x1c4e580 0x2e1d9ce 0x2db4670 0x2d804f6 0x2d7fdb4 0x2d7fccb 0x285d879 0x285d93e 0x9c9a9b 0x479a 0x30e5)

terminate called throwing an exception
[DEBUG] App Spec: specified by path /Users/sindresorhus/Projects/Titanium/SMSViewTest/build/iphone/build/Debug-iphonesimulator/SMSViewTest.app
[DEBUG] SDK Root: path=/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk version=5.0 name=Simulator - iOS 5.0
[DEBUG] using device family iphone
[DEBUG] Session started
[DEBUG] Session did end with error (null)
[INFO] Application has exited from Simulator
```