gpt4 book ai didi

java - E/Android运行时: FATAL EXCEPTION: RxNewThreadScheduler-42

转载 作者:行者123 更新时间:2023-12-02 10:56:57 25 4
gpt4 key购买 nike

我收到了一些来自不同用户的报告,他们遇到了应用程序崩溃的问题。

说实话,我已经不太知道会发生什么了。

设备有时不处于 Activity 状态,例如。 40 - 60 分钟,然后出现此错误。

感谢您的任何意见或建议。

错误日志:

07-27 18:08:12.558 1883-5804/? E/AndroidRuntime: FATAL EXCEPTION: RxNewThreadScheduler-42\
io.reactivex.exceptions.UndeliverableException: java.io.IOException\
at io.reactivex.plugins.RxJavaPlugins.onError(RxJavaPlugins.java:367)\
at io.reactivex.internal.operators.single.SingleCreate$Emitter.onError(SingleCreate.java:82)\
at com.framelogic.rabbitmq.connection.RabbitMQConnectionImpl.lambda$getChannel$5$RabbitMQConnectionImpl(RabbitMQConnectionImpl.java:141)\
at com.framelogic.rabbitmq.connection.RabbitMQConnectionImpl$$Lambda$3.subscribe(Unknown Source)\
at io.reactivex.internal.operators.single.SingleCreate.subscribeActual(SingleCreate.java:39)\
at io.reactivex.Single.subscribe(Single.java:3310)\
at io.reactivex.internal.operators.single.SingleSubscribeOn$SubscribeOnObserver.run(SingleSubscribeOn.java:89)\
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:234)\
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:153)\
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:267)\
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)\
Caused by: java.io.IOException\
at com.rabbitmq.client.impl.AMQChannel.wrap(AMQChannel.java:124)\
at com.rabbitmq.client.impl.AMQChannel.wrap(AMQChannel.java:120)\
at com.rabbitmq.client.impl.AMQChannel.exnWrappingRpc(AMQChannel.java:142)\
at com.rabbitmq.client.impl.ChannelN.open(ChannelN.java:136)\
at com.rabbitmq.client.impl.ChannelManager.createChannel(ChannelManager.java:176)\
at com.rabbitmq.client.impl.AMQConnection.createChannel(AMQConnection.java:559)\
at com.framelogic.rabbitmq.connection.RabbitMQConnectionImpl.lambda$getChannel$5$RabbitMQConnectionImpl(RabbitMQConnectionImpl.java:132)\
at com.framelogic.rabbitmq.connection.RabbitMQConnectionImpl$$Lambda$3.subscribe(Unknown Source)\'a0\
at io.reactivex.internal.operators.single.SingleCreate.subscribeActual(SingleCreate.java:39)\'a0\
at io.reactivex.Single.subscribe(Single.java:3310)\'a0\
at io.reactivex.internal.operators.single.SingleSubscribeOn$SubscribeOnObserver.run(SingleSubscribeOn.java:89)\'a0\
at io.reactivex.Scheduler$DisposeTask.run(Scheduler.java:579)\'a0\
at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:66)\'a0\
at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:57)\'a0\
at java.util.concurrent.FutureTask.run(FutureTask.java:234)\'a0\
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:153)\'a0\
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:267)\'a0\
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)\'a0\
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)\'a0\
at java.lang.Thread.run(Thread.java:841)\'a0\
Caused by: com.rabbitmq.client.ShutdownSignalException: connection error\
at com.rabbitmq.utility.ValueOrException.getValue(ValueOrException.java:66)\
at com.rabbitmq.utility.BlockingValueOrException.uninterruptibleGetValue(BlockingValueOrException.java:36)\
at com.rabbitmq.client.impl.AMQChannel$BlockingRpcContinuation.getReply(AMQChannel.java:443)\
at com.rabbitmq.client.impl.AMQChannel.privateRpc(AMQChannel.java:263)\
at com.rabbitmq.client.impl.AMQChannel.exnWrappingRpc(AMQChannel.java:136)\
at com.rabbitmq.client.impl.ChannelN.open(ChannelN.java:136)\'a0\
at com.rabbitmq.client.impl.ChannelManager.createChannel(ChannelManager.java:176)\'a0\
at com.rabbitmq.client.impl.AMQConnection.createChannel(AMQConnection.java:559)\'a0\
at com.framelogic.rabbitmq.connection.RabbitMQConnectionImpl.lambda$getChannel$5$RabbitMQConnectionImpl(RabbitMQConnectionImpl.java:132)\'a0\
at com.framelogic.rabbitmq.connection.RabbitMQConnectionImpl$$Lambda$3.subscribe(Unknown Source)\'a0\
at io.reactivex.internal.operators.single.SingleCreate.subscribeActual(SingleCreate.java:39)\'a0\
at io.reactivex.Single.subscribe(Single.java:3310)\'a0\
at io.reactivex.internal.operators.single.SingleSubscribeOn$SubscribeOnObserver.run(SingleSubscribeOn.java:89)\'a0\
at io.reactivex.Scheduler$DisposeTask.run(Scheduler.java:579)\'a0\
at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:66)\'a0\
at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:57)\'a0\
at java.util.concurrent.FutureTask.run(FutureTask.java:234)\'a0\
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:153)\'a0\
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:267)\'a0\
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)\'a0\
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)\'a0\
at java.lang.Thread.run(Thread.java:841)\'a0\
Caused by: com.rabbitmq.client.MissedHeartbeatException: Heartbeat missing with heartbeat = 60 seconds\
at com.rabbitmq.client.impl.AMQConnection.handleSocketTimeout(AMQConnection.java:784)\
at com.rabbitmq.client.impl.AMQConnection.readFrame(AMQConnection.java:684)\
at com.rabbitmq.client.impl.AMQConnection.access$300(AMQConnection.java:48)\
at com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:603)\
at java.lang.Thread.run(Thread.java:841)\'a0\

最佳答案

解决方案:

实现全局 rx 错误处理程序 ( https://github.com/ReactiveX/RxJava/blob/2.x/docs/What's-different-in-2.0.md#error-handling )

 // If Java 8 lambdas are supported
RxJavaPlugins.setErrorHandler(e -> { });

// If no Retrolambda or Jack
RxJavaPlugins.setErrorHandler(Functions.<Throwable>emptyConsumer());

当然这并不能解决问题。如果我们忘记在某处实现 onError() 方法,这只会防止应用程序崩溃。

但是一切都比应用程序崩溃好:)

关于java - E/Android运行时: FATAL EXCEPTION: RxNewThreadScheduler-42,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51654913/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com