I've some crashes in my application in AudioToolbox (AURemoteIO::IOThread), I don't know how to reproduce this crashes, but I have logs from Fabric. Maybe someone is faced with this issue, please help.
Thread : Crashed: AURemoteIO::IOThread
0 AudioToolbox 0x2a5bd1c0 CrashIfClientProvidedBogusAudioBufferList + 119
1 AudioToolbox 0x2a5bd045 AudioConverterConvertComplexBuffer + 268
2 AudioToolbox 0x2a5bd045 AudioConverterConvertComplexBuffer + 268
3 AudioToolbox 0x2a6139cd AUSpatialMixer::Render(unsigned long&, AudioTimeStamp const&, unsigned long) + 1212
4 AudioToolbox 0x2a5bf6b9 AUBase::DoRenderBus(unsigned long&, AudioTimeStamp const&, unsigned long, AUOutputElement*, unsigned long, AudioBufferList&) + 144
5 AudioToolbox 0x2a5bf54d AUBase::DoRender(unsigned long&, AudioTimeStamp const&, unsigned long, unsigned long, AudioBufferList&) + 724
6 AudioToolbox 0x2a5bf26f AUMethodRender(void*, unsigned long*, AudioTimeStamp const*, unsigned long, unsigned long, AudioBufferList*) + 46
7 AudioToolbox 0x2a690303 AUConverterBase::RenderBus(unsigned long&, AudioTimeStamp const&, unsigned long, unsigned long) + 394
8 AudioToolbox 0x2a5bf6b9 AUBase::DoRenderBus(unsigned long&, AudioTimeStamp const&, unsigned long, AUOutputElement*, unsigned long, AudioBufferList&) + 144
9 AudioToolbox 0x2a5bf54d AUBase::DoRender(unsigned long&, AudioTimeStamp const&, unsigned long, unsigned long, AudioBufferList&) + 724
10 AudioToolbox 0x2a685485 AURemoteIO::PerformIO(unsigned long, unsigned int, unsigned int, AudioTimeStamp const&, AudioTimeStamp const&, AudioBufferList const*, AudioBufferList*, int&) + 492
11 AudioToolbox 0x2a68653b AURIOCallbackReceiver_PerformIO + 394
12 AudioToolbox 0x2a67e7b3 _XPerformIO + 166
13 AudioToolbox 0x2a5dd90b mshMIGPerform + 190
14 AudioToolbox 0x2a657735 MSHMIGDispatchMessage + 32
15 AudioToolbox 0x2a685791 AURemoteIO::IOThread::Run() + 120
16 AudioToolbox 0x2a688e3d AURemoteIO::IOThread::Entry(void*) + 8
17 AudioToolbox 0x2a5bb6c5 CAPThread::Entry(CAPThread*) + 208
18 libsystem_pthread.dylib 0x39dbcddf _pthread_body + 138
19 libsystem_pthread.dylib 0x39dbcd53 _pthread_start + 118
I have also frequent crashes in AudioToolbox since iOS 9.
I did open bug reports, but got no solutions, so I asked for developer help.
Apple wrote me on 06-Nov-2015:
"I have checked with engineering. The issue is still under investigation, and there is no resolution available yet."
So I am waiting for a solution or workaround to eliminate the crashes.
My bug report was closed because it was a duplicate, which shows that others have similar problems.
Related
I’m getting the following crash when using AVAudioSession with AVAudioEngine. What I don’t understand is why InterruptionListener is listed twice in the stack trace. Does this mean it’s somehow being called again before it has returned? Is this likely to be a concurrency issue?
Crashed: AVAudioSession Notify Thread
0 libEmbeddedSystemAUs.dylib 0x1dbc3333c InterruptionListener(void*, unsigned int, unsigned int, void const*)
1 libEmbeddedSystemAUs.dylib 0x1dbc33270 InterruptionListener(void*, unsigned int, unsigned int, void const*)
2 AudioToolbox 0x1c86e6484 AudioSessionPropertyListeners::CallPropertyListeners(unsigned int, unsigned int, void const*) + 596
3 AudioToolbox 0x1c8740798 HandleAudioSessionCFTypePropertyChangedMessage(unsigned int, unsigned int, void*, unsigned int) + 1144
4 AudioToolbox 0x1c873fec0 ProcessDeferredMessage(unsigned int, __CFData const*, unsigned int, unsigned int) + 2452
5 AudioToolbox 0x1c873f17c ASCallbackReceiver_AudioSessionPingMessage + 632
6 AudioToolbox 0x1c87ad398 _XAudioSessionPingMessage + 44
7 libAudioToolboxUtility.dylib 0x1c8840430 mshMIGPerform + 264
8 CoreFoundation 0x1bd42b174 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 56
9 CoreFoundation 0x1bd42a880 __CFRunLoopDoSource1 + 444
10 CoreFoundation 0x1bd425634 __CFRunLoopRun + 1888
11 CoreFoundation 0x1bd424ba8 CFRunLoopRunSpecific + 424
12 AVFAudio 0x1ca1f4a2c GenericRunLoopThread::Entry(void*) + 156
13 AVFAudio 0x1ca2457a0 CAPThread::Entry(CAPThread*) + 204
14 libsystem_pthread.dylib 0x1bd1c2d98 _pthread_start + 156
15 libsystem_pthread.dylib 0x1bd1c674c thread_start + 8
Application crashed iOS 11 in CoreText Framework for Hindi Language text
Crashed: com.apple.main-thread
0 CoreText 0x185d393a8 TRunGlue::SeparateCharactersInGlyphRange(CFRange) + 68
1 CoreText 0x185d393a8 TRunGlue::SeparateCharactersInGlyphRange(CFRange) + 68
2 CoreText 0x185d394dc TRunGlue::RotateRight(CFRange, long) + 144
3 CoreText 0x185d9ccf0 OpenTypeShapingEngine::ApplyScriptShaping(unsigned int*) + 308
4 CoreText 0x185d3c654 void TOpenTypeMorph::ApplyShapingEngine<TInlineVector<unsigned int, 30ul> >(OTL::GSUB&, OTL::GlyphLookups&, unsigned int*, CFRange, TInlineVector<unsigned int, 30ul>&, SyncState&, bool*) + 2472
5 CoreText 0x185d3b87c TOpenTypeMorph::ShapeGlyphs(SyncState&, bool*) + 340
6 CoreText 0x185cd8d14 TShapingEngine::ShapeGlyphs(TLine&, TCharStream const&) + 240
7 CoreText 0x185cdd514 TTypesetter::FinishEncoding(std::__1::tuple<TLine const*, TCharStream const*, void const* (*)(__CTRun const*, __CFString const*, void*), void*, std::__1::shared_ptr<TBidiLevelsProvider>*, unsigned int, unsigned char> const&, TLine&, signed char) + 256
8 CoreText 0x185ca833c TTypesetterAttrString::Initialize(__CFAttributedString const*) + 668
9 CoreText 0x185ca7f74 TTypesetterAttrString::TTypesetterAttrString(__CFAttributedString const*) + 112
10 CoreText 0x185ca7e58 CTLineCreateWithAttributedString + 52
11 UIFoundation 0x18ca5e710 -[NSCoreTypesetter _NSStringDrawingCoreTextEngineWithOriginalString:rect:padding:context:forceClipping:usesWebKitCompatibleMetrics:attributes:options:drawingContext:wantsTextLineFragments:validatedAttributedString:firstNonRenderedCharacterIndex:foundSoftHyphenAtEOL:enginePathUsed:] + 840
I was using UIWebview before, and replace WKWbview on this version. Then I received a lot of error reports like this:
1 WebKit 0x18acddfe0 IPC::Connection::markCurrentlyDispatchedMessageAsInvalid() + 4
2 WebKit 0x18ad646e8 WebKit::NetworkProcessProxy::didReceiveAuthenticationChallenge(unsigned long long, unsigned long long, WebCore::AuthenticationChallenge const&, unsigned long long) + 108
3 WebKit 0x18ad668b0 voidIPC::handleMessage<Messages::NetworkProcessProxy::DidReceiveAuthenticationChallenge, WebKit::NetworkProcessProxy, void (WebKit::NetworkProcessProxy::*)(unsigned long long, unsigned long long, WebCore::AuthenticationChallenge const&, unsigned long long)>(IPC::Decoder&, WebKit::NetworkProcessProxy*, void (WebKit::NetworkProcessProxy::*)(unsigned long long, unsigned long long, WebCore::AuthenticationChallenge const&, unsigned long long)) + 108
4 WebKit 0x18acdd65c IPC::Connection::dispatchMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >) + 164
5 WebKit 0x18acdfe54 IPC::Connection::dispatchOneMessage() + 232
6 JavaScriptCore 0x185ebff44WTF::RunLoop::performWork() + 172
7 JavaScriptCore 0x185ec021cWTF::RunLoop::performWork(void*) + 36
8 CoreFoundation 0x1815f542c___CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
9 CoreFoundation 0x1815f4d9c___CFRunLoopDoSources0 + 540
10 CoreFoundation 0x1815f29a8___CFRunLoopRun + 744
11 CoreFoundation 0x181522da4_CFRunLoopRunSpecific + 424
12 GraphicsServices 0x182f8d074_GSEventRunModal + 100
13 UIKit 0x1877ddc9c_UIApplicationMain + 208
14 iTouzi 0x1001792b8_main (main.m:17)
15 libdyld.dylib0x18053159c_start + 4
Now I don't know how to analyze this crash, does anyone know how to fix this crash?
I'm receiving crash logs for a bug that I cannot reproduce. The crash only happens on 32bit devices (iPad 4, 3, iPad Mini) so I believe that is a major part of the issue.
The crash occurs on the audio thread, while calculating coefficients for a filter. The filter is composed of a C struct and related functions... once I had an issue with needing to align structs correctly for 32-bit devices, but I'm not sure that's the case here (and I'm not sure how I would test that!)
Beyond that, I'm stumped. Here are the first couple lines of the function in which it crashes. The cos function is the second to last frame of the crash log.
void _calculateWithoutUpdatingSetup(ONCBiquadFilter * filter) {
if (filter->res < 0.01) filter->res = 0.01;
filter->omega = 2 * M_PI * filter->freq / sampleRate;
filter->omegaS = sin(filter->omega);
filter->omegaC = cos(filter->omega);
filter->alpha = filter->omegaS / (2 * filter->res);
///... do a bunch of maths to calculate filter settings
}
And here's the crash log :
18
Crashed: AURemoteIO::IOThread
EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000000000000
Crashed: AURemoteIO::IOThread
0 myFramework 0x41077a _calculateWithoutUpdatingSetup + 2417
1 libsystem_m.dylib 0x20b229d8 cos + 584
2 myFramework 0x40fa2f ONCBiquadFilterCalculateCoefficients + 14
3 myFramework 0x40fd03 ONCBiquadFilterSetFrequencyAndResonance + 214
4 myFramework 0x414c7b ONCAterotVoiceSetFilterCutoffAndResonance + 206
5 myFramework 0x407677 ONCAterotPolyVoicePlay + 452
6 myFramework 0x3e0d61 ONCAterotLoopStructTick + 1092
7 myApp 0x21333 DSPRenderCallback (ONCAterotAudioController+AudioRenderCallbacks.m:367)
8 myApp 0x20b0f renderCallback (ONCAterotAudioController+AudioRenderCallbacks.m:73)
9 AudioToolbox 0x233224b3 AUInputElement::PullInput(unsigned long&, AudioTimeStamp const&, unsigned long, unsigned long) + 126
10 AudioToolbox 0x234379ab AUMatrixMixer::Render(unsigned long&, AudioTimeStamp const&, unsigned long) + 554
11 AudioToolbox 0x234385a5 AUMatrixMixer::RenderBus(unsigned long&, AudioTimeStamp const&, unsigned long, unsigned long) + 104
12 AudioToolbox 0x23227d01 AUBase::DoRenderBus(unsigned long&, AudioTimeStamp const&, unsigned long, AUOutputElement*, unsigned long, AudioBufferList&) + 148
13 AudioToolbox 0x23227b91 AUBase::DoRender(unsigned long&, AudioTimeStamp const&, unsigned long, unsigned long, AudioBufferList&) + 740
14 AudioToolbox 0x232278a3 AUMethodRender(void*, unsigned long*, AudioTimeStamp const*, unsigned long, unsigned long, AudioBufferList*) + 46
15 myApp 0x65d29 eqCallBack (ONCAterotAudioController+effectCallbacks.m:110)
16 AudioToolbox 0x233224b3 AUInputElement::PullInput(unsigned long&, AudioTimeStamp const&, unsigned long, unsigned long) + 126
17 AudioToolbox 0x233f21b1 AUDynamicsProcessor::Render(unsigned long&, AudioTimeStamp const&, unsigned long) + 308
18 AudioToolbox 0x23227d01 AUBase::DoRenderBus(unsigned long&, AudioTimeStamp const&, unsigned long, AUOutputElement*, unsigned long, AudioBufferList&) + 148
19 AudioToolbox 0x23227b91 AUBase::DoRender(unsigned long&, AudioTimeStamp const&, unsigned long, unsigned long, AudioBufferList&) + 740
20 AudioToolbox 0x232278a3 AUMethodRender(void*, unsigned long*, AudioTimeStamp const*, unsigned long, unsigned long, AudioBufferList*) + 46
21 AudioToolbox 0x23318d89 AUConverterBase::RenderBus(unsigned long&, AudioTimeStamp const&, unsigned long, unsigned long) + 396
22 AudioToolbox 0x23227d01 AUBase::DoRenderBus(unsigned long&, AudioTimeStamp const&, unsigned long, AUOutputElement*, unsigned long, AudioBufferList&) + 148
23 AudioToolbox 0x23227b91 AUBase::DoRender(unsigned long&, AudioTimeStamp const&, unsigned long, unsigned long, AudioBufferList&) + 740
24 AudioToolbox 0x2330864b AURemoteIO::PerformIO(unsigned long, unsigned int, unsigned int, AudioTimeStamp const&, AudioTimeStamp const&, AudioBufferList const*, AudioBufferList*, int&) + 506
25 AudioToolbox 0x23309851 AURIOCallbackReceiver_PerformIO + 596
26 AudioToolbox 0x232ff67b _XPerformIO + 166
27 AudioToolbox 0x23245d69 mshMIGPerform + 184
28 AudioToolbox 0x232d6533 MSHMIGDispatchMessage + 34
29 AudioToolbox 0x23308973 AURemoteIO::IOThread::Run() + 118
30 AudioToolbox 0x2330c331 AURemoteIO::IOThread::Entry(void*) + 8
31 AudioToolbox 0x232238db CAPThread::Entry(CAPThread*) + 186
32 libsystem_pthread.dylib 0x20bbcc7f _pthread_body + 138
33 libsystem_pthread.dylib 0x20bbcbf3 _pthread_start + 110
34 libsystem_pthread.dylib 0x20bbaa08 thread_start + 8
Thanks for any guidance in solving this!
Update : I did notice a couple of mistakes on my part -- freq, res, and sampleRate are all floats, while the rest of the values are doubles. I could see this maybe being part of the issue, though I sort of doubt it as they should just be getting promoted into doubles.
I have this crasher which happens a lot in our production app but we are not able to reproduce it. It happened only on iOS8 using iOS8 SDK.
HTTPReadFilter::doPlainRead(StreamReader*, unsigned char*, long, CFStreamError*, unsigned char*) inside CFNetwork. Crashed: com.apple.NSURLConnectionLoader EXC_BAD_ACCESS KERN_INVALID_ADDRESS at 0x00000000
StackTrace:
libsystem_platform.dylib
_platform_memmove + 185
CFNetwork
HTTPReadFilter::doPlainRead(StreamReader*, unsigned char*, long, CFStreamError*, unsigned char*) + 178
CFNetwork
HTTPReadFilter::_streamImpl_Read(unsigned char*, long, CFStreamError*, unsigned char*) + 394
CFNetwork
CoreStreamBase::_streamInterface_Read(unsigned char*, long) + 98
CFNetwork
HTTPNetStreamInfo::_streamImpl_Read(__CFReadStream*, unsigned char*, long, CFStreamError*, unsigned char*) + 306
CFNetwork
CFNetworkReadStream::httpStreamRead(__CFReadStream*, unsigned char*, long, CFStreamError*, unsigned char*, void*) + 44
CoreFoundation
CFReadStreamRead + 328
CFNetwork
HTTPNetStreamInfo::_readStreamClientCallBack(__CFReadStream*, unsigned long) + 128
CFNetwork
CFNetworkReadStream::_readStreamClientCallBackCallBack(__CFReadStream*, unsigned long, void*) + 38
CoreFoundation
_signalEventSync + 146
CoreFoundation
_cfstream_shared_signalEventSync + 342
CoreFoundation
__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 14
CoreFoundation
CFRunLoopRunInMode + 106
CFNetwork
+[NSURLConnection(Loader) _resourceLoadLoop:] + 486
Foundation
__NSThread__main__ + 1118
libsystem_pthread.dylib
_pthread_start + 118
Any help is greatly appreciated!!
That seems to be really an iOS 8 bug. Try to not set a custom size for your NSURLCache. Check this https://devforums.apple.com/message/1102182#1102182