Instabug-Android
Instabug-Android copied to clipboard
Instabug spawns and keeps threads even when not initialized or disabled
Steps to Reproduce the Problem
- Add Instabug as a dependency to a project without adding any initialization code
- Launch the app
- Check the existing threads, e.g. by debugging or by printing their names to the console
Expected Behavior
No Instabug thread exists if Instabug is not enabled.
Actual Behavior
Multiple Instabug threads exist. For example:
IBG-API-executor-0
IBG-SharedPrefs-0
IBG-core-io-executor-0
IBG-core-io-executor-1
IBG-v3-session-0
Instabug integration code
None. Adding an explicit call to Instabug.disable()
yields the same behavior.
SDK Version
12.2.0
Android Version
Any.
Device Model
Any.
Project That Reproduces the Issue
I can upload a project if needed, but it would only contain these changes:
In the build script:
implementation("com.instabug.library:instabug:12.2.0")
In the Activity:
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
Instabug.disable()
setContent {
IBThreadsTheme {
Button(onClick = {
Thread.getAllStackTraces().map { it.key.name }.sorted().forEach {
Log.i("hjkl", it)
}
}) {
Text("Click")
}
}
}
}
}
Hey @gpunto, Thanks for reporting this.
Even if you didn't intialized Instabug yet I can see that you have been called the Instabug.disable()
API which it's reasnoable to create some threads. However we will invistage more in the number of the created threads and get back to you soon.
Hey @MohamedHefny, thanks for the response!
Please note that even without any references to Instabug code (so even without the call to Instabug.disable()
) the behavior is the same. I'm guessing the threads are spawned by a content provider when the app is created and are never terminated.
In any case, thanks again, let me know if you need any other info!