Closed Bug 791364 Opened 8 years ago Closed 8 years ago

Using <canvas> instead of <img> on Gaia homescreen make the homescreen crashy.

Categories

(Core :: Graphics: Layers, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla18
blocking-basecamp +

People

(Reporter: vingtetun, Assigned: cjones)

Details

Attachments

(1 file)

Gaia PR https://github.com/mozilla-b2g/gaia/pull/4283 will replace <img> by <canvas> for the homescreen and as a si

Steps to reproduce:
 - Use https://github.com/mozilla-b2g/gaia/pull/4283 or wait for it to land
 - Launch the homescreen and pan for a little while between 2 pages
 
Actual result:
 - The homescreen will crash

Expected result:
 - The homescreen does not crash

cjones ask me to run: watch -n 1 'adb shell procrank | egrep "(RAM|b2g)"'  so I can see the free memory going down while panning.
The gaia system app uses canvas, so setting this to block.  (Leaking will lead to whole-system crash, not just benign app restart.)

Kan-Ru, can you look at this?
blocking-basecamp: --- → +
Component: Canvas: 2D → Graphics: Layers
Assigning to Kan-Ru for now.
Assignee: nobody → kchen
Guys, we *really* should have fixed this bug before merging the new homescreen code.
I think I see the problem here.
Assignee: kchen → jones.chris.g
Comment on attachment 661981 [details] [diff] [review]
Free canvas front buffers that are surface descriptors

I know the code pretty well and this is a pretty obvious bug. Want to move     mFrontBufferDescriptor = SurfaceDescriptor(); below the if? If its needed, it should be there. Up to you.
Attachment #661981 - Flags: review?(roc) → review+
    mAllocator->DestroySharedSurface(&mFrontBufferDescriptor);

clears out the surface.
https://hg.mozilla.org/mozilla-central/rev/c93a69c6d2da
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla18
You need to log in before you can comment on or make changes to this bug.