Skip to content

Deleting shared category and linked product causes friend's application to crash #111

@bugy

Description

@bugy

Steps to reproduce:

  1. Created shared list for User1 and User2
  2. Create a category and linked product (check it's synchronized)
  3. Logout User1
  4. Delete the category and the product (from User2)
  5. Login User1

Result (sometimes): application crash and exception:
STACK_TRACE=java.lang.RuntimeException: Attempt to invoke virtual method 'java.util.Date net.buggy.shoplist.model.EntitySynchronizationRecord.getLastChangeDate()' on a null object reference
at net.buggy.shoplist.ShopListActivity$1$2.run(ShopListActivity.java:150)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5290)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:908)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:703)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.util.Date net.buggy.shoplist.model.EntitySynchronizationRecord.getLastChangeDate()' on a null object reference
at net.buggy.shoplist.sharing.ProductSynchronizer.updateServerEntity(ProductSynchronizer.java:115)
at net.buggy.shoplist.sharing.ProductSynchronizer.updateServerEntity(ProductSynchronizer.java:101)
at net.buggy.shoplist.sharing.ProductSynchronizer.updateServerEntity(ProductSynchronizer.java:32)
at net.buggy.shoplist.sharing.FirebaseSynchronizer$6$1.run(FirebaseSynchronizer.java:584)
at net.buggy.shoplist.utils.ExecutorServiceMonitoringDecorator$MonitoredTask.call(ExecutorServiceMonitoringDecorator.java:167)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
java.lang.NullPointerException: Attempt to invoke virtual method 'java.util.Date net.buggy.shoplist.model.EntitySynchronizationRecord.getLastChangeDate()' on a null object reference
at net.buggy.shoplist.sharing.ProductSynchronizer.updateServerEntity(ProductSynchronizer.java:115)
at net.buggy.shoplist.sharing.ProductSynchronizer.updateServerEntity(ProductSynchronizer.java:101)
at net.buggy.shoplist.sharing.ProductSynchronizer.updateServerEntity(ProductSynchronizer.java:32)
at net.buggy.shoplist.sharing.FirebaseSynchronizer$6$1.run(FirebaseSynchronizer.java:584)
at net.buggy.shoplist.utils.ExecutorServiceMonitoringDecorator$MonitoredTask.call(ExecutorServiceMonitoringDecorator.java:167)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions