saintbyte / openbmap

Automatically exported from code.google.com/p/openbmap
Other
1 stars 1 forks source link

Crash when no cell info is available #65

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Start logging.
2. Move into an area with no cell coverage.
Loss of cell coverage can be provoked e.g. by going into an underground garage, 
or by moving into a 2G-only area with the phone set to use only 3G networks, or 
possibly by going into airplane mode.

What is the expected output? What do you see instead?
I would expect Radiobeacon to continue running but not log any new cells. 
Instead Radiobeacon crashes. Restarting Radiobeacon and trying to resume 
logging will result in further crashes as long as the phone has not picked up a 
network again.

What version of the product are you using? On what operating system?
Version 0.7.9 (e569140) on Cyanogenmod 11 M9

Please provide any additional information below.
I encountered this issue while driving through a rural area. I noticed that the 
phone suddenly prompted me for my PIN, which indicates a hiccup in the RIL. I 
restarted Radiobeacon and resumed logging before the phone had reconnected to 
the network, which caused further crashes. After I had picked up a network 
again, things went back to normal.

I've been plagued by the same in SatStat and resolved it as follows:
https://github.com/mvglasow/satstat/commit/d226e022dc6f81b9bf9ca06cddecdf0816394
82e

Original issue reported on code.google.com by mich...@vonglasow.com on 7 Sep 2014 at 12:07

GoogleCodeExporter commented 9 years ago
This is strange, as we had this issue before (see 
https://code.google.com/p/openbmap/issues/detail?id=1): Before saving the cell 
info, the string lenght is already checked (same way as in SatStat)

r9b28c3c5da40 adds another check for TelephonyManager.getNetworkOperatorName
Let's see whether this helps..

Original comment by wish7code on 7 Sep 2014 at 1:45