Closed Bug 699716 Opened 11 years ago Closed 11 years ago

Incorrect screenshot shown when starting up after clearing app data


(Firefox for Android Graveyard :: General, defect, P2)



(firefox11 verified, fennec11+)

Tracking Status
firefox11 --- verified
fennec 11+ ---


(Reporter: lmandel, Assigned: blassey)



(Keywords: privacy)


(1 file)

When starting up Fennec after clearing the application data the previous screenshot is shown. After Fennec loads the page refreshes to the about:home page.

Steps to reproduce:
1. Launch Fennec.
2. Open a page, like
3. Exit Fennec.
4. Open Menu->Settings->Applications->Manage applications->Nightly and click Force stop.
5. Launch Fennec and confirm that the screenshot is of and that after the browser finishes loading loads.
6. Exit Fennec.
7. Open Menu->Settings->Applications->Manage applications->Nightly and click Force stop and then click Clear data.
8. Launch Fennec. The screenshot is shown. When the browser finishes loading about:home loads.

Expected result:
After clearing the data for the application the screenshot should be of about:home instead of the last page that I visited.

Actual result:
The screenshot of the last visited page remains and provides a confusing experience as the screenshot and page loaded do not match.
This is because lastScreen.png is sitting in the root of /sdcard outside of the users data. Should lastScreen.png be copied to the active user profile?
OS: Mac OS X → Android
Hardware: x86 → ARM
Keywords: privacy
Assignee: nobody → doug.turner
Priority: -- → P2
Attached patch patchSplinter Review
Assignee: doug.turner → blassey.bugs
Attachment #572710 - Flags: review?(mark.finkle)
Attachment #572710 - Flags: review?(mark.finkle) → review+
Duplicate of this bug: 701043
Landed as
Closed: 11 years ago
Resolution: --- → FIXED
Using the cache dir might not be a good idea. I actually tried such approach long time ago when was working on this stuff, and found that in some conditions the cache gets cleared so often, that our screenshot is not available on the next run. I actually spent quite some time trying to understand why this might happen (Doug even got angry about the delay :)). It happened not every time, but on the most runs. Might depend on a specific device. I tried this on Nexus One, which didn't have too much storage space - that was probably the reason for the frequent cache cleanup.

So, in short: we need to test this thoroughly on the low-end devices, especially those with small storage.
If we're in a situation where the OS is throwing out caches to free up disk space, then we should probably live without the cached screen shot.
(In reply to Brad Lassey [:blassey] from comment #6)
> If we're in a situation where the OS is throwing out caches to free up disk
> space, then we should probably live without the cached screen shot.

Agree. But if the image is stored on a SD card, it's much less probable to get into this situation, and much easier to fix for the user.

Now the screenshot feature is already affected: seems like such cleanup is the cause of the bug 701686.
tracking-fennec: --- → 11+
Verified fixed on:
Nightly 13.0a1 (2012-02-21)
Beta 11.0 (20120221151724)
Device: Samsung Galaxy SII (Android 2.3.4)
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.