Xcode 7 debug output: "ERROR:177: timed out...mMajorChangePending=0"
Asked Answered
C

3

23

I am seeing the following error in Xcode 7 build 6 debug console when running my app in the iOS 9 simulator:

2015-08-27 11:31:25.464 Reps[87841:2572333] 11:31:25.463 ERROR:    177: timed out after 0.012s (589 590); mMajorChangePending=0

Has anyone else seen this? Any idea what it means?

Chessman answered 27/8, 2015 at 17:40 Comment(1)
I got it on OS X while playing audio, thinking it might is related to AVAudioPlayer. Xcode 7.1 beta (7B60).Mainstay
S
6

Could you post more code for this?

I had the same error and it turned out I was being stupid. I already declared var player = AVAudioPlayer() outside of viewDidLoad.

I was then trying let player = try AVAudioPlayer....

I got rid of the let as I had already declared the variable.. God knows what I was thinking putting let there! All seems to work fine now :)

Sailesh answered 28/9, 2015 at 16:41 Comment(2)
I am not sure what code to post! However, per Henrik's comment above and your answer, it seems like the problem is AVAudioPlayer, as I am using that in my code. In theory having several instances going at the same time should not be a problem, but I will have to do some experimenting.Chessman
I don't have "let" keyword and I am using four instances of AVAudioPlayer(), however the console message only appears something. I am not sure what might be the issue.Guesswork
H
0

I just encountered a similar problem with a different Error number while revising an old app. It was written in Objective C under iOS 4 and synthesises audio without using XIB or storyboards and it has successfully made the transition to AVFoundation under iOS9. Putting some final touches in place, I ran into this weird problem though it had a different error number. I found several reports of Error 177 and Error 181, mostly by Swift developers.

I got this report when I tapped a button to stop audio playback.

2016-06-15 14:50:16.370 SatGam[2598:148012] tapped Button 17
2016-06-15 14:50:16.384 SatGam[2598:148012] 14:50:16.383 ERROR:    181: timed out after 0.012s (1908 1909); mMajorChangePending=0
2016-06-15 14:50:16.387 SatGam[2598:148012] launch with full gradient background
2016-06-15 14:50:16.387 SatGam[2598:148012] load FamilyView

Button 17 is meant to turn off audio before switching to another ViewController which it did successfully before it went into debug. The following commented case statement describes what it was doing at the time

    case 17:                    // stop button
        [synthLock lock];       // lock synthLock
        [synth stopAllNotes];   // change synth i.e. mute sound
        [synthLock unlock];     // unlock synthLock
        [timer invalidate];     // kill the timer
        timer = nil;            // and then
        [timer release];        // release it

        // [lastEventChangeTime release];   // this was switched off

        [player release];       // release old view controller
        [synth release];        // release synth
        [synthLock release];    // release synth lock

        [self goToFamilyView];  // go to new view controller
        break;

I hadn’t released lastEventChangeTime, a property associated with a timer used for audio playback. So I removed comments from the start of that line, re-ran my project on the simulator, hit button 17 and the problem vanished.

Based on what you've told us, the problem you describe is likely to be related to something wrong when audio play back starts or stops. Post some code with a few comments that indicate what you’ve tried and I'm sure someone with more experience in Swift will be able to help. Best of luck.

Halflight answered 15/6, 2016 at 6:48 Comment(1)
Thanks for the research and information. If I can find any more clues, I will post them.Chessman
F
-1

This works for me

var sound :SystemSoundID = 0

func Sound() {

    let rightSound = NSURL(fileURLWithPath: NSBundle.mainBundle().pathForResource("sound", ofType: "wav")!)

    AudioServicesCreateSystemSoundID(rightSound, &sound)

    AudioServicesPlaySystemSound(self.sound);


}
Flo answered 24/6, 2016 at 16:23 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.