Thanks for the reply guys!
@sven
Yes, I’m bundling on 64 bit Windows 10.
@britzl
I can see the log even after the call, but I’m sure it is caused by it, because if I remove it then the app is not crashing.
The code around facebook.login:
function on_input(self, action_id, action)
local select = action_id == hash("select") and action.pressed
if select or (action_id == hash("click") and action.pressed) then
if select or gui.pick_node(gui.get_node("new_game"), action.x, action.y) then
gui.animate(gui.get_node("death_menu"), "color", vmath.vector4(1.0, 1.0, 1.0, 0.0), gui.EASING_LINEAR, 1.0, 0.0, game_over_faded_out)
elseif gui.pick_node(gui.get_node("death_share"), action.x, action.y) then
gui.set_color(gui.get_node("death_share"), vmath.vector3(0.0, 0.0, 1.0))
print("Before FB Login")
facebook.login(fb_login)
print("After FB Login")
end
elseif action_id == hash("back") and action.pressed then
msg.post("default:/scene_manager", "perform_loading",
{
scenes_to_load = {msg.url("default:/menu#menu_collection_proxy")},
scenes_to_unload = {msg.url("default:/ocean#ocean_collection_proxy"), msg.url("default:/game_over#game_over_collection_proxy")}
})
end
end
And the facebook login callback:
function fb_login(self, status, error)
print("FB Login Callback")
if error or status ~= facebook.STATE_OPEN then
print("failed to login to facebook")
gui.set_color(gui.get_node("death_share"), vmath.vector3(1.0, 0.0, 0.0))
return
else
print("Logged in facebook")
gui.set_color(gui.get_node("death_share"), vmath.vector3(0.0, 1.0, 0.0))
end
end
Today I’ve prepared debug build to see the logs in the logcat and I’ve managed to find the callstack:
E/AndroidRuntime(20957): FATAL EXCEPTION: main
E/AndroidRuntime(20957): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.followthewhiterabit.thewhale/com.facebook.FacebookActivity}: java.lang.IllegalArgumentException: No view found for id 0x7f050016 (com.followthewhiterabit.thewhale:string/auth_client_needs_installation_title) for fragment LoginFragment{413592a0 #0 id=0x7f050016 SingleFragment}
E/AndroidRuntime(20957): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2343)
E/AndroidRuntime(20957): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2395)
E/AndroidRuntime(20957): at android.app.ActivityThread.access$600(ActivityThread.java:162)
E/AndroidRuntime(20957): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1364)
E/AndroidRuntime(20957): at android.os.Handler.dispatchMessage(Handler.java:107)
E/AndroidRuntime(20957): at android.os.Looper.loop(Looper.java:194)
E/AndroidRuntime(20957): at android.app.ActivityThread.main(ActivityThread.java:5371)
E/AndroidRuntime(20957): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(20957): at java.lang.reflect.Method.invoke(Method.java:525)
E/AndroidRuntime(20957): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833)
E/AndroidRuntime(20957): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
E/AndroidRuntime(20957): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime(20957): Caused by: java.lang.IllegalArgumentException: No view found for id 0x7f050016 (com.followthewhiterabit.thewhale:string/auth_client_needs_installation_title) for fragment LoginFragment{413592a0 #0 id=0x7f050016 SingleFragment}
E/AndroidRuntime(20957): at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:919)
E/AndroidRuntime(20957): at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1104)
E/AndroidRuntime(20957): at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:682)
E/AndroidRuntime(20957): at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1467)
E/AndroidRuntime(20957): at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:570)
E/AndroidRuntime(20957): at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1167)
E/AndroidRuntime(20957): at android.app.Activity.performStart(Activity.java:5132)
E/AndroidRuntime(20957): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2316)
E/AndroidRuntime(20957): ... 11 more