Null ObservableSource supplied
Hello Dear
Good work
I am using this module since Jan 2018 but i am getting some issues right now in some device
` E/VideoPlayerFragment: mjpeg error null 2019-06-12 12:15:00.421 20502-20527/com.technostacks.speedgun W/System.err: java.lang.NullPointerException: null ObservableSource supplied 2019-06-12 12:15:00.424 20502-20527/com.technostacks.speedgun W/System.err: at io.reactivex.internal.functions.ObjectHelper.requireNonNull(ObjectHelper.java:39) 2019-06-12 12:15:00.424 20502-20527/com.technostacks.speedgun W/System.err: at io.reactivex.internal.operators.observable.ObservableDefer.subscribeActual(ObservableDefer.java:32) 2019-06-12 12:15:00.424 20502-20527/com.technostacks.speedgun W/System.err: at io.reactivex.Observable.subscribe(Observable.java:12030) 2019-06-12 12:15:00.425 20502-20527/com.technostacks.speedgun W/System.err: at io.reactivex.internal.operators.observable.ObservableTimeoutTimed.subscribeActual(ObservableTimeoutTimed.java:45) 2019-06-12 12:15:00.425 20502-20527/com.technostacks.speedgun W/System.err: at io.reactivex.Observable.subscribe(Observable.java:12030) 2019-06-12 12:15:00.425 20502-20527/com.technostacks.speedgun W/System.err: at io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeTask.run(ObservableSubscribeOn.java:96) 2019-06-12 12:15:00.425 20502-20527/com.technostacks.speedgun W/System.err: at io.reactivex.Scheduler$DisposeTask.run(Scheduler.java:579) 2019-06-12 12:15:00.425 20502-20527/com.technostacks.speedgun W/System.err: at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:66) 2019-06-12 12:15:00.425 20502-20527/com.technostacks.speedgun W/System.err: at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:57) 2019-06-12 12:15:00.425 20502-20527/com.technostacks.speedgun W/System.err: at java.util.concurrent.FutureTask.run(FutureTask.java:237) 2019-06-12 12:15:00.425 20502-20527/com.technostacks.speedgun W/System.err: at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:272) 2019-06-12 12:15:00.425 20502-20527/com.technostacks.speedgun W/System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) 2019-06-12 12:15:00.425 20502-20527/com.technostacks.speedgun W/System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) 2019-06-12 12:15:00.425 20502-20527/com.technostacks.speedgun W/System.err: at java.lang.Thread.run(Thread.java:761)
--------- beginning of crash
2019-06-12 12:15:00.426 20502-20527/com.technostacks.speedgun E/AndroidRuntime: FATAL EXCEPTION: RxCachedThreadScheduler-1 Process: com.technostacks.speedgun, PID: 20502 java.lang.NullPointerException: null ObservableSource supplied at io.reactivex.internal.functions.ObjectHelper.requireNonNull(ObjectHelper.java:39) at io.reactivex.internal.operators.observable.ObservableDefer.subscribeActual(ObservableDefer.java:32) at io.reactivex.Observable.subscribe(Observable.java:12030) at io.reactivex.internal.operators.observable.ObservableTimeoutTimed.subscribeActual(ObservableTimeoutTimed.java:45) at io.reactivex.Observable.subscribe(Observable.java:12030) at io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeTask.run(ObservableSubscribeOn.java:96) at io.reactivex.Scheduler$DisposeTask.run(Scheduler.java:579) at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:66) at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:57) at java.util.concurrent.FutureTask.run(FutureTask.java:237) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:272) 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)`
app will get cresh i have add try and catch, but i can not catch this issue
Also i have check when i did comment below code
Mjpeg.newInstance().open("myurl/?action=stream", 5) .subscribe(inputStream -> { holder.videoView.setSource(inputStream); holder.videoView.setDisplayMode(displayMode); holder.videoView.showFps(false); }, throwable -> { Log.e(TAG, "mjpeg error " + throwable.getMessage()); });
I did not get any error as above mention
please help me.
Thanks
Did you try to debug with the emulator or the phone to check which line is causing the issue? Can you confirm that is a valid mjpeg stream? Thanks