-
Notifications
You must be signed in to change notification settings - Fork 49
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
OfflineStorage_Room::GetAndReserveRecords crash in Android #1227
Comments
Do you use main thread to initalize Room? |
Hi @anod It seems so, yes. Is this issue causing crashes for the users? It only affects a small portion of our user base, and we've followed the setup in the repository. After reviewing the documentation, it appears that Room, HTTP, and the library need to be initialized before we can initialize the loggers. |
Yes, initialization looks correct, Is it possible to add line number to stack trace nd error message? |
@anod App Center reports the only function names where the crash occurs (from native crashes atleast). It appears to be random. Also we are not sending events right now; we are just initializing. So, the issue could be occurring after a background notification, while using the app, or after some time has passed (reporting session times are random) Question to clarify, is this function called only during the creation of the Room database? Seems that is happening with an Observable that the library sets* |
To add more context, we are creating 3 loggers currently. private fun getLogConfiguration(apiKey: String, teamName: String): ILogConfiguration {
val config = LogManager.getLogConfigurationCopy().apply {
set(LogConfigurationKey.CFG_STR_PRIMARY_TOKEN, apiKey)
set(LogConfigurationKey.CFG_STR_FACTORY_NAME, teamName)
set(LogConfigurationKey.CFG_STR_FACTORY_HOST, teamName)
}
return config
}
private fun initializeLogger() {
if (loggerAuthApp == null) {
val logConfigAuthApp = getLogConfiguration(TelemetryClientType.AUTHAPP.apiKey, "authapp")
loggerAuthApp = LogManagerProvider.createLogManager(logConfigAuthApp)
.getLogger(TelemetryClientType.AUTHAPP.apiKey, "authapp", "")
}
if (loggerPIM == null) {
val logConfigPIM = getLogConfiguration(TelemetryClientType.PIM.apiKey, "pim")
loggerPIM = LogManagerProvider.createLogManager(logConfigPIM)
.getLogger(TelemetryClientType.PIM.apiKey, "pim", "")
}
if (loggerDID == null) {
val logConfigDID = getLogConfiguration(TelemetryClientType.DID.apiKey, "did")
loggerDID = LogManagerProvider.createLogManager(logConfigDID)
.getLogger(TelemetryClientType.DID.apiKey, "did", "")
}
}
|
The trace posted is trying to May be some stats info is being collected, not familiar with it, you can try to disable stats via configuration and see if it helps The code crashes when accessing Room DB via
we use the following code, to create multiple loggers:
|
Describe your environment. Latest 1DS C++ SDK v3.7.62.1
Steps to reproduce.
No repro just a crash report from AppCenter from our Android app.
What is the expected behavior?
N/A
What is the actual behavior?
N/A
Additional context.
This is the crash in appcenter
We are not sending events right now just initializing:
The text was updated successfully, but these errors were encountered: