Play-games-plugin-for-unity: Unfortunately, your game has stopped.

Created on 10 Dec 2016  路  35Comments  路  Source: playgameservices/play-games-plugin-for-unity

Hello!
Google play games services works fine for me, achievements work etc.
Whenever I exit my game, after ~3 seconds, I get the error that my game crashes. This only happens with the google services implemented.
Using Unity 5.5.0p1 and latest google services version

bug

Most helpful comment

Same problem here...

All 35 comments

Same problem here...

This really is an urgent issue, please help

Do you happen to have a log? A stack trace grabbed from logcat or the android debugger would help figure out whats throwing the error.

@teemukorh could you please provide a logcat? I accidentally disabled it on my phone.

I have the same problem. But it's hard to get a log, because if I export my game in Dev Mode, the game is running fine. If I disable Dev Mode, it's crashing after a few seconds.

Since that error sounds like its from the OS itself, even without dev mode on the catlog might still be useful. At least you can see where the error is getting thrown.

Additionally have you tried clearing the cache for the app, and fully uninstalling it? There could be some issue with some data corruption or old data being left between builds.

ok, I'm out. I found my problem, it was not the google play games plugin. The problem came from a particle effect.

Here is the log from my device. Seems to crash in native code.
logcat.txt

I'm also using Unity 5.5.0p1, which seems to be quite unstable release.

This is the log from my device after calling Application.Quit(). (Unity 5.5.0p1, #1500)

D/dalvikvm: Unregistering JNI method Lorg/fmod/FMODAudioDevice;.fmodProcess:IL
D/dalvikvm: Unregistering JNI method Lorg/fmod/FMODAudioDevice;.fmodGetInfo:II
D/dalvikvm: Unregistering JNI method Lorg/fmod/FMODAudioDevice;.fmodProcessMicData:ILI
W/Unity: Timeout while trying to pause the Unity Engine.
A/libc: Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread 12003

This only happens with PlayGamesPlatform.Activate().
Please fix this crash.

This issue was fixed for me by publishing the game to Google Play for some reason. I'm leaving this open for others with the same issue

The crash is there. The os just doesn't show the dialog for games installed from Google Play.

Confirmed the same problem. Development Build is fine, while non-dev build will error on initialize GPGS. Does not happen on Nexus 5, but happen on Zenfone 2 Laser. Both tested by directly installing the APK.

Can you share the log of the crash?

Seeing the same issues, Unity 5.5.0p2 with the newest 10.0.1 GPG files, seeing an ANR about 3-5 seconds after issuing an Application.Quit(). I pulled all of the GPG files and references and the app closes fine now. Also on a side note using 5.5.0p2 with 9.8.0 worked fine, so something in the newer 10 version that has some issue. Crashes in normal and development mode.

Here's a logcat dump after I ran it and it crashed: http://pastebin.com/9sn6P8GG

Just wanted to add some info, upgraded to 5.5.0p3 and built using Mono2x as the runtime, same crash. Tried building to IL2CPP since it was fixed in 5.5.0p3 and the game does not crash on Quit, not sure if that helps point in the right direction.

Thanks - that is an interesting data point.

same issue, IL2CPP solves as well.

@leonard4 Just tried switching to IL2CPP with Unity 5.5.0f3 and still running into the same crash.

same issue. In unity 5.3.2f1 worked good. But after updating to 5.5.1f1 get this issue. Any solutions?

@fyn777 I did a small workaround until this is fixed. Send the task activity to the back instead of quitting. Not the most ideal since it isn't really quitting, and you depend on the system to manage the rest, but it works in a pinch while I develop.

It would be something like:

#if UNITY_ANDROID
new AndroidJavaClass("com.unity3d.player.UnityPlayer").GetStatic<AndroidJavaObject>("currentActivity").Call<bool>("moveTaskToBack" , true); 
#endif

same issue, version 0.9.36

@gyazbek thanks for your help

have the same issue, anyone found any fix?@gyazbek your solution minimizes the app or closes the unity player but game doesnt exit.

@asadrana91, Correct. As I mentioned, 'Send the task activity to the back instead of quitting.' This allows the system to handle when it should free up resources, unless your application is specifically marked as a background service. This is just a temporary stop gap so it doesn't stop my personal development, until the fix is released.

instead of using Application.Quit() ,try us System.Diagnostics.Process.GetCurrentProcess().Kill(); , resolved the issue for me.

@asadrana91 I've just tried

System.Diagnostics.Process.GetCurrentProcess().Kill();

and the game quits without crashing. However, my device shows my game still as an active app, albeit it without any screenshot attached to. Might be worth checking your end to ensure quit is working.

Just wanted to add that this still happens as of Unity 5.5.1p4. IL2CPP appears to be broken in 5.5.1 so building in Mono is the only option, but the games crash on app.quit(), makes 5.5.x unusable atm with the GPG plugin. :(

Same problem here, switching to IL2CPP fixed it for me. Thanks for the tip.

Unity 5.5.0.f3.

Downloading the NDK r10e with Unity 5.5.3f1 and setting Android Player Settings Scripting Backend = IL2CPP fixed the issue on my Android 4.4 and 6.1 devices. However, build times are about 3-4 times longer than Mono2x.

I believe the latest version of the plugin 0.9.37 addresses the Application.Quit causing a crash issue.

As far as long build times for IL2CPP, is it feasible to do most of the development using mono, then switch to IL2CPP towards the end of the release cycle? Are you seeing a lot of differences between mono and IL2CPP that require you to use it for the full development process?

Yes, I had been using Mono2x for dev, then switching to IL2CPP for final build and test. I will try out the new version 0.9.37. Thanks Clay!

I have updated to 0.9.37 and can confirm the Application.Quit error is fixed with Mono2x on my Android 4.4 and 6.1 devices. Thanks Clay!

This is still happening on version 0.9.37! The System.Diagnostics.Process.GetCurrentProcess().Kill(); workaround works.

Should be fixed already in v0.10.06. Feel free to reopen if it reproduces with latest plugin version.

Was this page helpful?
0 / 5 - 0 ratings