Comments (6)
Do you use main thread to initalize Room?
from cpp_client_telemetry.
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.
from cpp_client_telemetry.
Yes, initialization looks correct,
looking on stack, the crash is happening during uploading an event when it tires to load records from Room DB
Is it possible to add line number to stack trace nd error message?
Do you know if the crash is happening during a specific lifecycle: openning app or closing?
from cpp_client_telemetry.
@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*
from cpp_client_telemetry.
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", "")
}
}
from cpp_client_telemetry.
The trace posted is trying to uploadAsync
something, looking in the source, the flow looks following: scheduleUpload >> uploadAsync >> initiateUpload >> retrieveEvents >> handleRetrieveEvents >> GetAndReserveRecords
.
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 GetAndReserveRecords
,
I would also suggest to verify that:
- Code that initializes Room, Http client and loggers runs once.
- Code that initializes loggers creates 3 separate database files.
we use the following code, to create multiple loggers:
val config = LogManager.logConfigurationFactory().apply {
set(LogConfigurationKey.CFG_STR_PRIMARY_TOKEN, token)
set(LogConfigurationKey.CFG_STR_COLLECTOR_URL, collectorUrl)
set(LogConfigurationKey.CFG_STR_FACTORY_NAME, name + UUID.randomUUID())
}
val logManager = LogManagerProvider.createLogManager(config)
return logManager.getLogger(token, "", "")
from cpp_client_telemetry.
Related Issues (20)
- Unable to determine when all events have been uploaded HOT 1
- Android crash on LogManager::UploadNow() HOT 10
- Data race in OfflineStorageHandler::GetAndReserveRecords
- [Vision Pro Support] visionOS related changes in OneDS SDK HOT 10
- Does CFG_STR_CACHE_FILE_PATH need to be a full path or can it just be a file name? HOT 1
- How does the SDK send array types?
- #define PAL overrides namespace projectNamespace::PAL HOT 1
- The latest version - v3.8.32.1 is not available on CocoaPods HOT 1
- .NET Framework 4.0 no longer supported HOT 1
- Cannot link win10-lib into C++/WinRt Runtime component
- Cannot "Build" - only Rebuild or Clean
- Pit of failure: can't tell if custom properties file is getting included HOT 2
- Adding new PiiKind values for Scrub Last Hextet and for dropping value. #1249
- VS2022 support HOT 5
- Compilation errors in MacOS 14.4.1 with 'Apple clang version 15.0.0' HOT 1
- Crash in BondSplicer Splice HOT 1
- MacOS CI failing
- logManager.UploadNow() causes crash in iOS
- OneDSInspector tool removed from the repo HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cpp_client_telemetry.