Closed bblpny closed 7 years ago
Hey @bblpny, I'm a developer working on IL2CPP at Unity. Can you submit a bug report to Unity about this? I'm not quite sure where the problem lies, but the Android player should not be crashing like this in IL2CPP.
hey @joshpeterson , yea I can put together a report on a fresh project. For what its worth, that crash happens when trying to bring up the login screen on device. By alterning facebooks implementation to not use reflection (and use AndroidJavaClass directly) results in no crash. I'll put together a blank project with the original 7.8.0 facebook sdk for unity that brings up the login screen and submit it.
@joshpeterson I've submitted two reports just now. Each are in the same project I just created that consists of a button that when pressed calls the function that causes the crash.
The first (case 838241) is demonstrating how Android IL2CPP and projects with Facebook SDK cannot compile due to __Internal P/Invoke stuff that is unlinkable. While I don't know that this would be considered a Unity bug, I thought to share it just in case.
The second (case 838259) is using a modified version of Facebook.Unity.dll that cuts out all of the troubled iOS p/Invoke stuck in it, then disabled Facebook.Unity.IOS.dll (which is enabled for all platforms for some reason by default). This report does build and does crash, I ensured this, Even though it does not have a valid facebook app id; it crashes just fine.
If you have any follow up questions, let me know with the email i sent the reports with. Sorry for the delay in response to your github post.
This should be fixed in 7.9.0 but please report bugs to https://developers.facebook.com/bugs
Once facebook sdk runs on android builds from IL2CPP it causes a fatal crash. As mentioned earlier there is issues getting IL2CPP to run on android at all, However this is once you've got it running, and a different issue.
My guess is that the generic call to CallStatic in the IAndroidWrapper interface being the culprit. Because for whatever reason facebook does not hard link against AndroidJavaClass and unity likely optimizes the specific generic combinations out.