Skip to content
This repository has been archived by the owner on May 2, 2021. It is now read-only.

Truncated log bug: Writing to log stops, while UI keeps updating #19

Open
tjanson opened this issue Mar 17, 2015 · 1 comment
Open

Truncated log bug: Writing to log stops, while UI keeps updating #19

tjanson opened this issue Mar 17, 2015 · 1 comment

Comments

@tjanson
Copy link
Owner

tjanson commented Mar 17, 2015

Okay, it seems I was wrong all along: I had suspected that either the Wifi scan code, or the background behaviour (wake-lock etc.) were the root of “incomplete” log bugs of any kind (#9 and #1), and I had been looking for bugs in that direction.

Adorfer and Frief had reported incomplete logs in the forums. There’s an important detail here, that I had so far overlooked: At least in Adorfer’s case, the app (UI) kept running and in fact updating with plausible values – in other words, the Wifi scanning was working fine! It was the logging itself that stopped.

The same bug was reported by @mmalte today. Note that the following are the final lines of the trace log, and that wifilog.csv stopped at the exact same time:

2015-03-17 17:02:09,084 [main] INFO  c.t.wifilocationlogger.MainActivity - Enabled logging to disk
2015-03-17 17:02:09,085 [main] INFO  c.t.wifilocationlogger.MainActivity - SessionID for remote logging: 614558ff-0ec2-4385-a69f-0be4cbaed762
2015-03-17 17:02:09,087 [main] DEBUG c.t.wifilocationlogger.MainActivity - Acquired wake-lock
2015-03-17 17:04:16,766 [main] DEBUG c.t.wifilocationlogger.MainActivity - onPause called, but logging to file; we'll keep going
2015-03-17 17:04:16,771 [main] TRACE c.t.wifilocationlogger.MainActivity - GoogleApiClient disconnected
2015-03-17 17:04:16,804 [main] TRACE c.t.wifilocationlogger.MainActivity - Unregistered WifiBroadcastReceiver

The last two lines match onDestroy being called.

My interpretation: For some reason the Activity was destroyed (without onStop!?) and recreated, with no noticable interruption. Wifi scans and GPS updates all kept going, the only thing that stopped (unfortunately) was the log.

@tjanson
Copy link
Owner Author

tjanson commented Mar 17, 2015

Bug is apparently triggered by display rotation.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant