Forums: 

There is a crash bug in the iOS SDK.

iPhone 5s, iOS 7.1.2

Thread : Crashed: com.apple.main-thread
0  iQNECT                         0x0031cc36 _mids_identify_launch + 1371525
1  iQNECT                         0x0031bf17 gnsdk_musicidstream_channel_identify + 1368166
2  iQNECT                         0x00163391 gracenote::musicid_stream::GnMusicIdStream::IdentifyAlbumAsync() (gnsdk_musicidstream.cpp:504)
3  iQNECT                         0x001afbaf -[GnMusicIdStream identifyAlbumAsync:] + 23342
4  iQNECT                         0x00104293 -[IQGracenoteController identifyAlbum] (IQGracenoteController.m:116)
5  iQNECT                         0x000d4e2d -[IQMusicMainViewController primaryButtonTapped:] (IQMusicMainViewController.m:70)
6  UIKit                          0x313596a7 -[UIApplication sendAction:to:from:forEvent:] + 90
7  UIKit                          0x31359643 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 38
8  UIKit                          0x31359613 -[UIControl sendAction:to:forEvent:] + 46
9  UIKit                          0x31344d5b -[UIControl _sendActionsForEvents:withEvent:] + 374
10 UIKit                          0x3135905b -[UIControl touchesEnded:withEvent:] + 594
11 UIKit                          0x31358d2d -[UIWindow _sendTouchesForEvent:] + 528
12 UIKit                          0x31353c87 -[UIWindow sendEvent:] + 758
13 UIKit                          0x31328e55 -[UIApplication sendEvent:] + 196
14 UIKit                          0x31327521 _UIApplicationHandleEventQueue + 7120
15 CoreFoundation                 0x2eabdfaf __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 14
16 CoreFoundation                 0x2eabd477 __CFRunLoopDoSources0 + 206
17 CoreFoundation                 0x2eabbc67 __CFRunLoopRun + 630
18 CoreFoundation                 0x2ea26729 CFRunLoopRunSpecific + 524
19 CoreFoundation                 0x2ea2650b CFRunLoopRunInMode + 106
20 GraphicsServices               0x339856d3 GSEventRunModal + 138
21 UIKit                          0x31387871 UIApplicationMain + 1136
22 iQNECT                         0x0010cf93 main (main.m:16)

Thank you for sending the crash report. Could you please also provide a snippet of the code you were running when the crash occurred? Are you using the Sample App, or your own app? Thanks!

- (void)identifyAlbum

{

    if(self.gnMusicIDStream) {

        NSError *error = nil;

        [self.gnMusicIDStream identifyAlbumAsync:&error];        

        if (error) {

            NSLog(@"Identify Error = %@", [error localizedDescription]);

        }

    }

}

 

I have adopted this from the sample app. I can provide the entire class if required.

From the stack trace and exception type, it appears to be a null pointer exception in gnsdk_musicidstream.cpp on line 504.

 

i also received this crash in my app - the sample app worked just fine.  i attempted to wrap the relevant code from the sample app in a delegate class, but i'm guessing i missed a step.

if(self.gnMusicIDStream) {

        [self.results removeAllObjects];

        NSError *error = nil;

        [self.cancellableObjects addObject: self.gnMusicIDStream];

        [self.gnMusicIDStream identifyAlbumAsync:&error];        // crashes here

        if (error) {

            NSLog(@"Identify Error = %@", [error localizedDescription]);

            self.queryBeginTimeInterval = -1;

        }

        else

        {

            self.queryBeginTimeInterval = [[NSDate date] timeIntervalSince1970];

        }

    }

i was able to determine what was causing the crash.  my app has playback functionality.  even though nothing was playing, the category was set to playback and that resulted in the error.  when i completely disabled all avsession playback category calls, i was able to tag a song.  however, i need to be able to go between both states.

now, i've set the category to Record prior to initializing the sdk, setting up the music stream, etc.

however, when the code reaches:

[self.gnMusicIDStream audioProcessStartWithAudioSource:(id <GnAudioSourceDelegate>)self.gnMic error:&musicIDStreamError];

in the setupMusicIDStream function, i see an endless stream of error messages:

Error: 0xffffffceError: 0xffffffceError: 0xffffffceError: 0xffffffceError: 0xffffffceError: 0xffffffceError: 0xffffffceError: 0xffffffceError: 0xffffffceError: 0xffffffceError: 0xffffffceError: 0xffffffceError: 0xffffffceError: 0xffffffceError: 0xffffffceError: 0xffffffceError: 0xffffffceError: 0xffffffceError: 0xffffffceError: 0xffffffceError: 0xffffffceError: 0xffffffceError: 0xffffffceError: 0xffffffceError: 0xffffffceError: 0xffffffceError: 0xffffffceError: 0xffffffceError: 0xffffffceError: 0xffffffceError: 

Is there any update on this? It seems related to this question on StackOverflow which has not been answered: http://stackoverflow.com/questions/26464924/deadlock-while-trying-to-cal...

Referring to the sample project in gn-mobile-ios-1.1.0.2619, GnViewController.m, method setupMusicIDStream, the following code exists:

dispatch_async(self.internalQueue, ^

{

self.gnAudioVisualizeAdapter = [[GnAudioVisualizeAdapter alloc] initWithAudioSource:self.gnMic audioVisualizerDelegate:self];

[self.gnMusicIDStream audioProcessStartWithAudioSource:(id <GnAudioSourceDelegate>)self.gnAudioVisualizeAdapter error:&musicIDStreamError];

if (musicIDStreamError)

{

dispatch_async(dispatch_get_main_queue(), ^

{

NSLog(@"Error while starting Audio Process With AudioSource - %@", [musicIDStreamError localizedDescription]);

});

}

});

The line that calls audioProcessStartWithAudioSource:: blocks. This can be tested by placing a log statement or a breakpoint after the call. This means that the check for an error will never be called.

Please advise what to do here, as my app needs a callback when the audio stream has completed setup.

Hi,
We recently released a new version of iOS SDK - GNSDK for Mobile, version 1.1.2.2866.
Please use this latest version and do let us know if the error still remains.
Thank you.

Forum Discussions