I just noticed that if 2 apps compiled with Corona SDK are started (one in the background), both apps start to behave strangely. At first they lose sound, and later they become slow and unresponsive with an inevitable crash at some point.
I’ve tried my apps many times and the behavior occurs every time both are running at the same time. If I make sure that only one app is running at a time (closing the one running in the background first) then everything runs smoothly.
I’m suspecting it may have something to do with OpenAL sound. I’m in the middle of writing an app that will demo this behavior. Once I’m finished I’ll submit a bug-report and update this post with the case number.
I’ve tried running the apps on iOS 5.0.1 and 5.1 beta2 with the same results.
Corona Build 2011.706
Here is an excerpt for one of the crash logs:
[code]
Incident Identifier: AEFEC0FD-554E-46B5-9D35-13D20FEF502F
CrashReporter Key: e70d7ef50e4abcd0d543ca31d50d94c6a54dd80d
Hardware Model: iPad2,2
Process: BigFatGoalie [18464]
Path: /var/mobile/Applications/434805FD-B002-4A3B-A784-7A9155081E4C/BigFatGoalie-1.3-debug-2011.706.app/BigFatGoalie
Identifier: BigFatGoalie
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2011-12-20 20:29:13.877 +0900
OS Version: iPhone OS 5.0.1 (9A405)
Report Version: 104
Exception Type: 00000020
Exception Codes: 0x8badf00d
Highlighted Thread: 0
Application Specific Information:
com.swipeware.bigfatgoalie failed to resume in time
Elapsed total CPU time (seconds): 10.510 (user 10.510, system 0.000), 52% CPU
Elapsed application CPU time (seconds): 10.003, 50% CPU
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0:
0 libsystem_c.dylib 0x329c05b6 szone_malloc_should_clear + 150
1 libsystem_c.dylib 0x329c04e8 malloc_zone_malloc + 60
2 libsystem_c.dylib 0x329c41ac malloc + 40
3 libstdc++.6.dylib 0x3505daea operator new(unsigned long) + 162
4 OpenAL 0x36f8432a OALSource::RemoveBuffersFromQueue(unsigned long, unsigned int*) + 354
5 OpenAL 0x36f7d66e alSourceUnqueueBuffers + 126
6 BigFatGoalie 0x000306ba 0x1000 + 194234
7 BigFatGoalie 0x0002c6ce 0x1000 + 177870
8 BigFatGoalie 0x0002d9ce 0x1000 + 182734
9 BigFatGoalie 0x00073980 0x1000 + 469376
10 BigFatGoalie 0x0006974c 0x1000 + 427852
11 BigFatGoalie 0x0004ac22 0x1000 + 302114
12 BigFatGoalie 0x00057ae8 0x1000 + 355048
13 BigFatGoalie 0x0004ad44 0x1000 + 302404
14 BigFatGoalie 0x000448b2 0x1000 + 276658
15 BigFatGoalie 0x0004a574 0x1000 + 300404
16 BigFatGoalie 0x0004af5e 0x1000 + 302942
17 BigFatGoalie 0x0004488c 0x1000 + 276620
18 BigFatGoalie 0x000658c6 0x1000 + 411846
19 BigFatGoalie 0x0005fa5e 0x1000 + 387678
20 BigFatGoalie 0x000625da 0x1000 + 398810
21 BigFatGoalie 0x000625c0 0x1000 + 398784
22 BigFatGoalie 0x000625c0 0x1000 + 398784
23 BigFatGoalie 0x000625c0 0x1000 + 398784
24 BigFatGoalie 0x00062516 0x1000 + 398614
25 BigFatGoalie 0x00062760 0x1000 + 399200
26 BigFatGoalie 0x0006286a 0x1000 + 399466
27 BigFatGoalie 0x00075efe 0x1000 + 478974
28 BigFatGoalie 0x00012eb4 0x1000 + 73396
29 BigFatGoalie 0x00013150 0x1000 + 74064
30 BigFatGoalie 0x0001367c 0x1000 + 75388
31 CoreFoundation 0x33d8442e -[NSObject performSelector:withObject:withObject:] + 46
32 UIKit 0x32438738 forwardTouchMethod + 228
33 CoreFoundation 0x33d8442e -[NSObject performSelector:withObject:withObject:] + 46
34 UIKit 0x32438738 forwardTouchMethod + 228
35 UIKit 0x32334508 -[UIWindow _sendTouchesForEvent:] + 312
36 UIKit 0x32333efa -[UIWindow sendEvent:] + 374
37 UIKit 0x3231a4e6 -[UIApplication sendEvent:] + 350
38 UIKit 0x32319d26 _UIApplicationHandleEvent + 5802
39 GraphicsServices 0x3066cdec PurpleEventCallback + 876
40 CoreFoundation 0x33dfe54c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 32
41 CoreFoundation 0x33dfe4ee __CFRunLoopDoSource1 + 134
42 CoreFoundation 0x33dfd33c __CFRunLoopRun + 1364
43 CoreFoundation 0x33d804d6 CFRunLoopRunSpecific + 294
44 CoreFoundation 0x33d8039e CFRunLoopRunInMode + 98
45 GraphicsServices 0x3066bfc6 GSEventRunModal + 150
46 UIKit 0x3234873c UIApplicationMain + 1084
47 BigFatGoalie 0x000033f8 0x1000 + 9208
48 BigFatGoalie 0x000033b0 0x1000 + 9136
Thread 1 name: Dispatch queue: com.apple.libdispatch-manager
Thread 1:
0 libsystem_kernel.dylib 0x368913b4 kevent + 24
1 libdispatch.dylib 0x32e27f74 _dispatch_mgr_invoke + 708
2 libdispatch.dylib 0x32e27c92 _dispatch_mgr_thread + 30
Thread 2 name: WebThread
Thread 2:
0 libsystem_kernel.dylib 0x36891010 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x36891206 mach_msg + 50
2 CoreFoundation 0x33dfe41c __CFRunLoopServiceMachPort + 120
3 CoreFoundation 0x33dfd154 __CFRunLoopRun + 876
4 CoreFoundation 0x33d804d6 CFRunLoopRunSpecific + 294
5 CoreFoundation 0x33d8039e CFRunLoopRunInMode + 98
6 WebCore 0x332b1128 _ZL12RunWebThreadPv + 396
7 libsystem_c.dylib 0x329ccc16 _pthread_start + 314
8 libsystem_c.dylib 0x329ccad0 thread_start + 0
Thread 3 name: com.apple.NSURLConnectionLoader
Thread 3:
0 libsystem_kernel.dylib 0x36891010 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x36891206 mach_msg + 50
2 CoreFoundation 0x33dfe41c __CFRunLoopServiceMachPort + 120
3 CoreFoundation 0x33dfd154 __CFRunLoopRun + 876
4 CoreFoundation 0x33d804d6 CFRunLoopRunSpecific + 294
5 CoreFoundation 0x33d8039e CFRunLoopRunInMode + 98
6 Foundation 0x327fbbc2 +[NSURLConnection(Loader) _resourceLoadLoop:] + 302
7 Foundation 0x327fba8a -[NSThread main] + 66
8 Foundation 0x3288f59a __NSThread__main__ + 1042
9 libsystem_c.dylib 0x329ccc16 _pthread_start + 314
10 libsystem_c.dylib 0x329ccad0 thread_start + 0
Thread 4 name: com.apple.CFSocket.private
Thread 4:
0 libsystem_kernel.dylib 0x368a1570 __select + 20
1 CoreFoundation 0x33e0266a __CFSocketManager + 726
2 libsystem_c.dylib 0x329ccc16 _pthread_start + 314
3 libsystem_c.dylib 0x329ccad0 thread_start + 0
Thread 5:
0 libsystem_kernel.dylib 0x368a10d8 __psynch_mutexwait + 24
1 libsystem_c.dylib 0x329bfc44 pthread_mutex_lock + 376
2 BigFatGoalie 0x0003110c 0x1000 + 196876
3 BigFatGoalie 0x0002b708 0x1000 + 173832
4 BigFatGoalie 0x000311b6 0x1000 + 197046
5 libsystem_c.dylib 0x329ccc16 _pthread_start + 314
6 libsystem_c.dylib 0x329ccad0 thread_start + 0
Unknown thread crashed with unknown flavor: 5, state_count: 1
[/code] [import]uid: 70847 topic_id: 19399 reply_id: 319399[/import]