在 iOS 9 模拟器中运行我的应用程序时,我在 Xcode 7 build 6 调试控制台中看到以下错误:
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
有没有其他人看过这个?知道这意味着什么吗?
在 iOS 9 模拟器中运行我的应用程序时,我在 Xcode 7 build 6 调试控制台中看到以下错误:
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
有没有其他人看过这个?知道这意味着什么吗?
您可以为此发布更多代码吗?
我有同样的错误,结果证明我很愚蠢。我已经
var player = AVAudioPlayer()
在 viewDidLoad 之外声明了。
我当时正在尝试let player = try AVAudioPlayer....
let
因为我已经声明了变量,所以我摆脱了.. 天知道我在想什么,把 let 放在那里!现在一切似乎都很好:)
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.
这对我有用
变声:系统声音ID = 0
函数声音(){
let rightSound = NSURL(fileURLWithPath: NSBundle.mainBundle().pathForResource("sound", ofType: "wav")!)
AudioServicesCreateSystemSoundID(rightSound, &sound)
AudioServicesPlaySystemSound(self.sound);
}