I am trying to recreate this issue, but having limited success. So I am going through my code looking for other issues.
One thing I tried was putting Niklas Frykholm’s Globals Locker (through SSK2, thanks Ed) in my code to try and catch globals to see if they could be an issue (in my logs there is a line “CMSession retain count > 1!” which I Googled and is something about memory management?).
The global lock spits a dummy when I require GPGS with the following code;
ssk.globals.lock( \_G ) local gpgs = require( "plugin.gpgs" )
In my trial where I am trying to recreate the issue I get (this is from the Corona Simulator Console);
ERROR: Runtime error [string "-- For more details on this file and what y..."]:135: GLOBALS are locked -- settings must be declared local or prefix with '\_\_' for globals. stack traceback: [C]: in function 'error' /Users/craigbriggs/Google Drive/Corona Projects/Car Game/TestApp/ssk2/external/global\_lock.lua:28: in function \</Users/craigbriggs/Google Drive/Corona Projects/Car Game/TestApp/ssk2/external/global\_lock.lua:25\> [string "-- For more details on this file and what y..."]:135: in main chunk ?: in function 'require' /Users/craigbriggs/Google Drive/Corona Projects/Car Game/TestApp/main.lua:77: in main chunk
In my actual game when I do the same thing it seems to run perfectly in the simulator and Android, but on the iPad I get the following in the console; (not sure why the error message is different, but it ends with the same result);
ERROR: Runtime error GLOBALS are locked -- CoronaProvider must be declared local or prefix with '\_\_' for globals. stack traceback: [C]: ? [C]: in function 'error' /var/mobile/Containers/Data/Application/BEAAE846-22F9-4D5B-8F3D-0D0D515918C8/Documents/.CoronaLive/ssk2/external/global\_lock.lua:28: in function \</var/mobile/Containers/Data/Application/BEAAE846-22F9-4D5B-8F3D-0D0D515918C8/Documents/.CoronaLive/ssk2/external/global\_lock.lua:25\> [C]: ? [C]: in function 'require' ?: in function 'require' /var/mobile/Containers/Data/Application/BEAAE846-22F9-4D5B-8F3D-0D0D515918C8/Documents/.CoronaLive/main.lua:190: in main chunk [C]: in function 'run' ?: in main chunk
Not sure if this is anything, just thought I would bring it up.
Managed to reproduce the error in a sample project, not sure if it has anything to do with the globals above. I have PM’ed you with my sample (since it has some of my personal GPGS details in it) and details of how to reproduce it.
Thanks,
Craig
PS. I’ve reset the leaderboard and disabled the submitting in my app so you can test once if need
The bug didn’t get into our system. Can you send an email to support@coronalabs.com, attach your sample project and put all the details in the body of the email?
Do you have the issue if you don’t use SSK’s global locker?
It didn’t sound like @jhow (in the other thread) was using GPGS for iOS, and with the keyboard being mentioned, I’m not sure how that relates to GPGS either.
The bug is definitely GPGS in this case, my sample project has everything removed and it still bombs…
Vent time: I am slightly annoyed at this Rob (not blaming you), I started dealing with Lerg on this about a month ago, I sent him all this info via a private message which he confirmed and then things just went silent (I thought he was in charge of the GPGS stuff so he was the man to deal with, he never told me to submit a bug). I know you guys are busy, and have tried to be patient, but this seems ridiculously slow. Vent finished…
Is there any further word on this one? I’ve got a similar crash on iOS whenever I submit a new highscore to a leaderboard.
Just to double check that it wasn’t some other part of my game, I stripped it right down to the barest minimum in a test project - which does absolutely nothing (ie. no UI, no scene loading etc) except init the GPGS plugin, login and try to submit some random leaderboard entries and it will crash all the time with an error recorded in the log as:
“*** Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]’”
Any thoughts? It’s a real problem, since our game is in the final stages before release and having leaderboards is a fairly crucial part of it. The Android version works perfectly, just not on our test iPhones.
Any word on this? Sorry to keep asking (I have been waiting almost 2 months), but I have put releasing my app on hold until this is fixed so can I have some indication of whether this is likely to be resolved soon?
I would like to tailor my next step as to reduce my workload;
- If it is going to be addressed real soon then I will wait.
- If it is in the near future then I will code out the leaderboard on iOS (slightly reluctant as I have mentioned leaderboard in press release and it is on website)
- If it is a long way of I will drop GPGS for iOS and code in game center…
We’re in a similar situation, in that our app is nearing completion - it’s in final testing phases now. Unfortunately the leaderboard side of things is fairly important though, which leaves us in a tricky situation.
If the iOS issues aren’t resolved, we’d either have to remove the leaderboard side of things altogether (not ideal, since it’s actually a fairly core part of the game play) or roll our own solution from scratch, as using the iOS Game Centre isn’t an option due to us needing support for the Daily Leaderboards that GPGS provides.
Obviously rolling our own is doable, but it’s immensely time consuming and also seems redundant since the functionality is already there with GPGS.