Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android SDK crashing app after CSApp.close() called #14

Open
tannerpreiss opened this issue Jan 30, 2017 · 0 comments
Open

Android SDK crashing app after CSApp.close() called #14

tannerpreiss opened this issue Jan 30, 2017 · 0 comments

Comments

@tannerpreiss
Copy link

If I create a new CSApp:

CSApp csApp = new CSApp.Builder(this, host, port, token)
            .useSSL(useSSL)
            .build();

with bad parameters (like an incorrect port), then call csApp.close(), the SDK will still continuously try to make the connection and eventually crash with:

03-28 11:59:27.180 22476-23341/com.ibm.mil.controller E/AndroidRuntime: FATAL EXCEPTION: cucumber-buffer-handler
                                                                        Process: com.ibm.mil.controller, PID: 22476
                                                                        rx.exceptions.OnErrorFailedException: Error occurred when trying to propagate error to Observer.onError
                                                                            at rx.observers.SafeSubscriber._onError(SafeSubscriber.java:201)
                                                                            at rx.observers.SafeSubscriber.onError(SafeSubscriber.java:111)
                                                                            at rx.internal.operators.OperatorSubscribeOn$1$1$1.onError(OperatorSubscribeOn.java:71)
                                                                            at rx.internal.operators.OperatorMerge$MergeSubscriber.reportError(OperatorMerge.java:239)
                                                                            at rx.internal.operators.OperatorMerge$MergeSubscriber.checkTerminate(OperatorMerge.java:774)
                                                                            at rx.internal.operators.OperatorMerge$MergeSubscriber.emitLoop(OperatorMerge.java:532)
                                                                            at rx.internal.operators.OperatorMerge$MergeSubscriber.emit(OperatorMerge.java:521)
                                                                            at rx.internal.operators.OperatorMerge$MergeSubscriber.onError(OperatorMerge.java:249)
                                                                            at rx.internal.operators.OperatorMap$1.onError(OperatorMap.java:49)
                                                                            at rx.internal.operators.OperatorCast$1.onError(OperatorCast.java:44)
                                                                            at rx.internal.operators.NotificationLite.accept(NotificationLite.java:147)
                                                                            at rx.subjects.SubjectSubscriptionManager$SubjectObserver.emitNext(SubjectSubscriptionManager.java:254)
                                                                            at rx.subjects.BehaviorSubject.onError(BehaviorSubject.java:141)
                                                                            at com.ibm.csync.internals.Command.handleResponse(Command.java:51)
                                                                            at com.ibm.csync.internals.Cucumbers.lambda$new$13(Cucumbers.java:186)
                                                                            at com.ibm.csync.internals.Cucumbers.access$lambda$4(Cucumbers.java)
                                                                            at com.ibm.csync.internals.Cucumbers$$Lambda$5.run(Unknown Source)
                                                                            at java.lang.Thread.run(Thread.java:818)
                                                                         Caused by: rx.exceptions.CompositeException: 2 exceptions occurred. 
                                                                            at rx.observers.SafeSubscriber._onError(SafeSubscriber.java:201) 
                                                                            at rx.observers.SafeSubscriber.onError(SafeSubscriber.java:111) 
                                                                            at rx.internal.operators.OperatorSubscribeOn$1$1$1.onError(OperatorSubscribeOn.java:71) 
                                                                            at rx.internal.operators.OperatorMerge$MergeSubscriber.reportError(OperatorMerge.java:239) 
                                                                            at rx.internal.operators.OperatorMerge$MergeSubscriber.checkTerminate(OperatorMerge.java:774) 
                                                                            at rx.internal.operators.OperatorMerge$MergeSubscriber.emitLoop(OperatorMerge.java:532) 
                                                                            at rx.internal.operators.OperatorMerge$MergeSubscriber.emit(OperatorMerge.java:521) 
                                                                            at rx.internal.operators.OperatorMerge$MergeSubscriber.onError(OperatorMerge.java:249) 
                                                                            at rx.internal.operators.OperatorMap$1.onError(OperatorMap.java:49) 
                                                                            at rx.internal.operators.OperatorCast$1.onError(OperatorCast.java:44) 
                                                                            at rx.internal.operators.NotificationLite.accept(NotificationLite.java:147) 
                                                                            at rx.subjects.SubjectSubscriptionManager$SubjectObserver.emitNext(SubjectSubscriptionManager.java:254) 
                                                                            at rx.subjects.BehaviorSubject.onError(BehaviorSubject.java:141) 
                                                                            at com.ibm.csync.internals.Command.handleResponse(Command.java:51) 
                                                                            at com.ibm.csync.internals.Cucumbers.lambda$new$13(Cucumbers.java:186) 
                                                                            at com.ibm.csync.internals.Cucumbers.access$lambda$4(Cucumbers.java) 
                                                                            at com.ibm.csync.internals.Cucumbers$$Lambda$5.run(Unknown Source) 
                                                                            at java.lang.Thread.run(Thread.java:818) 
                                                                         Caused by: rx.exceptions.CompositeException$CompositeExceptionCausalChain: Chain of Causes for CompositeException In Order Received =>
                                                                            at android.util.Log.getStackTraceString(Log.java:330)
                                                                            at com.android.internal.os.RuntimeInit.Clog_e(RuntimeInit.java:59)
                                                                            at com.android.internal.os.RuntimeInit.access$200(RuntimeInit.java:43)
                                                                            at com.android.internal.os.RuntimeInit$UncaughtHandler.uncaughtException(RuntimeInit.java:85)
                                                                            at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:693)
                                                                            at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:690)
                                                                         Caused by: com.ibm.csync.internals.response.ResponseException
                                                                            at com.ibm.csync.internals.Command.handleResponse(Command.java:51)
                                                                            at com.ibm.csync.internals.Cucumbers.lambda$new$13(Cucumbers.java:186)
                                                                            at com.ibm.csync.internals.Cucumbers.access$lambda$4(Cucumbers.java)
                                                                            at com.ibm.csync.internals.Cucumbers$$Lambda$5.run(Unknown Source)
                                                                            at java.lang.Thread.run(Thread.java:818)
                                                                         Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'rx.Observable com.ibm.csync.internals.Cucumbers.getAcls()' on a null object reference
                                                                            at com.ibm.csync.CSApp.refreshAcls(CSApp.java:217)
                                                                            at com.ibm.csync.CSApp.lambda$refreshAcls$8(CSApp.java:221)
                                                                            at com.ibm.csync.CSApp.access$lambda$8(CSApp.java)
                                                                            at com.ibm.csync.CSApp$$Lambda$15.call(Unknown Source)
                                                                            at rx.Observable$28.onError(Observable.java:7583)
                                                                            at rx.observers.SafeSubscriber._onError(SafeSubscriber.java:154)
                                                                            at rx.observers.SafeSubscriber.onError(SafeSubscriber.java:111)
                                                                            at rx.internal.operators.OperatorSubscribeOn$1$1$1.onError(OperatorSubscribeOn.java:71)
                                                                            at rx.internal.operators.OperatorMerge$MergeSubscriber.reportError(OperatorMerge.java:239)
                                                                            at rx.internal.operators.OperatorMerge$MergeSubscriber.checkTerminate(OperatorMerge.java:774)
                                                                            at rx.internal.operators.OperatorMerge$MergeSubscriber.emitLoop(OperatorMerge.java:532)
                                                                            at rx.internal.operators.OperatorMerge$MergeSubscriber.emit(OperatorMerge.java:521)
                                                                            at rx.internal.operators.OperatorMerge$MergeSubscriber.onError(OperatorMerge.java:249)
                                                                            at rx.internal.operators.OperatorMap$1.onError(OperatorMap.java:49)
                                                                            at rx.internal.operators.OperatorCast$1.onError(OperatorCast.java:44)
                                                                            at rx.internal.operators.NotificationLite.accept(NotificationLite.java:147)
                                                                            at rx.subjects.SubjectSubscriptionManager$SubjectObserver.emitNext(SubjectSubscriptionManager.java:254)
                                                                        	at rx.subjects.BehaviorSubject.onError(Behavi

I think calling CSApp.close() should stop attempting to make the CSync connection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant