Open GoogleCodeExporter opened 9 years ago
Did this really only start with 0.12? The block store code has not changed for
a long time.
What I think this means is, somehow the app is still running in another
process. I thought Android would not do this - if there was a process for the
app, it would always be reused. But perhaps in some cases, the OS now spins up
two processes for the same app, perhaps if one is hung or in the process of
shutting down. You do shut down BlockStore when the service is terminating,
right?
But basically this means "we cannot start right now, because another copy of
the app might be using the block store file". Handling this automatically
inside bitcoinj might be possible but it's not ideal because on other platforms
the right thing to do here is often to tell the user "The app is already
running, sorry" or to send a message to the running app saying "bring yourself
to the front" etc.
Original comment by mh.in.en...@gmail.com
on 20 Oct 2014 at 11:49
Sorry, it's not new to 0.12. Yes I do "blockStore.close();"
Original comment by andreas....@gmail.com
on 20 Oct 2014 at 12:07
For now, you could try catching the exception, sleeping for a second, and then
indeed trying to open the block store again. See if that makes the exceptions
go away. Give up after one or two attempts though.
Original comment by mh.in.en...@gmail.com
on 20 Oct 2014 at 1:00
Original issue reported on code.google.com by
andreas....@gmail.com
on 19 Oct 2014 at 9:03