I've finally managed to simulate the app boot crash on the real tvOS device here this morning and have the following symbolicated crash report (attached) below.
Just like to point out it runs fine on the simulator and real device from Xcode, but when I archive the build and then extract the .ipa and then resend that to the real device it crashes (i.e. what Apple see their end also).
@hgy29 I have no idea other than I use encrypted Lua and assets. First time I have ever seen a crash like this personally. I happens on all 3 tvOS apps in the same place.
So it crashes without the debug build information ?
Is it possible in xcode to use the same flags for a 'test' build as are used for the archive build?
That way we will know if it's a build difference that is causing the problem.
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!). https://deluxepixel.com
I set the ipa file as debug when I archived it, then ran it on real device but the crash logs don't tell me anything else difference from above regards gideros.
I read via Apple docs somewhere that the final archived binary is not the same animal as the the Xcode run version hence why they saw the crash and I didn't until I ran the archived ipa file directly myself. I didn't actually know that fact until last night
When I run debug version from Xcode on real device and analyze it, I notice this GL error which actually happens on boot also - maybe this is related perhaps maybe don't know?
With newly exported code from gideros (same lua source code for both used in this test)... iPhone version archive ipa sent to real iphone device works OK no problem (no crash). tvOS version archive ipa to real tvOS device does not work (crashes as earlier above).
Bitcode is required always for tvOS it seems, so not sure to get around that if it's that.
The only difference other than that, is one has libluasocket stuff included and the other one (TV) does not in order to compile correctly if you recall.
This is a major bummer, as one of the apps I have is a Christmas one - so think I'm going to possibly miss the boat with that one in reality. Oh well :P
I've had a near identical issue with a native app I wrote on iOS about 2 months ago, the new Xcode is crap, lets things archive that should fail. I first tried the bitcode on/off but that did not solve it. Turned out to be not linking a library (was flurry in my case) on the archive build but somehow not complaining. I would place money on it being a non-linked library.
I thought we were already providing .a files with debug information. On iOS I ame able to step through gideros native code with Xcode, so surely symbols are already in. They should have made their way into the .dsym file. Was the (right) dsym file actually used for symbolication ?
This is what I did to get the crash to happen and symbolicated logs myself my end like Apple...
When I create the debug version Archive, I then export the .ipa file from the Archive. I then send the exported .ipa to the real device target via Xcode Devices (the Apple TV in this case). It then runs (well crashes) ...then I check that devices crash logs back in Xcode with symbolication.
Gideros does not seem to provide symbols via that method in the symbolicated log. I presume Xcode creates the symbol file automatically when I do all this. It even offers the option to resymbolicate the crash report (which I did also) so is there any other step I am missing here?
Anyone could probably recreate this crash by running an exported archive ipa version of the binary on their own tvOS hardware setup I guess?
...I also presumed that because the .dsym file usually sits inside the Archive along with the .ipa that Xcode knows where to get it from when it symbolicates the crash log.
I've never done this bit before, can you tell yet?
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!). https://deluxepixel.com
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!). https://deluxepixel.com
I don't have an ATV to test, but I tried to enable bitcode for iPhone and do the same steps as you: no issue! Here is what I did: 1) I rebuilt all gideros libs with bitcode enabled (gvfs,lua,gideros and luasocket) 2) I enable bitcode in the project settings in xcode 3) I archived the app and exported it as 'development deployment' thinned for my iPhone 6, with bitcode rebuilding enabled. 4) I installed the resulting ipa from Xcode device manager.
And it runs ok... Did I miss something, or this this more of an AppleTV specific bug than a generic bitcode issue ?
Thank you for trying that route which is a good test.
Everything you did was indeed correct.
The only difference is that libluasocket has to be removed from tvOS build as it does not compile with it in place either way.
I can't find anything else my end that would cause this as it works on real tv device if I dont recompile with bitcode. Soon as I export with bitcode on, then it crashes on real device as mentioned earlier. Need somebody else with real tv device to test.
Comments
Is it possible in xcode to use the same flags for a 'test' build as are used for the archive build?
That way we will know if it's a build difference that is causing the problem.
https://deluxepixel.com
appletv binaries are build with bitcode enabled, could that be the case?
With newly exported code from gideros (same lua source code for both used in this test)...
iPhone version archive ipa sent to real iphone device works OK no problem (no crash).
tvOS version archive ipa to real tvOS device does not work (crashes as earlier above).
Bitcode is required always for tvOS it seems, so not sure to get around that if it's that.
Very odd this.
I first tried the bitcode on/off but that did not solve it.
Turned out to be not linking a library (was flurry in my case) on the archive build but somehow not complaining.
I would place money on it being a non-linked library.
Likes: MobAmuse
When I create the debug version Archive, I then export the .ipa file from the Archive. I then send the exported .ipa to the real device target via Xcode Devices (the Apple TV in this case). It then runs (well crashes) ...then I check that devices crash logs back in Xcode with symbolication.
Gideros does not seem to provide symbols via that method in the symbolicated log. I presume Xcode creates the symbol file automatically when I do all this. It even offers the option to resymbolicate the crash report (which I did also) so is there any other step I am missing here?
Anyone could probably recreate this crash by running an exported archive ipa version of the binary on their own tvOS hardware setup I guess?
I've never done this bit before, can you tell yet?
Not good because it needs bitcode for tvOS
Ugh!
Likes: MobAmuse
https://deluxepixel.com
Likes: MobAmuse
https://deluxepixel.com
https://forums.developer.apple.com/thread/25224
https://github.com/gideros/gideros/issues/201
Likes: SinisterSoft
Here is what I did:
1) I rebuilt all gideros libs with bitcode enabled (gvfs,lua,gideros and luasocket)
2) I enable bitcode in the project settings in xcode
3) I archived the app and exported it as 'development deployment' thinned for my iPhone 6, with bitcode rebuilding enabled.
4) I installed the resulting ipa from Xcode device manager.
And it runs ok... Did I miss something, or this this more of an AppleTV specific bug than a generic bitcode issue ?
Likes: MobAmuse
Everything you did was indeed correct.
The only difference is that libluasocket has to be removed from tvOS build as it does not compile with it in place either way.
I can't find anything else my end that would cause this as it works on real tv device if I dont recompile with bitcode. Soon as I export with bitcode on, then it crashes on real device as mentioned earlier. Need somebody else with real tv device to test.
Likes: MobAmuse, SinisterSoft
Thanks again anyway for trying.
Likes: SinisterSoft
Grim bug this :P