Closed
Bug 754233
Opened 13 years ago
Closed 13 years ago
Tab unresponsive on double-tap zoom
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(firefox14 verified, firefox15 verified, blocking-fennec1.0 +)
VERIFIED
FIXED
Firefox 15
People
(Reporter: valentin, Assigned: BenWa)
References
Details
(Whiteboard: [battery-killer] [testday-20120518])
Attachments
(2 files, 5 obsolete files)
2.61 MB,
text/plain
|
Details | |
15.30 KB,
patch
|
BenWa
:
review+
joe
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
Version: Aurora 14.0a2 (10.05.2012 build)
Android version: 4.0.4 Cyanogen Mod 9 (04.05.2012 build)
Phone type: Samsung Galaxy S2
What I did:
Visited following webpage:
http://www.geek.com/articles/gadgets/students-create-a-watch-perception-time-20120510/
Waited for page to load.
Double-tap on text. Tab froze. Tried to get it to work properly. Failed.
What happened:
After I double-tapped the text, the webpage froze. I was unable to pan, zoom, or click anything. Reloading the page, only shows a black screen.
The tab would recover only if I killed the process and opened the page again.
What should have happened:
Should be able to pan, zoom, and click stuff after the double tap.
Should be able to reload page and have it in working order again.
Link to video:
https://picasaweb.google.com/lh/photo/ThKRMNF8Ng0f49Vk5hsmu5G5gDMRPWRAkTl9M47DkcQ?feat=directlink
Attached adb logs
Comment 1•13 years ago
|
||
I can reproduce this on a Galaxy Nexus.
Status: UNCONFIRMED → NEW
blocking-fennec1.0: --- → ?
Ever confirmed: true
Comment 2•13 years ago
|
||
This loop in TiledThebesLayerOGL::RenderLayer goes into an infinite loop:
for (size_t x = visibleRect.x; x < visibleRect.x + visibleRect.width;) {
initial values:
visibleRect.x = -14
visibleRect.width = 9
Assignee | ||
Comment 3•13 years ago
|
||
+1 for release blocker. I'll look into this.
Assignee: nobody → bgirard
Updated•13 years ago
|
Whiteboard: [battery-killer]
Updated•13 years ago
|
blocking-fennec1.0: ? → +
Comment 4•13 years ago
|
||
I also can reproduce this on HTC Android Incredible (ADR6300) running Gingerbread 2.3.4.
Assignee | ||
Comment 5•13 years ago
|
||
Attachment #624538 -
Flags: review?(ajuma)
Assignee | ||
Comment 6•13 years ago
|
||
Attachment #624538 -
Attachment is obsolete: true
Attachment #624538 -
Flags: review?(ajuma)
Attachment #624540 -
Flags: review?(ajuma)
Assignee | ||
Comment 8•13 years ago
|
||
Attachment #624540 -
Attachment is obsolete: true
Attachment #624540 -
Flags: review?(ajuma)
Attachment #624569 -
Flags: review?(ajuma)
Comment 9•13 years ago
|
||
Comment on attachment 624569 [details] [diff] [review]
Handle negative tiled layer positions (fix tile boundary bug)
Review of attachment 624569 [details] [diff] [review]:
-----------------------------------------------------------------
::: gfx/layers/TiledLayerBuffer.h
@@ +107,5 @@
> mLastPaintRegion = aLastPaintRegion;
> }
>
> + // Given a position i, this function returns the position inside the current tile.
> + int GetTileStart(int i) const { return (i >= 0) ? (i % GetTileLength()) : ((GetTileLength() - (-i % GetTileLength())) % 256); }
Use GetTileLength() instead of 256.
@@ +156,5 @@
> */
> virtual void PaintedTiledLayerBuffer(const BasicTiledLayerBuffer* aTiledBuffer) = 0;
> };
>
> +static int floor_div(int a, int b)
It'd be nice to have some documentation or a reference for the algorithm.
@@ +163,5 @@
> + int div = a/b;
> + if (!rem)
> + a = b;
> + int sub = a ^ b;
> + sub >>= 31;
This assumes that ints are 32 bits. We should make this more portable and use 8*sizeof(int)-1 instead (or just use int32_t everywhere instead of int).
@@ +307,5 @@
> // of no use and can be recycled.
> // We also know that any place holder tile in the new buffer must be
> // allocated.
> tileX = 0;
> + printf_stderr("Update %i, %i, %i, %i\n", newBound.x, newBound.y, newBound.width, newBound.height);
This should be #ifdef GFX_TILEDLAYER_PREF_WARNINGS.
@@ +363,5 @@
> nsIntPoint tileOrigin(tileStartX, tileStartY);
> newTile = AsDerived().ValidateTile(newTile, nsIntPoint(tileStartX, tileStartY),
> tileDrawRegion);
> NS_ABORT_IF_FALSE(!IsPlaceholder(newTile), "index out of range");
> +printf_stderr("Sotre Validate tile %i, %i -> %i\n", tileStartX, tileStartY, index);
#ifdef GFX_TILEDLAYER_PREF_WARNINGS
::: gfx/layers/basic/BasicTiledThebesLayer.cpp
@@ +135,5 @@
> const nsIntPoint& aTileOrigin,
> const nsIntRect& aDirtyRect)
> {
> if (aTile == GetPlaceholderTile()) {
> + printf_stderr("Validate tile %i, %i\n", aTileOrigin.x, aTileOrigin.y);
#ifdef GFX_TILEDLAYER_PREF_WARNINGS
::: gfx/layers/opengl/ReusableTileStoreOGL.cpp
@@ +277,5 @@
> + int32_t tileStartY;
> + if (tile->mTileOrigin.x >= 0) {
> + tileStartX = tile->mTileOrigin.x % tile->mTileSize;
> + } else {
> + tileStartX = tile->mTileSize - (-tile->mTileOrigin.x % tile->mTileSize);
Need to mod the result by tile->mTileSize (e.g. consider what happens when tile->mTileOrigin.x is -tile->mTileSize).
@@ +282,5 @@
> + }
> + if (tile->mTileOrigin.y >= 0) {
> + tileStartY = tile->mTileOrigin.y % tile->mTileSize;
> + } else {
> + tileStartY = tile->mTileSize - (-tile->mTileOrigin.y % tile->mTileSize);
Mod the result by tile->mTileSize.
::: gfx/layers/opengl/TiledThebesLayerOGL.cpp
@@ +243,2 @@
> rowCount++;
> + printf("x=%i, visibleRect.x=%i, visibleRect.width=%i\n", x, visibleRect.x, visibleRect.width);
#ifdef GFX_TILEDLAYER_PREF_WARNINGS
Attachment #624569 -
Flags: review?(ajuma) → review+
Assignee | ||
Comment 10•13 years ago
|
||
Carry forward r=ajuma
Attachment #624569 -
Attachment is obsolete: true
Attachment #624750 -
Flags: review+
Comment 11•13 years ago
|
||
Attachment #624750 -
Attachment is obsolete: true
Attachment #624837 -
Flags: review?(ajuma)
Comment 12•13 years ago
|
||
Comment on attachment 624837 [details] [diff] [review]
Updated patch with more floor_div calls to avoid crashing
Review of attachment 624837 [details] [diff] [review]:
-----------------------------------------------------------------
::: gfx/layers/TiledLayerBuffer.h
@@ +172,5 @@
> + // If the signs are different substract 1.
> + int sub;
> + sub = a ^ b;
> + // The results of this shift is either 0 or -1.
> + sub >>= 31;
I still don't like using 31 here (unless we use int32_t instead of int).
Attachment #624837 -
Flags: review?(ajuma) → review+
Assignee | ||
Comment 13•13 years ago
|
||
r=ajuma
Attachment #624837 -
Attachment is obsolete: true
Attachment #624847 -
Flags: review+
Assignee | ||
Comment 14•13 years ago
|
||
Comment 15•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → Firefox 15
Updated•13 years ago
|
status-firefox14:
--- → affected
Comment 16•13 years ago
|
||
I verify that this bug it still affects beta version (v14) but doesn't the nightly one (v15 18 may).
Whiteboard: [battery-killer] → [battery-killer] [testday-20120330]
Updated•13 years ago
|
Whiteboard: [battery-killer] [testday-20120330] → [battery-killer] [testday-20120518]
Assignee | ||
Comment 17•13 years ago
|
||
Comment on attachment 624847 [details] [diff] [review]
Updated patch with more floor_div calls to avoid crashing
[Approval Request Comment]
Bug caused by (feature/regressing bug #): Bug 739679
User impact if declined: Painting stops
Testing completed (on m-c, etc.): verified on m-c
Risk to taking this patch (and alternatives if risky): low, fixes flawed calculations to handle negative coordinate.
String or UUID changes made by this patch: none
Attachment #624847 -
Flags: approval-mozilla-aurora?
Comment 18•13 years ago
|
||
Comment on attachment 624847 [details] [diff] [review]
Updated patch with more floor_div calls to avoid crashing
Please land this ASAP for greater testing.
Attachment #624847 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Assignee | ||
Comment 19•13 years ago
|
||
status-firefox15:
--- → fixed
Target Milestone: Firefox 15 → Firefox 14
Updated•13 years ago
|
Target Milestone: Firefox 14 → Firefox 15
Comment 20•13 years ago
|
||
I am not able to reproduce this issue on:
Nightly 15.0a1 (2012-05-24)
Aurora 14.0a2 (2012-05-24)
Beta 14.0b3 build2
Updated•4 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•