我正在跟踪用户如何使用Firebase在我的应用程序中导航,如下所示:
43. FirebaseAnalytics mTracker = MyApplication.getDefaultTracker();
44. Bundle payload = new Bundle();
45. payload.putString(FirebaseAnalytics.Param.VALUE, "page");
46. mTracker.logEvent("Navigation", payload);
偶尔我会通过这个堆栈跟踪得到OOM Exception:
Fatal Exception: java.lang.OutOfMemoryError: pthread_create (1040KB stack) failed: Try again
at java.lang.Thread.nativeCreate(Thread.java)
at java.lang.Thread.start(Thread.java:1063)
at com.google.android.gms.measurement.internal.zzw.zzd(Unknown Source)
at com.google.android.gms.measurement.internal.zzw.zzd(Unknown Source)
at com.google.android.gms.measurement.internal.zzac.zzay(Unknown Source)
at com.google.android.gms.measurement.internal.zzac.zzay(Unknown Source)
at com.google.android.gms.measurement.internal.zzac.zzay(Unknown Source)
at com.google.android.gms.measurement.AppMeasurement.logEvent(Unknown Source)
at com.google.firebase.analytics.FirebaseAnalytics.getInstance(Unknown Source)
at com.a.b.c.trackNavigation(SoudfaTracker.java:46)
at com.a.b.c.ProfileFragment.init(ProfileFragment.java:167)
at com.a.b.c.ProfileFragment_.onViewChanged(ProfileFragment_.java:190)
at org.androidannotations.api.view.OnViewChangedNotifier.notifyViewChanged(OnViewChangedNotifier.java:41)
at com.soudfa.Fragments.Profile.ProfileFragment_.onViewCreated(ProfileFragment_.java:104)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1086)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1252)
at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:742)
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1617)
at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:517)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:5942)
at java.lang.reflect.Method.invoke(Method.java)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1400)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1195)
我正在运行compile 'com.google.firebase:firebase-analytics:9.0.2'
有人试过吗?