ok, earler I was using SDK 4.0, and 1.4.x
Now I have upgraded to Xcode/SDK4.1 and latest Ti 1.5.
I have the same problem, AND I can replicate in Simulator! The
Simluator should notice that no Audio exists as per the code but it
does not.
From running in Simulator with FlashCard:
[INFO] tab Phone prevTab = Controls [ERROR] Improper audio session mode for
recording. 1835361385 in -TiMediaAudioRecorderProxy start:
[ERROR] The application has crashed with an
unhandled exception. Stack trace: 0 CoreFoundation 0x0382cb7c
exceptionPreprocess + 156
1 libobjc.A.dylib 0x0397c40e objc_exception_throw + 47
2 KitchenSink 0x000aa3ee -[TiProxy
throwException:subreason:location:] + 478
3 KitchenSink 0x0011b671 -[TiMediaAudioRecorderProxy start:] +
1253
4 CoreFoundation 0x0379d5cd invoking + 29
5 CoreFoundation 0x0379d4a1 -[NSInvocation invoke] + 145
6 KitchenSink 0x00048fc5 -[KrollMethod call:] + 2092
7 KitchenSink 0x00048377 KrollCallAsFunction + 327
8 KitchenSink 0x0026c736
ZN2TI16TiCallbackObjectINS_8TiObjectEE4callEPNS_10TiExcStateEPS1_NS_7TiValueERKNS_7ArgListE
+ 550
9 KitchenSink 0x0023759d cti_op_call_NotTiFunction + 637
10 ??? 0x10915590 0x0 + 277960080
11 KitchenSink 0x001e4f9f
ZN2TI11Interpreter7executeEPNS_18FunctionExecutableEPNS_10TiExcStateEPNS_10TiFunctionEPNS_8TiObjectERKNS_7ArgListEPNS_14ScopeChainNodeEPNS_7TiValueE
+ 783
12 KitchenSink 0x002508ef
ZN2TI10TiFunction4callEPNS_10TiExcStateENS_7TiValueERKNS_7ArgListE
+ 127
13 KitchenSink 0x00199479
_ZN2TI4callEPNS_10TiExcStateENS_7TiValueENS_8CallTypeERKNS_8CallDataES2_RKNS_7ArgListE
+ 57
14 KitchenSink 0x0026a2b3 TiObjectCallAsFunction + 611
15 KitchenSink 0x000431e9 -[KrollCallback call:thisObject:] +
726
16 KitchenSink 0x00044355 -[KrollEvent invoke:] + 92
17 KitchenSink 0x000439e6 -[KrollContext invoke:] + 43
18 KitchenSink 0x00045187 -[KrollContext main] + 3092
19 Foundation 0x005bf76c -[NSThread main] + 81
20 Foundation 0x005bf6f8 NSThreadmain +
1387
21 libSystem.B.dylib 0x97cb481d pthread_start + 345
22 libSystem.B.dylib 0x97cb46a2 thread_start + 34
2010-10-21 17:36:26.868 KitchenSink[29232:8113]
Terminating app due to uncaught exception
'org.kitchensink.TiMediaAudioRecorderProxy', reason: 'Improper
audio session mode for recording. 1835361385 in
-TiMediaAudioRecorderProxy start:'
Call
stack at first throw: ( 0 CoreFoundation 0x0382cb99
exceptionPreprocess + 185
1 libobjc.A.dylib 0x0397c40e objc_exception_throw + 47
2 KitchenSink 0x000aa3ee -[TiProxy
throwException:subreason:location:] + 478
3 KitchenSink 0x0011b671 -[TiMediaAudioRecorderProxy start:] +
1253
4 CoreFoundation 0x0379d5cd invoking + 29
5 CoreFoundation 0x0379d4a1 -[NSInvocation invoke] + 145
6 KitchenSink 0x00048fc5 -[KrollMethod call:] + 2092
7 KitchenSink 0x00048377 KrollCallAsFunction + 327
8 KitchenSink 0x0026c736
ZN2TI16TiCallbackObjectINS_8TiObjectEE4callEPNS_10TiExcStateEPS1_NS_7TiValueERKNS_7ArgListE
+ 550
9 KitchenSink 0x0023759d cti_op_call_NotTiFunction + 637
10 ??? 0x10915590 0x0 + 277960080
11 KitchenSink 0x001e4f9f
ZN2TI11Interpreter7executeEPNS_18FunctionExecutableEPNS_10TiExcStateEPNS_10TiFunctionEPNS_8TiObjectERKNS_7ArgListEPNS_14ScopeChainNodeEPNS_7TiValueE
+ 783
12 KitchenSink 0x002508ef
ZN2TI10TiFunction4callEPNS_10TiExcStateENS_7TiValueERKNS_7ArgListE
+ 127
13 KitchenSink 0x00199479
ZN2TI4callEPNS_10TiExcStateENS_7TiValueENS_8CallTypeERKNS_8CallDataES2_RKNS_7ArgListE
+ 57
14 KitchenSink 0x0026a2b3 TiObjectCallAsFunction + 611
15 KitchenSink 0x000431e9 -[KrollCallback call:thisObject:] +
726
16 KitchenSink 0x00044355 -[KrollEvent invoke:] + 92
17 KitchenSink 0x000439e6 -[KrollContext invoke:] + 43
18 KitchenSink 0x00045187 -[KrollContext main] + 3092
19 Foundation 0x005bf76c -[NSThread main] + 81
20 Foundation 0x005bf6f8 NSThreadmain +
1387
21 libSystem.B.dylib 0x97cb481d _pthread_start + 345
22 libSystem.B.dylib 0x97cb46a2 thread_start + 34
) terminate called after throwing an instance of 'NSException'
[INFO] Application has exited from
Simulator