hhanh00 / zwallet

Zcash and Ycash light shielded wallet
https://ywallet.app
MIT License
42 stars 20 forks source link

App hangs if quit during rescan #124

Open rex4539 opened 8 months ago

rex4539 commented 8 months ago

Subject of the issue

The app hangs if quit during rescan and brings the whole OS down to a halt.

Your environment

Steps to reproduce

  1. Start a rescan.
  2. During the rescan, quit the app.

Expected behaviour

Rescan is paused. App is quit.

Actual behaviour

App hangs and brings the whole OS a halt. Had to force restart it as nothing was responsive for over 5 minutes of waiting.

hhanh00 commented 8 months ago

AFAIK, Flutter does not give a way to cancel native threads.

hhanh00 commented 8 months ago

The updated version has a graceful shutdown. It is not immediate but the app should exit after a few seconds.

rex4539 commented 8 months ago

No change with latest build from 5 hours ago.

App hangs indefinitely if you quit during rescan.

100% reproducible.

hhanh00 commented 8 months ago

https://github.com/hhanh00/zwallet/assets/222239/15f6488f-d82f-48cb-9c06-7e3528b66502

rex4539 commented 8 months ago

ok, so it takes 2,5 minutes here. You said "a few seconds" so I never waited 2,5 minutes before to see what happens.

Still unacceptable though. 2,5 minutes to quit an app is too long.

Also notice the UI bug about the PAUSED process.

https://github.com/hhanh00/zwallet/assets/227442/61c26335-1f75-4a06-ab60-f98dec4b9666

hhanh00 commented 8 months ago

https://github.com/hhanh00/zwallet/assets/222239/866bbf4f-75c0-494e-ace2-668107193069

Still unacceptable though. 2,5 minutes to quit an app is too long.

Well, it processes the final chunk for a graceful exit. If it is "unacceptable", then force quit at your own risk or use another wallet.