Closed Bug 748509 Opened 10 years ago Closed 10 years ago

selecting current tab stops rendering


(Firefox for Android Graveyard :: General, defect)

Not set


(firefox14 verified, blocking-fennec1.0 betaN+)

Firefox 15
Tracking Status
firefox14 --- verified
blocking-fennec1.0 --- betaN+


(Reporter: microrffr, Assigned: vlad)




(1 file)

1. open some page
2. open tabs tray
3. select current tab, returning you to the page

4a. pan the page
  expected: portion in viewport gets painted
  actual: white space in viewport
4b. pinch zoom in
  expected: sharp page
  actual: stays fuzzy
4c. tap or long-press a link, or double on a block
  expected: navigate, context menu, or zoom
  actual: no action

(do either 5a or 5b)
5a. open and close awesome screen
5b. rotate device

6. stuff in step 4 works fine now
Could you provide a specific URL on which you see this behaviour? Also, what build are you using, and what device?
sample url: (this page)
nightly 4/25 on Samsung Fascinate with MIUI 2.3.30, based on ICS 4.03
I can reproduce this on my Galaxy S 2 (GT-I9100, Android 2.3.3).
Confirmed, I'm able to reproduce this. gdb says gecko is stuck on this memset call:

(gdb) bt
#0  0xafd0d148 in memset () from /Users/kats/android/jdb/moz-gdb/lib/304D194C0955F59E/system/lib/
#1  0x4c91ceae in gfxImageSurface::gfxImageSurface (this=0x4978f970, size=..., format=gfxASurface::ImageFormatRGB24, aClear=true)
    at /Users/kats/zspace/mozilla-git/gfx/thebes/gfxImageSurface.cpp:143
#2  0x4be3ac3e in imgFrame::Init (this=0x48af47f0, aX=<optimized out>, aY=0, aWidth=170, aHeight=34, aFormat=gfxASurface::ImageFormatRGB24, aPaletteDepth=0 '\000')
    at /Users/kats/zspace/mozilla-git/image/src/imgFrame.cpp:224
#3  0x4be36d24 in mozilla::image::RasterImage::InternalAddFrame (this=0x4e9319d0, framenum=0, aX=0, aY=0, aWidth=170, aHeight=34, aFormat=gfxASurface::ImageFormatRGB24, 
    aPaletteDepth=0 '\000', imageData=0x492c6040, imageLength=0x471de59c, paletteData=0x0, paletteLength=0x0)
    at /Users/kats/zspace/mozilla-git/image/src/RasterImage.cpp:1083
#4  0x4be36ff4 in mozilla::image::RasterImage::EnsureFrame (this=0x4e9319d0, aFrameNum=0, aX=<optimized out>, aY=<optimized out>, aWidth=170, aHeight=34, 
    aFormat=gfxASurface::ImageFormatRGB24, aPaletteDepth=0 '\000', imageData=0x492c6040, imageLength=0x471de59c, paletteData=0x0, paletteLength=0x0)
    at /Users/kats/zspace/mozilla-git/image/src/RasterImage.cpp:1221
#5  0x4be37062 in mozilla::image::RasterImage::EnsureFrame (this=0x5018f000, aFramenum=0, aX=19728, aY=0, aWidth=170, aHeight=34, aFormat=gfxASurface::ImageFormatRGB24, 
    imageData=0x492c6040, imageLength=0x471de59c) at /Users/kats/zspace/mozilla-git/image/src/RasterImage.cpp:1233
#6  0x4be4bca8 in mozilla::image::nsGIFDecoder2::BeginImageFrame (this=0x492c6000, aDepth=48297) at /Users/kats/zspace/mozilla-git/image/decoders/nsGIFDecoder2.cpp:229
#7  0x4be4c12e in mozilla::image::nsGIFDecoder2::WriteInternal (this=0x492c6000, aBuffer=<optimized out>, aCount=<optimized out>)
    at /Users/kats/zspace/mozilla-git/image/decoders/nsGIFDecoder2.cpp:957
#8  0x4be2fea4 in mozilla::image::Decoder::Write (this=0x492c6000, aBuffer=0x4e539c08 "GIF89a\252", aCount=824)
    at /Users/kats/zspace/mozilla-git/image/src/Decoder.cpp:112
#9  0x4be326f4 in mozilla::image::RasterImage::WriteToDecoder (this=0x4e9319d0, aBuffer=0x4e539c08 "GIF89a\252", aCount=824)
    at /Users/kats/zspace/mozilla-git/image/src/RasterImage.cpp:2390
#10 0x4be32fb4 in mozilla::image::RasterImage::SyncDecode (this=0x4e9319d0) at /Users/kats/zspace/mozilla-git/image/src/RasterImage.cpp:2539
#11 0x4be33208 in mozilla::image::RasterImage::RequestDecode (this=0x4e9319d0) at /Users/kats/zspace/mozilla-git/image/src/RasterImage.cpp:2491
#12 0x4be32302 in mozilla::image::imgDecodeRequestor::Run (this=<optimized out>) at /Users/kats/zspace/mozilla-git/image/src/RasterImage.h:725
#13 0x4c8bca78 in nsThread::ProcessNextEvent (this=0x49cb10f0, mayWait=<optimized out>, result=0x471de727)
    at /Users/kats/zspace/mozilla-git/xpcom/threads/nsThread.cpp:656
#14 0x4c8869d0 in NS_ProcessNextEvent_P (thread=0x5018f000, mayWait=false) at /Users/kats/zspace/mozilla-git/obj-android-debug/xpcom/build/nsThreadUtils.cpp:245
#15 0x4c7cf55c in mozilla::ipc::MessagePump::Run (this=0x49cb3220, aDelegate=0x49cd80e0) at /Users/kats/zspace/mozilla-git/ipc/glue/MessagePump.cpp:114
#16 0x4c8ee7d2 in MessageLoop::RunInternal (this=0x49cd80e0) at /Users/kats/zspace/mozilla-git/ipc/chromium/src/base/
#17 0x4c8ee832 in RunHandler (this=<optimized out>) at /Users/kats/zspace/mozilla-git/ipc/chromium/src/base/
#18 MessageLoop::Run (this=0x49cd80e0) at /Users/kats/zspace/mozilla-git/ipc/chromium/src/base/
#19 0x4c721cea in nsBaseAppShell::Run (this=0x488303e0) at /Users/kats/zspace/mozilla-git/widget/xpwidgets/nsBaseAppShell.cpp:196
#20 0x4c5dda48 in nsAppStartup::Run (this=0x48acb370) at /Users/kats/zspace/mozilla-git/toolkit/components/startup/nsAppStartup.cpp:295
#21 0x4bd12f10 in XREMain::XRE_mainRun (this=0x471de9cc) at /Users/kats/zspace/mozilla-git/toolkit/xre/nsAppRunner.cpp:3792
#22 0x4bd155bc in XREMain::XRE_main (this=0x471de9cc, argc=<optimized out>, argv=<optimized out>, aAppData=0x8082da2c)
    at /Users/kats/zspace/mozilla-git/toolkit/xre/nsAppRunner.cpp:3869
#23 0x4bd15736 in XRE_main (argc=7, argv=0x49cbf048, aAppData=0x8082da2c) at /Users/kats/zspace/mozilla-git/toolkit/xre/nsAppRunner.cpp:3945
#24 0x4bd1a40a in GeckoStart (data=0x2fbce0, appData=0x8082da2c) at /Users/kats/zspace/mozilla-git/toolkit/xre/nsAndroidStartup.cpp:109
#25 0x80815aea in Java_org_mozilla_gecko_GeckoAppShell_nativeRun (jenv=0x16d590, jc=<optimized out>, jargs=0x4073a470)
    at /Users/kats/zspace/mozilla-git/mozglue/android/APKOpen.cpp:998
#26 0xaca11eb8 in dvmPlatformInvoke () from /Users/kats/android/jdb/moz-gdb/lib/304D194C0955F59E/system/lib/
#27 0xaca4386e in dvmCallJNIMethod_general () from /Users/kats/android/jdb/moz-gdb/lib/304D194C0955F59E/system/lib/
#28 0xaca48ff0 in dvmResolveNativeMethod () from /Users/kats/android/jdb/moz-gdb/lib/304D194C0955F59E/system/lib/
#29 0xaca170b8 in dvmJitToInterpNoChain () from /Users/kats/android/jdb/moz-gdb/lib/304D194C0955F59E/system/lib/
#30 0xaca170b8 in dvmJitToInterpNoChain () from /Users/kats/android/jdb/moz-gdb/lib/304D194C0955F59E/system/lib/
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

even though the values seem pretty sane:

#1  0x4c91ceae in gfxImageSurface::gfxImageSurface (this=0x4978f970, size=..., format=gfxASurface::ImageFormatRGB24, aClear=true)
    at /Users/kats/zspace/mozilla-git/gfx/thebes/gfxImageSurface.cpp:143
143	            memset(mData, 0, mSize.height * mStride);
(gdb) print mSize
$1 = {<mozilla::gfx::BaseSize<int, nsIntSize>> = {width = 170, height = 34}, <No data fields>}
(gdb) print mSize.height
$2 = 34
(gdb) print mStride
$3 = 680
(gdb) print mData
$4 = (unsigned char *) 0x5018f000 ""
blocking-fennec1.0: --- → ?
Ever confirmed: true
Assignee: nobody → vladimir
blocking-fennec1.0: ? → betaN+
[Approval Request Comment]
Bug caused by (feature/regressing bug #): 
User impact if declined: 
Testing completed (on m-c, etc.): 
Risk to taking this patch (and alternatives if risky): 
String or UUID changes made by this patch: 

So the core issue here is that changing selectedTab was always calling displayedDocumentChanged, which set isFirstPaint to true -- which was being checked by isBrowserContentDocumentDisplayed and was causing viewport updates to be ignored.  We're never seeing Gecko set thisback to false though.

This patch works and is correct, but we should figure out why setting isFirstPaint to true on an existing/visible page doesn't cause it to ever be set to false (if it's even supposed to?).

Aggressively requesting a+ for aurora as well at the same time...
Attachment #626196 - Flags: review?(mark.finkle)
Attachment #626196 - Flags: review?(blassey.bugs)
Attachment #626196 - Flags: approval-mozilla-aurora?
Attachment #626196 - Flags: review?(blassey.bugs) → review+
On inbound as d043b5b18647
Attachment #626196 - Flags: review?(mark.finkle) → review+
Comment on attachment 626196 [details] [diff] [review]
don't do tab-switch work when we don't actually switch

This patch is low-risk and a good correctness fix.
Attachment #626196 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
On aurora as 439f333274ee
Closed: 10 years ago
Resolution: --- → FIXED
Marking as fixed since its landed on aurora as per #8.

Bugs landed on inbound are normally left open until the merge to mozilla-central has been completed. Also, please can you set the target milestone when landing on inbound. Thanks :-)
Target Milestone: --- → Firefox 15
this is fixed in the latest Nightly, built from
Verified fixed on Aurora 14.0a2 (2012-05-24)
                  Beta 14.0b3
Blocks: 757327
No longer blocks: 757327
Duplicate of this bug: 757327
Duplicate of this bug: 753049
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.