While I dont think this is a bug, it was one of the hardest things to debug.
Maybe it should be added to the tips section, or maybe there needs to be some kind of error catching.
This line:
B4X:
FolderPath = FolderPath.Replace(RootPath,"")
If RootPath = "", then this line creates an infinite loop, and the application dies ANR.
Maybe there should be a check if Target = Replacement, or atleast a runtime warning?
That is quite weird.
It is possible that it only happens on the emulator because its so slow!
I wrote that code a while a go, but since my router recently got fried, I was restricted to test on the emulator and I have only seen this behaviour on the emulator (running 2.2).
I added a Log command before and after that statement, and it does seem to stop at that exact statement. I dont see what should cause it to dwell on it too long, but maybe I can put it down to emulator(or 2.2) weirdness.