couchbaselabs/ToDoLite-Android

NullPointerException when showing toast message

borrrden opened this issue · 2 comments

The result is a message just saying "timeout:"

09-02 18:58:02.288 12974 13365 E Sync    : Exception calling changeListener.changed
09-02 18:58:02.288 12974 13365 E Sync    : java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.Throwable.getMessage()' on a null object reference
09-02 18:58:02.288 12974 13365 E Sync    :     at com.couchbase.todolite.Application.changed(Application.java:223)
09-02 18:58:02.288 12974 13365 E Sync    :     at com.couchbase.lite.replicator.Replication.changed(Replication.java:425)
09-02 18:58:02.288 12974 13365 E Sync    :     at com.couchbase.lite.replicator.ReplicationInternal$13.run(ReplicationInternal.java:1262)
09-02 18:58:02.288 12974 13365 E Sync    :     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428)
09-02 18:58:02.288 12974 13365 E Sync    :     at java.util.concurrent.FutureTask.run(FutureTask.java:237)
09-02 18:58:02.288 12974 13365 E Sync    :     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:272)
09-02 18:58:02.288 12974 13365 E Sync    :     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
09-02 18:58:02.288 12974 13365 E Sync    :     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
09-02 18:58:02.288 12974 13365 E Sync    :     at java.lang.Thread.run(Thread.java:761)

We should check if error is null.

pasin commented

Fixed.