Some things I had wanted to mention:
Prior to build 013, VMNotifier still had a bug where the notifications may occur immediately and without waiting. I believe the bug is due to a race condition, and the attempted fix is introducing a slight delay. I like the irony in possible solutions to races – delaying one side.
I am reminded of a MASH episode where bomb defusing instructions are read aloud to Hawkeye while he intently focuses on the bomb underneath his skilled hands. The scene proceeds something like this:
“Cut the blue wire …”
“but only if the red wire connects to …”
Fixing VMNotifier required learning a modest amount about android threads, and all along the way, I felt as though I was reading bomb defusing instructions. The documentation writers keep suggesting the most common solutions to programming problems, and every time I follow the lead, I realize some additional note or fine print which explains why it may not suffice and what to try next. I am finally confident VMNotifier works as intended and have removed all previous builds.
Sometimes thread debugging seems easier to just try this or that, which often fails. Then again, live debugging is no picnic, but cest la vie as they say. Here is the next debugging attempt for VMNotifier.
Who knew threads could be so dangerous? I think I have investigated every possible path to finally fix VMNotifier. Here’s hoping…