Okay maybe look at some code from 4.3 version engine then. As I had 103 achievements with a released game and it doesn’t have any issues on loading / unloading them. I really think it’s something simple as not destroying/clearing an local reference after creating it
DeleteLocalRef on cls reference should work when getting achievements (after reading a lot on Inet)
If you can point me in right direction with a code project as where achievements get cached I can have a look at it myself and see if I can get a local fix working
Since 4.3 way we deal with achievements has completely changed to use a library.
problem is caused by an interaction between how we deal with JNI and library.
There isn’t a quick and easy fix for this as it is a fundamental issue which requires some rethinking and rewriting of that interaction layer.
It seems to be part of your problem yes; it might not be related to others but one thing at a time I feel.
I should let you know that a fix is unlikely to make it until 4.10 due to timing with planned 4.9 release date. Depending on extent of fix I might be able to get it moved up however at this point I wouldn’t like to give an false impression of when it will make it out.
Is there any you can give me some more details (screen shot or project access?) as to how you are querying and setting up things when this happens.
I’ve got a local test application with 110 achievements (title + description only) and using ‘cache achievements’ and ‘get cached achievement progress’ to get and loop over them (much like how Tappy is doing so) isn’t causing things to crash out.
Ill upload project to drive and send you link when I get home later today.
I have same setup as tappy as well with only difference that I have more progress based achievements ( ones that show how many % you have done before unlocking)
And yet again it fails after play services login. 4.3 version worked fine. So it’s hard for me to believe that it’s an error on my side as going from 4.3 to 4.8 went without problems except for redoing the “Set Text” blueprint nodes, I left all other things intact and filled in new 4.8 project settings (keystore / etc)
So I can now certainly say it’s not an error on my side but really an error with 4.8. So I would love to know how you get it working with a 4.8 engine build and 100+ achievements.
I now have to re-compile project yet again with 4.3 when I get home and re-upload it.
EDIT:
4.9 preview still has same issues. Even with new sign in blueprints that let you sign in manually. Although I love feature and UE4 actually complies with “rules” now (not signing in automatically) it’s a shame it still crashes after signing in (haven’t done logcat yet, but I guess it’s same issue)
Yeah, it is very confusing.
I’m hoping it is just a setup difference between my simple test case and your game, which is why I asked for a copy of it.
Hopefully now with both I can figure out why I can’t reproduce it and in doing so find a fix for it - only fundamental change to how it works has been introduction of a Library between 4.3 and 4.8 to handle achievements, which is source of problem in stack trace in the .
Can I ask how many entries you have in your leader boards?
As with 110 achievements being cached, queried and updated I can’t create problem, however it looks like leadboards get updated first, so I’m wondering if maybe that is factoring in to things in some way.
No, I don’t think it’s a limit like that, I think we are just interacting badly with a Android lib (it expects to be used in a certain way, we aren’t doing that), which might even be fixed in a later version, however until I have a reproduction case that can’t be tested.
I have 3 leader boards setup, one for each difficulty level (Easy Normal Hard) Although it was already producing above error’s when I only had one.
As you can see from my project It’s an copy of Tappy Chicken achievements (at least blueprint setup).
I could make a new build where I hook up leaderboards caching to once button is pressed.
EDIT: Still crashes for me with 4.9 Preview1 even with all LeaderBoards related entries disabled (PollGameCenter - not running in blueprints)
Still crashes when ever I start game on my Tablet.
EDIT 2:
So same issue with 4.8.3 even if I unhook all the “PollGameCenter” nodes so it doesn’t check leaderboards. Make me believe that it’s actually not Blueprint nodes functions but entries for engine itself in project settings “Achievements Map” / “Leaderboatds Map” I’m making a new build that doesn’t map them as everything is already mapped in blueprints as well (Tappy Chicken Way).
Ill let you know what happens
EDIT 3
on 4.8.3 even without achievement and leaderboards maps in project settings it still crashes with same issues.
EDIT 4
On 4.9 preview 2 issue remains. Also without leaderboards polling. Again I think it’s mapping in project settings itself that is handled wrong and not blueprints setup.