android
android copied to clipboard
Rapid Change in Screen Orientation May Result in Irreversible Code Loss
I am still learning Python and Safe, but I ran into this weird bug right now. I was experiencing several 'server disconnected' notifications (this resulted in a frozen slider), which I attributed to idling while reading up on the code for the examples, ... To reconnect again I would click on the run or evaluate button. However, on one such occasion, after clicking, it cleared the example input and the output was also left blank.
I don't know if this has anything to do with this bug, but a bit earlier, the app had crashed while attempting to plot a simple graph example.
As I was discovering two other bugs (can't select, copy or paste code, and the permalink sharing feature is broken because the browser only shows JSON output from the query; I will file them separately), I may have stumbled on the cause. It seems that rotating the screen causes the editor to blank out.
I don't know if this is linked to #64 or #66. I will try to dig deeper when I'm on a desktop.
I was able to replicate the bug by rapidly changing screen orientation... but it doesn't always happen (I'd say it's around a 40% chance of being replicated, so you have to try several times), I've yet to try with other examples, but for this case, I'll be working on the Taylor Series example.
The steps are as follows:
- Open the Taylor series example
- You may optionally run the code so as to get the plotted graph.
- Place the text cursor preferably on a position that highlights some code (after a closing parenthesis sign). This causes your Android's keyboard to popup.
- Flip your phone from vertical to horizontal position and then to vertical again in a quick manner (the time needed for this is around 1 second, tops).
- If you're presented with a blank text area, you have successfully replicated the bug.
- I just discovered that your code may not be lost, unless you're that kind of particular person that hits the run button in hopes that everything gets back to normal.
- If you didn't hit the run button, you may recover by changing screen orientation again, or exiting and entering again.
As is reported in Bug #82, the only way to recover is, so far, to uninstall and reinstall again.
So please be careful!