Crashing when opening new windows
Hi,
My app crashes intermittently when I open new windows. I'm using one (hidden) tab and a navigation bar with a hierarchy of windows. The example below shows what (sometimes) happens when I try to open a blank modal window:
My code, first -
var searches_win = Titanium.UI.createWindow({
barColor:BAR_COLOUR,
backgroundColor:'#336699',
title:'Recent Searches'
});
var b = Titanium.UI.createButton({
title:'Close',
style:Titanium.UI.iPhone.SystemButtonStyle.PLAIN
});
searches_win.setLeftNavButton(b);
b.addEventListener('click',function() {
searches_win.close();
});
searches_win.open({modal:true});
Crash, and output:
[74429:207] *** -[NSCFNumber _tabBlur]: unrecognized selector sent to instance 0x504c640
[ERROR] The application has crashed with an unhandled exception. Stack trace:
0 CoreFoundation 0x029e745b __raiseError + 299
1 libobjc.A.dylib 0x92a68509 objc_exception_throw + 56
2 CoreFoundation 0x02a4483b -[NSObject doesNotRecognizeSelector:] + 187
3 CoreFoundation 0x029db676 ___forwarding___ + 902
4 CoreFoundation 0x029b76c2 _CF_forwarding_prep_0 + 50
5 AnyOldMap 0x000703f4 -[TitaniumViewController windowFocused:] + 483
6 AnyOldMap 0x0003b70d -[TiWindowProxy attachViewToTopLevelWindow] + 417
7 AnyOldMap 0x0003c1ce -[TiWindowProxy open:] + 341
8 Foundation 0x0045ab36 __NSThreadPerformPerform + 678
9 CoreFoundation 0x029b28e1 CFRunLoopRunSpecific + 3217
10 CoreFoundation 0x029b1c48 CFRunLoopRunInMode + 88
11 GraphicsServices 0x02e53615 GSEventRunModal + 217
12 GraphicsServices 0x02e536da GSEventRun + 115
13 UIKit 0x006e4faf UIApplicationMain + 1157
14 AnyOldMap 0x000032ce main + 360
15 AnyOldMap 0x0000313a start + 54
2010-06-09 10:54:16.613 AnyOldMap[74429:207] *** Terminating app due to uncaught exception
'NSInvalidArgumentException', reason: '*** -[NSCFNumber _tabBlur]:
unrecognized selector sent to instance 0x504c640'
2010-06-09 10:54:16.615 AnyOldMap[74429:207] Stack: (
43938907,
2460386569,
44320827,
43890294,
43742914,
459764,
243469,
246222,
4565814,
43722977,
43719752,
48576021,
48576218,
7229359,
13006,
12602
)
[DEBUG] Session did end with error (null)
Has anyone else encountered an error like this before?
Thanks!
2 Answers
-
I get the same error.
[DEBUG] App Spec: <DTiPhoneSimulatorApplicationSpecifier 0x10011bc50> specified by path /Users/mayflower/Documents/mPiwik/build/iphone/build/Debug-iphonesimulator/test.app
[DEBUG] SDK Root: <DTiPhoneSimulatorSystemRoot 0x100119af0> path=/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.1.3.sdk version=3.1.3 name=Simulator - iPhone OS 3.1.3
[DEBUG] using device family iphone
[INFO] Launched application in Simulator (1.72 seconds)
[DEBUG] Session started
[DEBUG] Session did end with error (null)
[INFO] Application has exited from SimulatorXcode works fine. I think the problem is related to titanium. Android SDK also works fine
-
Update: It does not crash as soon as I do not pass a title param in createWindow();
But the title contains such AlNum characters.