question

twdteam avatar image
twdteam asked

Crash (fatal signal 11) when initialising Game Circle

Hi, We're trying to integrate GameCircle into our Unity game, which we've already successfully integrated IAP. However, this being a Unity game we can't initialise directly from the main activity. What we do is get the current main activity and call into our Java plugin, passing it the current activity as below public void onInitialise(final Activity currentActivity) { m_activity = currentActivity; //Make a list of the Amazon GameCircle features your game uses. //Only show the features you are using. EnumSet myGameFeatures = EnumSet .of(AmazonGamesFeature.Achievements, AmazonGamesFeature.Leaderboards); AmazonGamesClient.initialize(m_activity.getApplication(), new AmazonGamesCallback() [etc] } Unfortunately this results in a crash inside initialize with the output W/dalvikvm(3492): Invalid indirect reference 0x415297e0 in decodeIndirectRef E/dalvikvm(3492): VM aborting A/libc(3492): Fatal signal 11 (SIGSEGV) at 0xdeadd00d (code=1) Any ideas on what is going wrong or how it can be rectified? Thanks
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Samuel@Amazon avatar image
Samuel@Amazon answered
Hi, we are looking into your issue and we will post on this same thread once we have an update. Meanwhile, can you please raise a contact us to Amazon Support Team for this. One of our support engineers will assist you in this. Thank you.
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

twdteam avatar image
twdteam answered
The problem was that GameCircle was creating a new Handler in initialise. If you just call into a Java plugin from Unity and create a Handler, you will crash. So to avoid this problem you need to call the GameCircle initialise inside a runOnUiThread call. i.e. static public void gameCircleInitialise(final Activity currentActivity) { currentActivity.runOnUiThread(new Runnable() { public void run() { //code for game circle initialise in here } } }
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Samuel@Amazon avatar image
Samuel@Amazon answered
Hi twdteam, its good to know that you solved your issue. Surely this will help other developers in the forum. Thank you.
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.