Persistent "NULL" upon startup on Android

70 views
Skip to first unread message

Vincent Weber

unread,
May 16, 2026, 7:10:28 AMMay 16
to Free42 & Plus42
It is a very minor issue, but I get it quite often. Sometimes (often, but not always) when I Ieave Plus42 for another app (yes, it happens once I while) and come back to it later on my Google Pixel fold 10 (latest Android), the App has a persistent"NULL" on top of the screen, as if I was holding a key (but I don't do that). Pressing any key immediately makes things back to normal, so it's no big deal at all, but it's strange, all the more that it is not systematic. I failed to see the real trigger of this small bug...

Thomas Okken

unread,
May 17, 2026, 1:51:37 AMMay 17
to Free42 & Plus42
If you are able to reproduce this problem, try reproducing it with the calculator in PRGM mode while you exit the app. It would be interesting to see which key is being pressed; that might provide a clue how the spurious keypresses are being generated.

Vincent Weber

unread,
May 17, 2026, 5:46:39 AMMay 17
to Free42 & Plus42
Thanks, I tested more and I think I found out what happens.
I do exit Plus42 by swiping with my thumb bottom-up. When I do so, sometimes I incidentally press the + key. As all happens very fast, when the app is suspended, it is still in a state where the key is pressed. Most often it has time to go into the "NULL" stage, but I also managed to get a "+" instead of "NULL" displayed on top. I guess the problem is that when the app is restored, it has not kept track of the fact that it was waiting for a key to be released, hence it does not release it...

Thomas Okken

unread,
May 19, 2026, 4:04:06 AMMay 19
to Free42 & Plus42
Event handling in Free42 and Plus42 works pretty much the same on all platforms, and this kind of behavior could theoretically happen on all of them. I have observed it in Windows once or twice, but it's extremely rare.

If the OS sends an app events after having suspended it, or if it interprets events as gestures while also sending them to the app, I'd consider those OS bugs, not bugs in the app.

Android appears to be a repeat offender in this regard. Events being delivered even after the app has been told to shut down are causing occasional crashes even now. I have added logic to the app's core to block handling of events post-shutdown, but I haven't yet been able to prevent these crashes entirely. It is difficult to implement workarounds for OS bugs when those bugs happen too rarely to be easily reproducible; the crash reports in the Google Play Developer Console are all I have to go on, and they don't always tell me enough.

Fortunately the crashes are quite rare. The drag gesture conflict is another matter, but fixing that is primarily Google's responsibility, there's really not much I can do about it as an app developer. There used to be a similar issue with the sideways swipe to switch between the calculator and print-out, in the iOS versions, which eventually went away when Apple improved the way the OS intercepts and handles those gestures. Maybe Google are going to improve gesture recognition, too, eventually, but when I tried implementing sideways swiping for the print-out in the Android version a few years ago, it was a disaster.

Vincent Weber

unread,
May 19, 2026, 4:11:37 AMMay 19
to Free42 & Plus42
Many thanks for the detailed answer. 
Yes I understand that it is the OS which doesn't behave properly. I was just thinking, no way to have a line upon the app being restored to active, saying something like "whatever key was pressed, just release it, and discard any event" ?
Anyway, very small matter. I have not experienced any crash lately, just this strange "+" or "NULL" upon startup...  
Reply all
Reply to author
Forward
0 new messages