I one of the from projects I have DBFlow library for SQLite.
The problem occurs when I'm trying to remove some data from Table.
override fun removeOldEventPlanners(): Single<Boolean> {
LogMgr.v(TAG, "removeOldEventPlanners()")
return Single.create { emitter ->
RXSQLite.rx(SQLite.delete().from(EventPlanner::class.java)
.where(EventPlanner_Table.date_to.lessThan(Date(TimeUtil.getCurrentTime().time - CONST_30_DAYS_IN_MILLISECONDS)))
.or(EventPlanner_Table.deleted.`is`(1)))
.queryList()
.subscribe({ eventPlanners ->
LogMgr.d(TAG, "removeOldEventPlanners queryList() $eventPlanners")
emitter.onSuccess(true)
}, { throwable ->
LogMgr.e(TAG, "removeOldEventPlanners error", throwable)
emitter.onError(throwable)
})
}
}
This code throwing exception:
java.lang.IllegalArgumentException: Please use query(). The beginning is not a ISelect
at com.raizlabs.android.dbflow.sql.language.Where.checkSelect(Where.java:259)
at com.raizlabs.android.dbflow.sql.language.Where.queryList(Where.java:235)
at com.raizlabs.android.dbflow.rx2.language.RXModelQueriableImpl$2.call(RXModelQueriableImpl.java:61)
at com.raizlabs.android.dbflow.rx2.language.RXModelQueriableImpl$2.call(RXModelQueriableImpl.java:58)
at io.reactivex.internal.operators.single.SingleFromCallable.subscribeActual(SingleFromCallable.java:44)
at io.reactivex.Single.subscribe(Single.java:3575)
at io.reactivex.Single.subscribe(Single.java:3561)
at com.fs.wfm.storage.dbflow.DBFlowWfmStorageRepo$removeOldEventPlanners$1.subscribe(DBFlowWfmStorageRepo.kt:112)
at io.reactivex.internal.operators.single.SingleCreate.subscribeActual(SingleCreate.java:39)
at io.reactivex.Single.subscribe(Single.java:3575)
at io.reactivex.internal.operators.single.SingleSubscribeOn$SubscribeOnObserver.run(SingleSubscribeOn.java:89)
at io.reactivex.internal.schedulers.ScheduledDirectTask.call(ScheduledDirectTask.java:38)
at io.reactivex.internal.schedulers.ScheduledDirectTask.call(ScheduledDirectTask.java:26)
at java.util.concurrent.FutureTask.run(FutureTask.java:234)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
at java.lang.Thread.run(Thread.java:841)
Anyone has an idea how to fix it?
delete does not return values, so using queryList() to return values as list is not correct and can be seen in the stacktrace.
Related
I'm adapting my application to HMS. When I cancel launched coroutine, catch and trying to log CancellationException to HMS crashlytics, my app crashed with strange logs. If I omit this exception and didn't log it to crashlytics using method AGConnectCrash.getInstance().recordException(throwable) coroutine cancellation doesn't lead to app crash. Can someone help with that problem?
Crash logs
java.lang.ArrayIndexOutOfBoundsException: length=0; index=0 at com.huawei.agconnect.crash.internal.bean.Event$Builder.summary(Unknown Source:5) at com.huawei.agconnect.crash.internal.log.AGCCrashNonFatal.collectInfo(Unknown Source:41) at com.huawei.agconnect.crash.internal.log.AGCCrashNonFatal.logException(Unknown Source:0) at com.huawei.agconnect.crash.internal.log.AGCCrashCore$4.run(Unknown Source:6) at java.util.concurrent.ThreadPoolExecutor.processTask(ThreadPoolExecutor.java:1187) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:784)
SomeCodeExample
private fun loadData() {
job?.cancel()
job = viewModelScope.launch {
try {
data.value = someApiCall()
} catch (e: Exception) {
Logger.log(e)
}
}
}
Where
object Logger {
fun log(e: Throwable?) {
if (e != null) {
AGConnectCrash.getInstance().recordException(e)
}
}
}
I think your input parameter type is incorrect. You put the string instead of the stack information. You are advised to enter the document type. If a character string is forcibly entered, the system crashes. And in later versions, a judgment protection mechanism will be added.
For Details,pls kindly refer Docs.
This question already has answers here:
What is a NullPointerException, and how do I fix it?
(12 answers)
Closed 4 years ago.
I am creating an app in which i want to scrape google data with the help of jsoup and show it to text view in android studio.
But after doing some coding with the help of jsoup i am getting following error:
E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #1
Process: com.example.yasht.cricketapp, PID: 11929
java.lang.RuntimeException: An error occurred while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:325)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354)
at java.util.concurrent.FutureTask.setException(FutureTask.java:223)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:243)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String org.jsoup.nodes.Element.text()' on a null object reference
at com.example.yasht.cricketapp.Bottomnav.score_scrape.doInBackground(score_scrape.java:30)
at com.example.yasht.cricketapp.Bottomnav.score_scrape.doInBackground(score_scrape.java:13)
at android.os.AsyncTask$2.call(AsyncTask.java:305)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:243)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)
this is my jsoup code with async task :
public class score_scrape extends AsyncTask<Void,Void,Void> {
String words;
TextView score;
public score_scrape( TextView score){
this.score =score;
}
#Override
protected Void doInBackground(Void... voids) {
try {
Document doc = Jsoup.connect("https://www.google.com/search?q=india+vs+australia+3rd+odi+live+score").get();
Element element = doc.select("div[imspo_mh_cricket__score-major]").first();
words = element.text();
} catch (IOException e) {
e.printStackTrace();
}
return null;
}
#Override
protected void onPostExecute(Void aVoid) {
super.onPostExecute(aVoid);
score.setText(words);
}
}
I am using async task method which is declared i my main activity.
Comment for any further information.
In your case you don't want to use select You can simply change below line.
Change line from
Element element = doc.select("div[imspo_mh_cricket__score-major]").first();
To
Element element = doc.getElementsByClass("imspo_mh_cricket__score-major").first();
Output:
230
Am using Parse DB for my backend , used method like Login,SaveInBackground,FindInBackGround, most of the function is working except, One function which uses SaveInBackground(){....} other method with same SaveInBackground () is working
This is the method for which the error occurred
private void xxdatat(final ParseObject receiverObject) {
ParseObject obj = new ParseObject(Constants.XXX);
obj.put("SENDER_ID", objdata); //parse object type
obj.put("RECIEIVER_ID", Robjdata); //parse object type
obj.put("REQUEST_TYPE", stingdata); //String type
obj.saveInBackground(new SaveCallback() {
#Override
public void done(ParseException e) {
if (e==null) {
DialogUtil.showDialog(mContext, "working");
} else {
DialogUtil.showDialog(mContext,"Not working");
}
}
});
I surfed through the internet and find some solutions to be made in parse configuration file.
Parse.initialize(new Parse.Configuration.Builder(this)
.applicationId(APP_ID)
.clientKey(CLIENT_KEY)
.addNetworkInterceptor(new ParseLogInterceptor())
.server("https://parse.xxxyyyzzz.com/parse/")
.build());
The link is completed by "/"
As observed there are errors while converting the data from parse to JSONObject and the exception is also JSONException.
How to solve this issue? Thanks in advance.
com.parse.ParseRequest$ParseRequestException: bad json response
at com.parse.ParseRequest.newTemporaryException(ParseRequest.java:290)
at com.parse.ParseRESTCommand.onResponseAsync(ParseRESTCommand.java:308)
at com.parse.ParseRequest$3.then(ParseRequest.java:137)
at com.parse.ParseRequest$3.then(ParseRequest.java:133)
at bolts.Task$15.run(Task.java:917)
at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:105)
at bolts.Task.completeAfterTask(Task.java:908)
at bolts.Task.continueWithTask(Task.java:715)
at bolts.Task.continueWithTask(Task.java:726)
at bolts.Task$13.then(Task.java:818)
at bolts.Task$13.then(Task.java:806)
at bolts.Task$15.run(Task.java:917)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
Caused by: org.json.JSONException: Value <html> of type java.lang.String cannot be converted to JSONObject
at org.json.JSON.typeMismatch(JSON.java:111)
at org.json.JSONObject.<init>(JSONObject.java:160)
at org.json.JSONObject.<init>(JSONObject.java:173)
at com.parse.ParseRESTCommand.onResponseAsync(ParseRESTCommand.java:298)
at com.parse.ParseRequest$3.then(ParseRequest.java:137)
at com.parse.ParseRequest$3.then(ParseRequest.java:133)
at bolts.Task$15.run(Task.java:917)
at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:105)
at bolts.Task.completeAfterTask(Task.java:908)
at bolts.Task.continueWithTask(Task.java:715)
at bolts.Task.continueWithTask(Task.java:726)
at bolts.Task$13.then(Task.java:818)
at bolts.Task$13.then(Task.java:806)
at bolts.Task$15.run(Task.java:917)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
Finally solved this issues by creating a new table in db with same structure and different name.
Now there is no issues working fine.
Sorry, is there a possibility to set default error handler in RxJava?
For instance, I some code in Utils.kt file:
fun BaseFragment.callGallery(view: View){
view.clicks().bindToLifecycle(this).subscribe {
RxPaparazzo.takeImage(this)
.usingGallery()
.subscribe { response ->
throw RuntimeException("Where is this exception from?")
}
}
}
But in stacktrace there's no any hint about Utils.kt or about any of my file.
I understand that I can set onError in every subscriber. with code like:
.subscribe ({ response ->
....
}, { it.printStackTrace() })
But I'd prefer to set one default onError for all subscribers. How can I do it?
Stacktrace:
05-07 12:11:48.246 10966-10966/ru.egslava.rxfluxtest E/AndroidRuntime: FATAL EXCEPTION: main
Process: ru.egslava.rxfluxtest, PID: 10966
java.lang.RuntimeException: Unable to destroy activity {ru.egslava.rxfluxtest/rx_activity_result.HolderActivity}: rx.exceptions.OnErrorNotImplementedException: Where is this exception from?
at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3831)
at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:3849)
at android.app.ActivityThread.-wrap5(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1398)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by: rx.exceptions.OnErrorNotImplementedException: Where is this exception from?
at rx.internal.util.InternalObservableUtils$ErrorNotImplementedAction.call(InternalObservableUtils.java:374)
at rx.internal.util.InternalObservableUtils$ErrorNotImplementedAction.call(InternalObservableUtils.java:371)
at rx.internal.util.ActionSubscriber.onError(ActionSubscriber.java:44)
at rx.observers.SafeSubscriber._onError(SafeSubscriber.java:157)
at rx.observers.SafeSubscriber.onError(SafeSubscriber.java:120)
at rx.exceptions.Exceptions.throwOrReport(Exceptions.java:204)
at rx.observers.SafeSubscriber.onNext(SafeSubscriber.java:144)
at rx.internal.operators.OperatorOnErrorResumeNextViaFunction$4.onNext(OperatorOnErrorResumeNextViaFunction.java:153)
at rx.internal.operators.OperatorMap$MapSubscriber.onNext(OperatorMap.java:74)
at rx.internal.operators.OperatorMerge$MergeSubscriber.emitScalar(OperatorMerge.java:391)
at rx.internal.operators.OperatorMerge$MergeSubscriber.tryEmit(OperatorMerge.java:353)
at rx.internal.operators.OperatorMerge$InnerSubscriber.onNext(OperatorMerge.java:838)
at rx.observers.Subscribers$5.onNext(Subscribers.java:229)
at rx.internal.operators.OperatorZip$Zip.tick(OperatorZip.java:264)
at rx.internal.operators.OperatorZip$Zip$InnerSubscriber.onNext(OperatorZip.java:335)
at rx.internal.operators.OperatorMap$MapSubscriber.onNext(OperatorMap.java:74)
at rx.internal.util.ScalarSynchronousObservable$WeakSingleProducer.request(ScalarSynchronousObservable.java:268)
at rx.Subscriber.setProducer(Subscriber.java:211)
at rx.internal.operators.OperatorMap$MapSubscriber.setProducer(OperatorMap.java:99)
at rx.internal.util.ScalarSynchronousObservable$1.call(ScalarSynchronousObservable.java:79)
at rx.internal.util.ScalarSynchronousObservable$1.call(ScalarSynchronousObservable.java:75)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:50)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
at rx.Observable.unsafeSubscribe(Observable.java:8452)
at rx.internal.operators.OperatorZip$Zip.start(OperatorZip.java:214)
at rx.internal.operators.OperatorZip$ZipSubscriber.onNext(OperatorZip.java:156)
at rx.internal.operators.OperatorZip$ZipSubscriber.onNext(OperatorZip.java:122)
at rx.internal.util.ScalarSynchronousObservable$WeakSingleProducer.request(ScalarSynchronousObservable.java:268)
at rx.Subscriber.setProducer(Subscriber.java:209)
at rx.internal.util.ScalarSynchronousObservable$1.call(ScalarSynchronousObservable.java:79)
at rx.internal.util.ScalarSynchronousObservable$1.call(ScalarSynchronousObservable.java:75)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:50)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
at rx.Observable.unsafeSubscribe(Observable.java:8452)
at rx.internal.util.ScalarSynchronousObservable$4.call(ScalarSynchronousObservable.java:227)
at rx.internal.util.ScalarSynchronousObservable$4.call(ScalarSynchronousObservable.java:220)
at rx.Observable.unsafeSubscribe(Observable.java:8452)
at rx.internal.operators.OperatorMerge$MergeSubscriber.onNext(OperatorMerge.java:248)
RxJava has Plugins to support cross cutting concerns nicely. In particular RxJavaErrorHandler is desiged to attached global error handling behavior like so:
RxJavaPlugins.getInstance().registerErrorHandler(object : RxJavaErrorHandler() {
override fun handleError(e: Throwable?) {
println("Global error handler: $e")
}
})
Observable.just(1).concatMap({ Observable.error<Int>(Exception("Just throwing $it")) })
.subscribe({
println("I'll not be called")
}, {
println("Specific error handler: $it")
})
The above code would print:
Error occurred java.lang.Exception: Just throwing 1
A default error handler: java.lang.Exception: Just throwing 1
I suspect that you'd also be interested in improving diagnostic information available in stacktraces when you do have an unhandled error. For that there's a RxJavaStackTracer that when used RxJavaPlugins.getInstance().registerObservableExecutionHook(RxJavaStackTracer()) enhaces stack trace information. The Stacktraces and subscribeOn/observeOn issue on github is a good read on the topic.
You can use the onErrorResumeNext operator. Example usage:
fun BaseFragment.callGallery(view: View){
view
.clicks()
.bindToLifecycle(this)
.onErrorResumeNext { err -> log(err); Observable.empty() }
.subscribe {
// do stuff
}
}
I'm using the newer RX java where instead of
Observable.create(new Observable.OnSubscribeFunc<T>() {...});
this is used: (due to deprecation)
Observable.create(new Observable.OnSubscribe<T>() {...});
(This can be important as most example, tutorial, explonation uses the old one...)
Well, lets see my problem. I have a Java class, relevant parts from it:
private interface ApiManagerService {
#FormUrlEncoded
#POST("/login")
User getUser(#Field("username") String userName, #Field("password") String password);
}
private static RestAdapter restAdapter = new RestAdapter.Builder()
.setEndpoint(HOST)
.setLogLevel(RestAdapter.LogLevel.FULL)
.build();
private static ApiManagerService apiManager = restAdapter.create(ApiManagerService.class);
public static Subscription login(final String userName, final String password, Observer<User> observer) {
return Observable.create(new Observable.OnSubscribe<User>() {
#Override
public void call(Subscriber<? super User> subscriber) {
try {
User user = apiManager.getUser(userName, password);
subscriber.onNext(user);
subscriber.onCompleted();
} catch (RetrofitError e) {
subscriber.onError(e);
} catch (Throwable e) {
subscriber.onError(e);
}
}
}
).subscribeOn(Schedulers.io())
.retry(3)
.observeOn(AndroidSchedulers.mainThread())
.subscribe(observer);
}
This code almost works perfectly, if everything is ok. But if I make an intentional error, like I turn off the WiFi.. than retrofit get the "UnKnownHostException"... as it should happen at the retrofit call (getUser) in the try catch block. But instead of handling the error to onError(Throwable t) --> where I could handle, it just crashes the app. So it is like if the error never gets to the catch block.
What is strange that HTTP errors (like 404, 401 etc.) is catched, got by onError(...) and everything is just fine.
Everything goes for 3 times before crash, as of .retry(3) but none gets into catch clause.
EDIT 1
LogCat Output:
01-08 16:19:31.576 15285-16162/asd.bdef.gh D/Retrofit﹕ ---- ERROR https://testapi.com/api/login
01-08 16:19:31.606 15285-16162/asd.bdef.gh D/Retrofit﹕ java.net.UnknownHostException: Unable to resolve host "testapi.com": No address associated with hostname
at java.net.InetAddress.lookupHostByName(InetAddress.java:394)
at java.net.InetAddress.getAllByNameImpl(InetAddress.java:236)
at java.net.InetAddress.getAllByName(InetAddress.java:214)
at com.squareup.okhttp.internal.Network$1.resolveInetAddresses(Network.java:29)
at com.squareup.okhttp.internal.http.RouteSelector.resetNextInetSocketAddress(RouteSelector.java:259)
at com.squareup.okhttp.internal.http.RouteSelector.nextProxy(RouteSelector.java:233)
at com.squareup.okhttp.internal.http.RouteSelector.nextUnconnected(RouteSelector.java:159)
at com.squareup.okhttp.internal.http.RouteSelector.next(RouteSelector.java:133)
at com.squareup.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:314)
at com.squareup.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:237)
at com.squareup.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:423)
at com.squareup.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:105)
at com.squareup.okhttp.internal.huc.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:239)
at com.squareup.okhttp.internal.huc.DelegatingHttpsURLConnection.getOutputStream(DelegatingHttpsURLConnection.java:218)
at com.squareup.okhttp.internal.huc.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:25)
at retrofit.client.UrlConnectionClient.prepareRequest(UrlConnectionClient.java:68)
at retrofit.client.UrlConnectionClient.execute(UrlConnectionClient.java:37)
at retrofit.RestAdapter$RestHandler.invokeRequest(RestAdapter.java:321)
at retrofit.RestAdapter$RestHandler.access$100(RestAdapter.java:220)
at retrofit.RestAdapter$RestHandler$1.invoke(RestAdapter.java:265)
at retrofit.RxSupport$2.run(RxSupport.java:55)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:390)
at java.util.concurrent.FutureTask.run(FutureTask.java:234)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
at retrofit.Platform$Android$2$1.run(Platform.java:142)
at java.lang.Thread.run(Thread.java:841)
01-08 16:19:31.606 15285-16162/asd.bdef.gh D/Retrofit﹕ ---- END ERROR
01-08 16:19:31.977 15285-15285/asd.bdef.gh D/AndroidRuntime﹕ Shutting down VM
01-08 16:19:31.977 15285-15285/asd.bdef.gh W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0x41c9d8b0)
01-08 16:19:31.977 15285-15285/asd.bdef.gh E/AndroidRuntime﹕ FATAL EXCEPTION: main
the given api address is not the real one, but the real one is reachable. I just turned off the WiFi to test error handling.
And one more use-case: If I add to the observable .onExceptionResumeNext([2nd observable]) than it goes to the 2nd observable, and it not crashes. But this is not the solution of the problem.
EDIT 2
ApiManager.login(userName, pass, new Observer<User>() {
#Override
public void onCompleted() { }
#Override
public void onError(Throwable e) {
DialogManager.showBasicErrorDialog(getApplicationContext(), e.getLocalizedMessage());
logger.showLog("Login Not ok");
e.printStackTrace();
}
#Override
public void onNext(User user) {
logger.showLog("login ok, user: " + user.getName().toString());
{...}
}
});
EDIT 3
FATAL EXCEPTION: main
rx.exceptions.OnErrorFailedException: Error occurred when trying to propagate error to Observer.onError
at rx.observers.SafeSubscriber._onError(SafeSubscriber.java:175)
at rx.observers.SafeSubscriber.onError(SafeSubscriber.java:97)
at rx.internal.operators.NotificationLite.accept(NotificationLite.java:144)
{...}
Caused by: java.lang.NullPointerException: Attempt to read from field 'rx.functions.Action0 rx.schedulers.TrampolineScheduler$TimedAction.action' on a null object reference
at rx.schedulers.TrampolineScheduler$InnerCurrentThreadScheduler.enqueue(TrampolineScheduler.java:85)
Thanks in advance for helping.
You don't have to build your own Observable with Retrofit, as Retrofit can directly return Observable:
http://square.github.io/retrofit/
Retrofit also integrates RxJava to support methods with a return type
of rx.Observable
#GET("/user/{id}/photo") Observable getUserPhoto(#Path("id")
int id);
(You won't have to handle errors by yourself)
Can you post the stacktrace of your crash ? As I think like you, that your application shouldn't crash.
It looks like you may be running into an issue has been fixed as of RxJava 1.0:
TrampolineScheduler NullPointerException