Rxjava: Caused by: java.util.concurrent.RejectedExecutionException

Created on 11 May 2016  ·  30Comments  ·  Source: ReactiveX/RxJava

java.lang.IllegalStateException: Fatal Exception thrown on Scheduler.Worker thread.
    at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:62)
    at android.os.Handler.handleCallback(Handler.java:733)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:136)
    at android.app.ActivityThread.main(ActivityThread.java:5052)
    at java.lang.reflect.Method.invokeNative(Method.java)
    at java.lang.reflect.Method.invoke(Method.java:515)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:609)
    at dalvik.system.NativeStart.main(NativeStart.java)
Caused by: java.util.concurrent.RejectedExecutionException: Task java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask@42e962a8 rejected from java.util.concurrent.ScheduledThreadPoolExecutor@43308cf8[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 1]
    at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2011)
    at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:793)
    at java.util.concurrent.ScheduledThreadPoolExecutor.delayedExecute(ScheduledThreadPoolExecutor.java:298)
    at java.util.concurrent.ScheduledThreadPoolExecutor.schedule(ScheduledThreadPoolExecutor.java:503)
    at java.util.concurrent.ScheduledThreadPoolExecutor.submit(ScheduledThreadPoolExecutor.java:602)
    at rx.internal.schedulers.NewThreadWorker.scheduleActual(NewThreadWorker.java:239)
    at rx.internal.schedulers.NewThreadWorker.schedule(NewThreadWorker.java:224)
    at rx.internal.schedulers.NewThreadWorker.schedule(NewThreadWorker.java:216)
    at rx.internal.operators.OperatorSubscribeOn$1$1$1.request(OperatorSubscribeOn.java:82)
    at rx.Subscriber.request(Subscriber.java:157)
    at rx.internal.operators.OperatorObserveOn$ObserveOnSubscriber.call(OperatorObserveOn.java:225)
    at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:55)
    ... 9 more
java.util.concurrent.RejectedExecutionException: Task java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask@42e962a8 rejected from java.util.concurrent.ScheduledThreadPoolExecutor@43308cf8[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 1]
    at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2011)
    at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:793)
    at java.util.concurrent.ScheduledThreadPoolExecutor.delayedExecute(ScheduledThreadPoolExecutor.java:298)
    at java.util.concurrent.ScheduledThreadPoolExecutor.schedule(ScheduledThreadPoolExecutor.java:503)
    at java.util.concurrent.ScheduledThreadPoolExecutor.submit(ScheduledThreadPoolExecutor.java:602)
    at rx.internal.schedulers.NewThreadWorker.scheduleActual(NewThreadWorker.java:239)
    at rx.internal.schedulers.NewThreadWorker.schedule(NewThreadWorker.java:224)
    at rx.internal.schedulers.NewThreadWorker.schedule(NewThreadWorker.java:216)
    at rx.internal.operators.OperatorSubscribeOn$1$1$1.request(OperatorSubscribeOn.java:82)
    at rx.Subscriber.request(Subscriber.java:157)
    at rx.internal.operators.OperatorObserveOn$ObserveOnSubscriber.call(OperatorObserveOn.java:225)
    at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:55)
    at android.os.Handler.handleCallback(Handler.java:733)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:136)
    at android.app.ActivityThread.main(ActivityThread.java:5052)
    at java.lang.reflect.Method.invokeNative(Method.java)
    at java.lang.reflect.Method.invoke(Method.java:515)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:609)
    at dalvik.system.NativeStart.main(NativeStart.java)`

hi ,Suddenly appeared this bug, now I have no idea, ask for help;

    compile 'com.squareup.retrofit2:retrofit:2.0.2'
    compile 'com.squareup.okhttp3:logging-interceptor:3.0.1'
    compile 'com.squareup.retrofit2:converter-gson:2.0.2'
    compile 'com.squareup.retrofit2:adapter-rxjava:2.0.2'
    compile 'io.reactivex:rxandroid:1.2.0'
    compile 'io.reactivex:rxjava:1.1.5'
1.x Android PR welcome Question

Most helpful comment

I can't reproduce it. Maybe your demo app is too simple to demonstrate it, or you are missing reproduction steps.

Either way, try with Schedulers.io() instead of Schedulers.newThread() as the former is not shut down when the operator finishes using it.

All 30 comments

Looks like you've shutdowned Scheduler or underlying Executor.

On Wed, 11 May 2016, 05:31 lizetong, [email protected] wrote:

java.lang.IllegalStateException: Fatal Exception thrown on
Scheduler.Worker thread.
at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:62)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5052)
at java.lang.reflect.Method.invokeNative(Method.java)
at java.lang.reflect.Method.invoke(Method.java:515)
at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:609)
at dalvik.system.NativeStart.main(NativeStart.java)
Caused by: java.util.concurrent.RejectedExecutionException: Task
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask@42e962a8
rejected from java.util.concurrent.ScheduledThreadPoolExecutor@43308cf8[Terminated,
pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 1]
at
java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2011)
at
java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:793)
at
java.util.concurrent.ScheduledThreadPoolExecutor.delayedExecute(ScheduledThreadPoolExecutor.java:298)
at
java.util.concurrent.ScheduledThreadPoolExecutor.schedule(ScheduledThreadPoolExecutor.java:503)
at
java.util.concurrent.ScheduledThreadPoolExecutor.submit(ScheduledThreadPoolExecutor.java:602)
at
rx.internal.schedulers.NewThreadWorker.scheduleActual(NewThreadWorker.java:239)
at
rx.internal.schedulers.NewThreadWorker.schedule(NewThreadWorker.java:224)
at
rx.internal.schedulers.NewThreadWorker.schedule(NewThreadWorker.java:216)
at
rx.internal.operators.OperatorSubscribeOn$1$1$1.request(OperatorSubscribeOn.java:82)
at rx.Subscriber.request(Subscriber.java:157)
at
rx.internal.operators.OperatorObserveOn$ObserveOnSubscriber.call(OperatorObserveOn.java:225)
at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:55)
... 9 more
java.util.concurrent.RejectedExecutionException: Task
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask@42e962a8
rejected from java.util.concurrent.ScheduledThreadPoolExecutor@43308cf8[Terminated,
pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 1]
at
java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2011)
at
java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:793)
at
java.util.concurrent.ScheduledThreadPoolExecutor.delayedExecute(ScheduledThreadPoolExecutor.java:298)
at
java.util.concurrent.ScheduledThreadPoolExecutor.schedule(ScheduledThreadPoolExecutor.java:503)
at
java.util.concurrent.ScheduledThreadPoolExecutor.submit(ScheduledThreadPoolExecutor.java:602)
at
rx.internal.schedulers.NewThreadWorker.scheduleActual(NewThreadWorker.java:239)
at
rx.internal.schedulers.NewThreadWorker.schedule(NewThreadWorker.java:224)
at
rx.internal.schedulers.NewThreadWorker.schedule(NewThreadWorker.java:216)
at
rx.internal.operators.OperatorSubscribeOn$1$1$1.request(OperatorSubscribeOn.java:82)
at rx.Subscriber.request(Subscriber.java:157)
at
rx.internal.operators.OperatorObserveOn$ObserveOnSubscriber.call(OperatorObserveOn.java:225)
at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:55)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5052)
at java.lang.reflect.Method.invokeNative(Method.java)
at java.lang.reflect.Method.invoke(Method.java:515)
at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:609)
at dalvik.system.NativeStart.main(NativeStart.java)

hi ,Suddenly appeared this bug, now I have no idea, ask for help;
compile 'com.squareup.retrofit2:retrofit:2.0.2'
compile 'com.squareup.okhttp3:logging-interceptor:3.0.1'
compile 'com.squareup.retrofit2:converter-gson:2.0.2'
compile 'com.squareup.retrofit2:adapter-rxjava:2.0.2'
compile 'io.reactivex:rxandroid:1.2.0'
compile 'io.reactivex:rxjava:1.1.5'


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
https://github.com/ReactiveX/RxJava/issues/3927

But,how to shutdowned Scheduleror or underlying Executor.

Do you call Scheduler.shutdown() somewhere?

On Wed, 11 May 2016, 10:54 lizetong, [email protected] wrote:

But,how to shutdowned Scheduleror or underlying Executor.


You are receiving this because you commented.

Reply to this email directly or view it on GitHub
https://github.com/ReactiveX/RxJava/issues/3927#issuecomment-218387976

I haven't call, but I just upgraded version。
Now is
compile 'com.squareup.retrofit2:retrofit:2.0.2' compile 'com.squareup.okhttp3:logging-interceptor:3.0.1' compile 'com.squareup.retrofit2:converter-gson:2.0.2' compile 'com.squareup.retrofit2:adapter-rxjava:2.0.2' compile 'io.reactivex:rxandroid:1.2.0' compile 'io.reactivex:rxjava:1.1.5'

Please help me, my god
Thanks!

In addition to upgrade version, didn't do anything

ok, can you please try:

1) Keep RxJava version at 1.1.5 and downgrade RxAndroid to 1.1.0 and try
reproduce the issue.
2) Keep RxAndroid at 1.2.0 and downgrade RxJava to 1.1.3.

On Wed, 11 May 2016, 11:12 lizetong, [email protected] wrote:

I haven't call, but I just upgraded version。
Now is

compile 'com.squareup.retrofit2:retrofit:2.0.2'
compile 'com.squareup.okhttp3:logging-interceptor:3.0.1'
compile 'com.squareup.retrofit2:converter-gson:2.0.2'
compile 'com.squareup.retrofit2:adapter-rxjava:2.0.2'
compile 'io.reactivex:rxandroid:1.2.0'
compile 'io.reactivex:rxjava:1.1.5'

Please help me, my god
Thanks!


You are receiving this because you commented.

Reply to this email directly or view it on GitHub
https://github.com/ReactiveX/RxJava/issues/3927#issuecomment-218391571

Do you have something like this?

source
.subscribeOn(Schedulers.newThread())
.observeOn(AndroidSchedulers.mainThread())
.subscribe().unsubscribe()

Something seems to unsubscribe the NewThreadWorker the same time subscribeOn tries to request.

Dear,Here is my Demo.
https://github.com/lzt1226/AlexIntentDemo/tree/master/app/src/main/java/com/alex/alexintentdemo/http
I think ,As a result of RxAndroid version is too low, and Retrofit2.0.2 don't match
In our official launch of the APP, the incidence of the bug is probably more than one over one thousand

I've run your demo in emulator, clicked on the buttons but no exceptions were thrown. I also tried with recent versions:

    compile ('io.reactivex:rxandroid:1.2.0') {
        exclude group: 'io.reactivex', module: 'rxjava'
    }
    compile 'io.reactivex:rxjava:1.1.5'

It is a probability bug,There were 1000 + time in our bug list

I can't reproduce it. Maybe your demo app is too simple to demonstrate it, or you are missing reproduction steps.

Either way, try with Schedulers.io() instead of Schedulers.newThread() as the former is not shut down when the operator finishes using it.

I just saw a similar stack trace uploaded to crashlytics. Could it be proguard related?
The versions of some of the prominent components are:

    compile 'com.squareup.retrofit2:retrofit:2.0.0'
    compile 'com.squareup.retrofit2:adapter-rxjava:2.0.0'
    compile 'io.reactivex:rxandroid:1.1.0'
    compile 'io.reactivex:rxjava:1.1.0'

I haven't called a scheduler shutdown or unsubscribe (immediately after subscribe)
Not sure how to reproduce it. The stack trace is below.

Fatal Exception: java.lang.IllegalStateException: Fatal Exception thrown on Scheduler.Worker thread.
       at rx.internal.schedulers.ScheduledAction.run(Unknown Source)
       at android.os.Handler.handleCallback(Handler.java:615)
       at android.os.Handler.dispatchMessage(Handler.java:92)
       at android.os.Looper.loop(Looper.java:174)
       at android.app.ActivityThread.main(ActivityThread.java:4952)
       at java.lang.reflect.Method.invokeNative(Method.java)
       at java.lang.reflect.Method.invoke(Method.java:511)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1027)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:794)
       at dalvik.system.NativeStart.main(NativeStart.java)
Caused by java.util.concurrent.RejectedExecutionException: Task java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask@42cdd038 rejected from java.util.concurrent.ScheduledThreadPoolExecutor@42c081b8[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 1]
       at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:1967)
       at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:782)
       at java.util.concurrent.ScheduledThreadPoolExecutor.delayedExecute(ScheduledThreadPoolExecutor.java:297)
       at java.util.concurrent.ScheduledThreadPoolExecutor.schedule(ScheduledThreadPoolExecutor.java:502)
       at java.util.concurrent.ScheduledThreadPoolExecutor.submit(ScheduledThreadPoolExecutor.java:601)
       at rx.internal.schedulers.NewThreadWorker.tryEnableCancelPolicy(Unknown Source)
       at rx.internal.schedulers.NewThreadWorker.registerExecutor(Unknown Source)
       at rx.internal.schedulers.NewThreadWorker.registerExecutor(Unknown Source)
       at rx.internal.operators.OperatorSubscribeOn$1$1$1.request(Unknown Source)
       at rx.Subscriber.add(Unknown Source)
       at rx.internal.operators.OperatorObserveOn$ObserveOnSubscriber.call(Unknown Source)
       at rx.internal.schedulers.ScheduledAction.run(Unknown Source)
       at android.os.Handler.handleCallback(Handler.java:615)
       at android.os.Handler.dispatchMessage(Handler.java:92)
       at android.os.Looper.loop(Looper.java:174)
       at android.app.ActivityThread.main(ActivityThread.java:4952)
       at java.lang.reflect.Method.invokeNative(Method.java)
       at java.lang.reflect.Method.invoke(Method.java:511)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1027)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:794)
       at dalvik.system.NativeStart.main(NativeStart.java)

@Jaikant Great!
Yeal, I also am such version。
When I use the latest version, no problem。

Did you solve that @lzt1226 ?

@jkwiecien
Yeal,Now is Ok.
Now,My build.gradle like this:
compile 'com.squareup.retrofit2:retrofit:2.0.2' compile 'com.squareup.okhttp3:logging-interceptor:3.0.1' compile 'com.squareup.retrofit2:converter-gson:2.0.2' compile 'com.squareup.retrofit2:adapter-rxjava:2.0.2' compile('io.reactivex:rxandroid:1.2.0') { exclude group: 'io.reactivex', module: 'rxjava' } compile 'io.reactivex:rxjava:1.1.5'

no problem.

@jkwiecien
Or , please use the latest version
Good Luck.

@lzt1226 We're using the same version. I'm unable to reproduce the crash but my users suffer from it. Have you been able to reproduce it? You know which part of your code crashed?

@jkwiecien @lzt1226, can you provide more information about the crashes (more stacktrace) or how the code looks like that crashes? Is it possible those android devices have a limit for number of concurrent threads or how many threads an app can create in total during its lifetime?

I'm closing this issue due to lack of feedback. If you have further input on the issue, don't hesitate to reopen this issue or post a new one.

Hi,
Same issue here, I can't reproduce it in my devices but it's being reported by users on every android api level.

I'm using the latest version of rxjava, no retrofit here

compile 'io.reactivex:rxandroid:1.2.1'
compile 'io.reactivex:rxjava:1.2.0'

Here is the crash report:

Fatal Exception: java.util.concurrent.RejectedExecutionException: Task java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask@1ae1a3fd rejected from java.util.concurrent.ScheduledThreadPoolExecutor@30db9854[Shutting down, pool size = 1, active threads = 0, queued tasks = 0, completed tasks = 32]
       at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2011)
       at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:793)
       at java.util.concurrent.ScheduledThreadPoolExecutor.delayedExecute(ScheduledThreadPoolExecutor.java:298)
       at java.util.concurrent.ScheduledThreadPoolExecutor.schedule(ScheduledThreadPoolExecutor.java:503)
       at java.util.concurrent.ScheduledThreadPoolExecutor.submit(ScheduledThreadPoolExecutor.java:602)
       at rx.internal.schedulers.NewThreadWorker.scheduleActual(SourceFile:244)
       at rx.internal.schedulers.NewThreadWorker.schedule(SourceFile:228)
       at rx.internal.schedulers.NewThreadWorker.schedule(SourceFile:220)
       at rx.internal.operators.OperatorObserveOn$ObserveOnSubscriber.schedule(SourceFile:190)
       at rx.internal.operators.OperatorObserveOn$ObserveOnSubscriber.onNext(SourceFile:165)
       at rx.internal.operators.NotificationLite.accept(SourceFile:152)
       at rx.internal.operators.OperatorOnBackpressureBuffer$BufferSubscriber.accept(SourceFile:157)
       at rx.internal.util.BackpressureDrainManager.drain(SourceFile:200)
       at rx.internal.operators.OperatorOnBackpressureBuffer$BufferSubscriber.onNext(SourceFile:152)
       at com.mycompany.myclass.send(SourceFile:666)
       ...

And this is how my code looks like, it tries to wrap a method to provide a reactive api.

public Observable<String> send(@NonNull final String outMessage) {
        // This observable is going to be subscribed / unsubscribed on arbitrary threads
        return Observable
                .create(new Observable.OnSubscribe<String>() {
                    @Override
                    public void call(final Subscriber<? super String> subscriber) {
                        sendAsync(outMessage, new SendCallback() {

                            // This method is called from a background thread
                            @Override
                            public void onSendResponse(Message message) {
                                if (subscriber.isUnsubscribed()) {
                                    return;
                                }
                                subscriber.onNext(message.getMessage()); // this is line 666 in the stacktrace above
                                if (message.isFinishMessage() && !subscriber.isUnsubscribed()) {
                                    subscriber.onCompleted();
                                }
                            }
                        });
                    }
                })
                .onBackpressureBuffer()
                .observeOn(Schedulers.newThread());
    }

Let me know if I can provide some more information to help with this issue

Looks like as if the chain is unsubscribed (screen rotation?) in the middle of an active emission.

Hi, I think that's the problem too. It can be unsubscribed at any time for a lot of reasons like rotation, or network timeout, user interaction...

Is there a way to prevent this from happening?
I'm not sure if this is a bug with my code or a bug in rxjava.

You could wrap the newThread() with a scheduler that logs the current stacktrace when the Worker.unsubscribe is called to see who is shutting it down.

public final TrackNewThreadScheduler extends Scheduler {
    public Worker createWorker() {
        return new TrackedWorker();
    }

    static final class TrackedWorker extends Worker {
        final Worker actual = Schedulers.newThread().createWorker();

        public Subscription schedule(Action0 task, long time, TimeUnit unit) {
             return actual.schedule(task, time, unit);
        }

        public void unsubscribe() {
             new Exception().printStackTrace();
             actual.unsubscribe();
        }
    }
}

We can only suppress them and report to the plugin error handler, not much else. PR is welcome.

Alternative options: use Schedulers.io() or Schedulers.from with your Executor so you can manage its lifecycle: first cancel outstanding sequences and then shutdown the ExecutorService.

I tried your code and I can see where the unsubscription happens. But, is it wrong to unsubscribe in an arbitrary thread?

I think that, if the unsubscripion and the emission of a new item happen at the same time, it shouldn't crash. And I think its probably ok to just ignore the emission here, because the subscriber is no longer interested. What do you think?

Yes, this is what we do in 2.x.

Ok, I don't know if I have the knowledge and the time to make a PR soon.
Do you think it's ok reopen the issue and add the label "PR welcome"?

I'm closing this issue due to inactivity. If you have further input on the issue, don't hesitate to reopen this issue or post a new one.

Process: com.example.final_project, PID: 3101
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.final_project/com.example.final_project.SignUp}: java.util.concurrent.RejectedExecutionException: Task java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask@ba3ed61 rejected from com.google.firebase.database.core.utilities.DefaultRunLoop$1@125d086[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 1]
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3123)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3266)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1957)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7099)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)
Caused by: java.util.concurrent.RejectedExecutionException: Task java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask@ba3ed61 rejected from com.google.firebase.database.core.utilities.DefaultRunLoop$1@125d086[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 1]
at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2085)
at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:848)
at java.util.concurrent.ScheduledThreadPoolExecutor.delayedExecute(ScheduledThreadPoolExecutor.java:334)
at java.util.concurrent.ScheduledThreadPoolExecutor.schedule(ScheduledThreadPoolExecutor.java:562)
at java.util.concurrent.ScheduledThreadPoolExecutor.execute(ScheduledThreadPoolExecutor.java:654)
at com.google.firebase.database.core.utilities.DefaultRunLoop.scheduleNow(com.google.firebase:firebase-database@@16.0.4:105)
at com.google.firebase.database.core.Repo.scheduleNow(com.google.firebase:firebase-database@@16.0.4:276)
at com.google.firebase.database.Query.addEventRegistration(com.google.firebase:firebase-database@@16.0.4:233)
at com.google.firebase.database.Query.addValueEventListener(com.google.firebase:firebase-database@@16.0.4:149)
at com.example.final_project.SignUp.updateUsers(SignUp.java:53)
at com.example.final_project.SignUp.onCreate(SignUp.java:48)
at android.app.Activity.performCreate(Activity.java:7327)
at android.app.Activity.performCreate(Activity.java:7318)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1275)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3103)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3266) 
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78) 
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108) 
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1957) 
at android.os.Handler.dispatchMessage(Handler.java:106) 
at android.os.Looper.loop(Looper.java:214) 
at android.app.ActivityThread.main(ActivityThread.java:7099) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965) 
2020-05-11 14:41:30.178 3101-3101/com.example.final_project I/Process: Sending signal. PID: 3101 SIG: 9

when I try to install the application the application crashes what is the solution ?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ZakTaccardi picture ZakTaccardi  ·  3Comments

yubaokang picture yubaokang  ·  3Comments

dsvoronin picture dsvoronin  ·  4Comments

Jaap-van-Hengstum picture Jaap-van-Hengstum  ·  3Comments

aballano picture aballano  ·  3Comments