Comments (7)
@maltzj I've created a branch to reproduce this. I've tried running the test both with the leaveBreadcrumb
method present, and commented out, and both times I observe:
Test running failed: Instrumentation run failed due to 'Process crashed.'
In RxJava2 there was a change which means it's not permitted to emit null, and attempting to do so will result in a call to onError
. Adding a consumer for onError
would prevent an uncaught exception from crashing the instrumentation process, e.g.:
.subscribe(System.out::println, Throwable::printStackTrace);
Let me know if I've got the wrong end of the stick here and I can look into this further.
from bugsnag-android-ndk.
That may be true in RxJava2 land; however, we're currently living in RxJava 1 land (at least for this code). Also, this code doesn't crash in our non-test application, nor does it consistently fail, which is what I'd expect if there were an RxJava bug.
from bugsnag-android-ndk.
Ah right, my bad! I'll try again with RxJava1 and post results.
from bugsnag-android-ndk.
The following test reproduces the issue 100% of the time:
public void leaveBreadcrumb() {
for (int k = 0; k < 100; k++) {
Observable.fromCallable(
new Callable<Void>() {
@Override
public Void call() throws Exception {
Bugsnag.leaveBreadcrumb("some non-null value" + "some other non-null value");
return null;
}
})
.subscribeOn(Schedulers.io())
.subscribe();
}
}
Interestingly using Schedulers.immediate()
passes the test, so that may be a potential workaround if you're able to inject the scheduler in for testing purposes. The Logcat seems to suggest that the NDK notifier is trying to free memory which isn't allocated - I'll have to look into this a bit further.
from bugsnag-android-ndk.
gentle poke
from bugsnag-android-ndk.
@maltzj we've tracked it down to a couple of thread safety issues when adding breadcrumbs, I've linked a PR which partially fixes this if you're interesting in an explanation. Still investigating a more general fix that will prevent this altogether.
from bugsnag-android-ndk.
Curious if there are any plans to move forward on this, or is it going to be marked as won'tfix?
from bugsnag-android-ndk.
Related Issues (5)
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 bugsnag-android-ndk.