facebook / facebook-sdk-for-unity

The facebook sdk for unity.
https://developers.facebook.com/docs/unity
Other
492 stars 257 forks source link

crach android app unity2018 after FB.ActivateApp() #345

Open smfltn opened 5 years ago

smfltn commented 5 years ago

Checklist

Environment

Describe your dev environment here, giving as many details as possible. If you have them, make sure to include:

Code Samples & Details

  1. install facebook unity latest version in newproject unity2018.4
  2. add FB.ActivateApp() in sample

FB.Init(this.OnInitComplete, this.OnHideUnity);

private void OnInitComplete()
{
       this.Status = "Success - Check log for details";
       this.LastResponse = "Success Response: OnInitComplete Called\n";
       string logMessage = string.Format(
                "OnInitCompleteCalled IsLoggedIn='{0}' IsInitialized='{1}'",
                FB.IsLoggedIn,
                FB.IsInitialized);
       LogView.AddLog(logMessage);
       if (AccessToken.CurrentAccessToken != null)
       {
           LogView.AddLog(AccessToken.CurrentAccessToken.ToString());
       }

       //here
       FB.ActivateApp();
}
  1. play sample app
  2. click FB.init
  3. click Login
  4. close facebook window
  5. repeat 5-6
  6. crash java.lang.RuntimeException: Window couldn't find content container view

It will not crash unless call FB.ActivateApp()

smfltn commented 5 years ago

add crash video facebookcrash_20191113.zip

smfltn commented 5 years ago

add sample project onlyfacebook.zip