- Home /
Crash at first launch with OpenFeint
When I launch game first time after build and install it crashes. It happens when I'm trying to play sound. The reason is that at first launch OpenFeint shows it's window with offer to login. All the next launches are OK (and without OpenFeint window at launch). That's how it looks in console: after this string: "-> applicationDidBecomeActive()" OpenFeint appears at first time. And after it's closed appears this: "Error initializing AudioSession(errNO:1768843636)"
All the next launches string "Error initializing AudioSession(errNO:1768843636)" is not present and everithing is OK. One more detail. Crash happens when I'm trying to play looped sound. If sound is not looped everithing is OK again.
Looks strange :) What could it be? How it can be solved?
UPD: May be there is way to reinitialize AudioSession manually? And one more. It begins when I moved project prom iOS Basic license to iOS Pro.
http://www.openfeint.com/ It was GameCenter before GameCenter.
Answer by Santa · Jan 26, 2011 at 01:06 AM
The solution is easy but took time as it happens :)
In "Editor\OpenFeint\XCode\Appcontroller+OpenFeint.mm" You must remove "UnitySetAudioSessionActive()" in functions "dashboardDidDisappear()" and "dashboardWillDisappear()".
And everything becomes OK. Don't understand why it is there at all when UnityPause() is there?
UPDATED: You must remove "UnitySetAudioSessionActive()" ONLY in functions "dashboardWillAppear()" and "dashboardDidDisappear()" (or sound will stop playing after disabling device through the hold button on older models (iPhone 2G for example)).
UPD 2: After release have happened several crashes on user devices. It was OF 2.7.5. Now it is 2.10 and it's still not working. Don't use it with Unity yet at all.
FYI, in my case, commenting out those lines solved a crash I was getting with OpenFeint 2.7.5, running my game on an iPhone 2G (3.1.3). Crash ocurred when dismissing the OpenFeint dashboard.
This problem has been reported with later versions of OpenFeint as well. For me, it started when I tried to update my previously stable working project to Unity 3.2+ and iOS SD$$anonymous$$ 4.2.
Answer by Qamar · Apr 21, 2011 at 02:16 PM
this problem is happening with me,
in my case i am not playing any sound and my application is crashing while loading. I am not even able to see first screen.
Your answer
Follow this Question
Related Questions
[URGENT] OpenFeint integration problems 0 Answers
iPhone Unity Simulator Crashes 1 Answer
Lost sound on iphone after alarm clock goes off 0 Answers
Iphone sound behaving strange 0 Answers