-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash "Fatal Exception: java.lang.OutOfMemoryError" #80
Comments
Добрый день!Ваше письмо получено и зарегистрировано под уникальным номером № 13566835. Ответ обязательно будет предоставлен, пожалуйста, ожидайте.Просим Вас не отправлять повторное письмо по данному вопросу - оно будет считаться новой заявкой и может быть обработано позднее.Помощь сервиса: https://yandex.ru/support/direct/?from=email--С уважением,Отдел клиентского сервисател.: 8 800 234-24-80 (звонок из регионов России бесплатный)тел.: +7 495 739-37-77 02.08.2021, 19:46, "Alexandr" ***@***.***>:
Добрый день.
Версия библиотеки:
'com.yandex.android:mobmetricalib:3.20.1'
В приложении есть 3 процесса: "main", "light" и "Metrica".
Метрика инициализируется во всех процессах:
YandexMetricaConfig.Builder builder = YandexMetricaConfig.newConfigBuilder(YANDEX_METRICA_API_KEY);
if(BuildConfig.DEBUG)
builder.withLogs();
YandexMetricaConfig config = builder.build();
YandexMetrica.activate(getApplicationContext(), config);
YandexMetrica.enableActivityAutoTracking(this);
Firebase инициализируется везде кроме "Metrica" процесса:
if (!isMetricaProcess()) {
FirebaseInit.init(this);
}
А Yandex Push SDK только в "main" процессе:
if (isMainProcess()) {
YandexPushSDK.init(getApplicationContext());
}
Android Manifest:
<receiver
android:name="com.google.firebase.iid.FirebaseInstanceIdReceiver"
android:exported="true"
android:permission="com.google.android.c2dm.permission.SEND"
android:process=":light"
tools:node="replace">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
</intent-filter>
</receiver>
<service
android:name=".services.FirebaseService"
android:exported="false"
android:process=":light">
<intent-filter android:priority="-500">
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<!-- Yandex PushSDK -->
<service android:name="com.yandex.metrica.push.firebase.MetricaMessagingService" tools:node="remove"/>
В Firebase сервисе при получении токена и сообщений мы перенаправляем данные в MetricaMessagingService:
@OverRide
public void onNewToken(String s) {
super.onNewToken(s);
SharedPrefs.getInstance().set(SharedPrefs.KEY_PUSH_TOKEN, s);
new MetricaMessagingService().onNewToken(s);
}
@OverRide
public void onMessageReceived(RemoteMessage remoteMessage) {
super.onMessageReceived(remoteMessage);
Timber.d("Push received");
if(Notify.isOurPush(remoteMessage.getData())) {
Timber.d("Push: Our");
Notify.send(remoteMessage.getData());
}else {
Timber.d("Push: Yandex");
new MetricaMessagingService().processPush(this, remoteMessage);
}
}
При этом достаточно большое кол-во крэшей видим в Firebase Crashlytics:
Fatal Exception: java.lang.OutOfMemoryError: Failed to allocate a 1610 byte allocation with 8388608 free bytes and 22MB until OOM; failed due to fragmentation (required continguous free 16384 bytes for a new buffer where largest contiguous free 12288 bytes)
at java.lang.StringFactory.newStringFromBytes(StringFactory.java:79)
at java.lang.StringFactory.newStringFromBytes(StringFactory.java:53)
at java.lang.StringFactory.newStringFromBytes(StringFactory.java:45)
at com.yandex.metrica.impl.ob.za.a(SourceFile:4)
at com.yandex.metrica.impl.ob.fa.a(SourceFile:13)
at com.yandex.metrica.impl.ob.fa.(SourceFile:16)
at com.yandex.metrica.impl.ob.Ta.b(SourceFile:6)
at com.yandex.metrica.impl.ob.sd.a(SourceFile:56)
at com.yandex.metrica.impl.ob.V.reportError(SourceFile:3)
at com.yandex.metrica.impl.ob.Rs.run(SourceFile:1)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.os.HandlerThread.run(HandlerThread.java:61)
—You are receiving this because you are subscribed to this thread.Reply to this email directly, view it on GitHub, or unsubscribe.
|
Здравствуйте. Наблюдаем огромное количество похожих крешей в гугл консоли, после перехода с
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Добрый день.
Версия библиотеки:
'com.yandex.android:mobmetricalib:3.20.1'
В приложении есть 3 процесса: "main", "light" и "Metrica".
Метрика инициализируется во всех процессах:
Firebase инициализируется везде кроме "Metrica" процесса:
А Yandex Push SDK только в "main" процессе:
Android Manifest:
В Firebase сервисе при получении токена и сообщений мы перенаправляем данные в MetricaMessagingService:
При этом достаточно большое кол-во крэшей видим в Firebase Crashlytics:
The text was updated successfully, but these errors were encountered: