Project

General

Profile

Statistics
| Branch: | Revision:

library / src / main / java / org / distorted / library / message @ d23592bb

Name Size
EffectListener.java 2.69 KB
EffectMessageSender.java 5.59 KB

Latest revisions

# Date Author Comment
3a54358a 07/15/2022 01:45 AM Leszek Koltunski

license

c38f3d33 10/15/2021 01:07 PM Leszek Koltunski

Correction

9ef86c9f 09/15/2021 10:37 AM Leszek Koltunski

On second thought, come back to Vector. The problem: before we had the potentially blocking function 'effectFinished' inside our synchronized block.

2f40484b 09/15/2021 10:33 AM Leszek Koltunski

Improve EffectMessageSender: ArrayList with explicit locking in place of a Vector.

c337dd1c 09/14/2021 11:55 PM Leszek Koltunski

1) add missing call to BlockController.onPause() / onResume() to the Tutorial activity
2) rearrange BlockController's error reporting to make the case where the MessageSender thread has died separate
3) in such case, resurrect the thread
4) simplify and harden the EffectMessageSender

7d151b69 09/14/2021 05:31 PM Leszek Koltunski

More debugs to the EffectMessageSender.

43eecb4c 09/14/2021 04:17 PM Leszek Koltunski

Firebase shows that we have a problem when an app is rapidly restarted, i.e. when is it paused and resumes within tens of milliseconds. Then sometimes the EffectMessageSender thread dies.

Attempt to limit this by synchronizing the whole 'start' and 'stop' methods, although I suspect this will still happen because the very methods are probably in such case called in the wrong order.

188b3dc0 09/09/2021 11:56 PM Leszek Koltunski

Some more debugs for the case when the UI is blocked.

19e77994 05/07/2020 09:30 PM Leszek Koltunski

Fix for a crash when exiting an app:

Activity.onPause() -> MessageSender.stopSending sets mThis to null, then a last message gets sent and a crash in newMessage().

Fix this by

1) making the Message inner class static (so that we can create a new one without a reference to mThis)...

b7209ffe 05/04/2020 04:01 PM Leszek Koltunski

Simplify a bit the place where we got a crash once.

View revisions

Also available in: Atom