Closed Bug 1071018 Opened 10 years ago Closed 9 years ago

MOZ_ASSERT(fabs(aX - aY) < 1e-6) at ../../dist/include/mozilla/gfx/ScaleFactor.h:36 36

Categories

(Core :: Graphics, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla39
Tracking Status
firefox39 --- fixed

People

(Reporter: gwagner, Assigned: botond)

References

Details

Attachments

(1 file)

STR:
On B2G running trunk with kk debug gecko
Enable NFC
Open webpage on other device, hold phones together and send page from other device.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1301.1301]
0xb536d9c8 in mozilla::gfx::ScaleFactor<mozilla::LayoutDevicePixel, mozilla::LayerPixel>::ScaleFactor (this=<optimized out>, aX=<optimized out>, aY=<optimized out>)
    at ../../dist/include/mozilla/gfx/ScaleFactor.h:36
36	    MOZ_ASSERT(fabs(aX - aY) < 1e-6);
(gdb) bt
#0  0xb536d9c8 in mozilla::gfx::ScaleFactor<mozilla::LayoutDevicePixel, mozilla::LayerPixel>::ScaleFactor (this=<optimized out>, aX=<optimized out>, aY=<optimized out>)
    at ../../dist/include/mozilla/gfx/ScaleFactor.h:36
#1  0xb538f76c in nsDisplayScrollLayer::ComputeFrameMetrics (aForFrame=0xab55a320, aScrollFrame=0xa9e09fc8, aReferenceFrame=aReferenceFrame@entry=0xab559bb8, aLayer=aLayer@entry=
    0xa7a81c40, aScrollParentId=0, aViewport=..., aForceNullScrollId=aForceNullScrollId@entry=false, aIsRoot=aIsRoot@entry=false, aContainerParameters=...)
    at ../../../layout/base/nsDisplayList.cpp:663
#2  0xb538ff5a in nsDisplayScrollLayer::ComputeFrameMetrics (this=this@entry=0xab5b8d78, aLayer=0xa7a81c40, aContainerParameters=...)
    at ../../../layout/base/nsDisplayList.cpp:4061
#3  0xb5354336 in mozilla::ContainerState::ProcessDisplayItems (this=this@entry=0xbe896170, aList=aList@entry=0xab5b8ed8, aFlags=aFlags@entry=0)
    at ../../../layout/base/FrameLayerBuilder.cpp:3012
#4  0xb5355138 in mozilla::FrameLayerBuilder::BuildContainerLayerFor (this=0xa7a7cf60, aBuilder=aBuilder@entry=0xbe896eb8, aManager=0xaf26d300, aContainerFrame=0xab559bb8, 
    aContainerItem=aContainerItem@entry=0xab5b8e78, aChildren=aChildren@entry=0xab5b8ed8, aParameters=..., aTransform=aTransform@entry=0xab5b8f10, aFlags=0)
    at ../../../layout/base/FrameLayerBuilder.cpp:3982
#5  0xb5378758 in nsDisplayTransform::BuildLayer (this=0xab5b8e78, aBuilder=0xbe896eb8, aManager=<optimized out>, aContainerParameters=...)
    at ../../../layout/base/nsDisplayList.cpp:4994
#6  0xb5354522 in mozilla::ContainerState::ProcessDisplayItems (this=this@entry=0xbe8965a8, aList=aList@entry=0xab5b9db8, aFlags=aFlags@entry=0)
    at ../../../layout/base/FrameLayerBuilder.cpp:2893
#7  0xb5355138 in mozilla::FrameLayerBuilder::BuildContainerLayerFor (this=0xa7a7cf60, aBuilder=aBuilder@entry=0xbe896eb8, aManager=aManager@entry=0xaf26d300, 
    aContainerFrame=0xad1e02b8, aContainerItem=aContainerItem@entry=0xab5b9d88, aChildren=aChildren@entry=0xab5b9db8, aParameters=..., aTransform=aTransform@entry=0x0, 
    aFlags=aFlags@entry=0) at ../../../layout/base/FrameLayerBuilder.cpp:3982
#8  0xb536dc3a in nsDisplayOwnLayer::BuildLayer (this=this@entry=0xab5b9d88, aBuilder=aBuilder@entry=0xbe896eb8, aManager=aManager@entry=0xaf26d300, aContainerParameters=...)
    at ../../../layout/base/nsDisplayList.cpp:3663
#9  0xb538d0c4 in nsDisplaySubDocument::BuildLayer (this=0xab5b9d88, aBuilder=0xbe896eb8, aManager=0xaf26d300, aContainerParameters=...)
    at ../../../layout/base/nsDisplayList.cpp:3705
#10 0xb5354522 in mozilla::ContainerState::ProcessDisplayItems (this=this@entry=0xbe896a18, aList=aList@entry=0xbe896ddc, aFlags=aFlags@entry=0)
    at ../../../layout/base/FrameLayerBuilder.cpp:2893
#11 0xb5355138 in mozilla::FrameLayerBuilder::BuildContainerLayerFor (this=this@entry=0xa7a7cf60, aBuilder=aBuilder@entry=0xbe896eb8, aManager=0xaf26d300, 
    aContainerFrame=aContainerFrame@entry=0xb2c7e2b8, aContainerItem=aContainerItem@entry=0x0, aChildren=aChildren@entry=0xbe896ddc, aParameters=..., 
    aTransform=aTransform@entry=0x0, aFlags=aFlags@entry=0) at ../../../layout/base/FrameLayerBuilder.cpp:3982
#12 0xb5390266 in nsDisplayList::PaintForFrame (this=this@entry=0xbe896ddc, aBuilder=aBuilder@entry=0xbe896eb8, aCtx=aCtx@entry=0x0, aForFrame=0xb2c7e2b8, aFlags=aFlags@entry=13)
    at ../../../layout/base/nsDisplayList.cpp:1316
#13 0xb5390650 in nsDisplayList::PaintRoot (this=this@entry=0xbe896ddc, aBuilder=aBuilder@entry=0xbe896eb8, aCtx=aCtx@entry=0x0, aFlags=13)
    at ../../../layout/base/nsDisplayList.cpp:1234
---Type <return> to continue, or q <return> to quit---
#14 0xb5390e84 in nsLayoutUtils::PaintFrame (aRenderingContext=aRenderingContext@entry=0x0, aFrame=aFrame@entry=0xb2c7e2b8, aDirtyRegion=..., 
    aBackstop=aBackstop@entry=4294967295, aFlags=772) at ../../../layout/base/nsLayoutUtils.cpp:3064
#15 0xb5338664 in PresShell::Paint (this=0xb6b67100, aViewToPaint=0xb12d0d30, aDirtyRegion=..., aFlags=1) at ../../../layout/base/nsPresShell.cpp:6230
#16 0xb4fee15c in nsViewManager::ProcessPendingUpdatesPaint (this=0xb2c7d520, aWidget=aWidget@entry=0xad10aa20) at ../../view/nsViewManager.cpp:443
#17 0xb4fee4ac in nsViewManager::ProcessPendingUpdatesForView (this=this@entry=0xb16c7270, aView=<optimized out>, aFlushDirtyRegion=aFlushDirtyRegion@entry=true)
    at ../../view/nsViewManager.cpp:384
#18 0xb4fee53c in nsViewManager::ProcessPendingUpdates (this=this@entry=0xb2c7d520) at ../../view/nsViewManager.cpp:1075
#19 0xb53417c6 in nsRefreshDriver::Tick (this=0xb16c7270, this@entry=0xaaab7f80, aNowEpoch=<optimized out>, aNowTime=...) at ../../../layout/base/nsRefreshDriver.cpp:1341
#20 0xb5341dde in mozilla::RefreshDriverTimer::TickDriver (driver=0xaaab7f80, jsnow=<optimized out>, now=..., now@entry=...) at ../../../layout/base/nsRefreshDriver.cpp:173
#21 0xb5341efc in mozilla::RefreshDriverTimer::Tick (this=0xaaab7f80) at ../../../layout/base/nsRefreshDriver.cpp:164
#22 0xb44d8ad2 in nsTimerImpl::Fire (this=0xaaac4060) at ../../../xpcom/threads/nsTimerImpl.cpp:618
#23 0xb44d8c56 in nsTimerEvent::Run (this=0xaaacd470) at ../../../xpcom/threads/nsTimerImpl.cpp:711
#24 0xb44d6498 in nsThread::ProcessNextEvent (this=0xb6b4aaa0, aMayWait=<optimized out>, aResult=0xbe89764f) at ../../../xpcom/threads/nsThread.cpp:823
#25 0xb44eaabc in NS_ProcessNextEvent (aThread=0xb6b4aaa0, aMayWait=aMayWait@entry=false) at /Users/Gregor/moz/b2g-inbound/xpcom/glue/nsThreadUtils.cpp:265
#26 0xb469cd3c in mozilla::ipc::MessagePump::Run (this=0xb6b01f70, aDelegate=0xb6b7b1a0) at ../../../ipc/glue/MessagePump.cpp:99
#27 0xb468b3ac in MessageLoop::RunInternal (this=this@entry=0xb6b7b1a0) at ../../../ipc/chromium/src/base/message_loop.cc:234
#28 0xb468b3c6 in RunHandler (this=0xb6b7b1a0) at ../../../ipc/chromium/src/base/message_loop.cc:227
#29 MessageLoop::Run (this=0xb6b7b1a0) at ../../../ipc/chromium/src/base/message_loop.cc:201
#30 0xb4ff1bda in nsBaseAppShell::Run (this=0xb16e2b20) at ../../../widget/xpwidgets/nsBaseAppShell.cpp:164
#31 0xb561e5a6 in nsAppStartup::Run (this=0xb125a8e0) at ../../../../toolkit/components/startup/nsAppStartup.cpp:280
#32 0xb563ae1e in XREMain::XRE_mainRun (this=this@entry=0xbe8977e4) at ../../../toolkit/xre/nsAppRunner.cpp:4159
#33 0xb563b00a in XREMain::XRE_main (this=this@entry=0xbe8977e4, argc=argc@entry=1, argv=argv@entry=0xb6b2b190, aAppData=aAppData@entry=0x24904 <_ZL8sAppData>)
    at ../../../toolkit/xre/nsAppRunner.cpp:4230
#34 0xb563b164 in XRE_main (argc=1, argv=0xb6b2b190, aAppData=0x24904 <_ZL8sAppData>, aFlags=<optimized out>) at ../../../toolkit/xre/nsAppRunner.cpp:4444
#35 0x0000b2ca in do_main (argc=argc@entry=1, argv=argv@entry=0xb6b2b190) at ../../../b2g/app/nsBrowserApp.cpp:165
#36 0x0000b408 in b2g_main (argc=argc@entry=1, argv=argv@entry=0xbe898a24) at ../../../b2g/app/nsBrowserApp.cpp:293
#37 0x0000b15e in RunProcesses (argv=0xbe898a24, argc=1) at ../../../b2g/app/B2GLoader.cpp:221
#38 main (argc=1, argv=0xbe898a24) at ../../../b2g/app/B2GLoader.cpp:247
Flags: needinfo?(milan)
Looks like something Botond would want to look at.
Flags: needinfo?(milan) → needinfo?(botond)
This problem will go away when bug 993525, which I'm actively working on, is fixed.

If this crash is inconvenient in the meantime, I'm happy to provide a temporary workaround.
Flags: needinfo?(botond)
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
I still met this bug.

My Gecko : hg tip
changeset:   226643:29b05d283b00
tag:         qparent
parent:      226618:0de614a1d5f1
parent:      226642:a465bbe65e90
user:        Wes Kocher <wkocher@mozilla.com>
date:        Thu Jan 29 15:27:17 2015 -0800
summary:     Merge fx-team to m-c a=merge CLOSED TREE

STR:
1. enable NFC on Two Flames
2. Flame A opens a URL, for example, http://www.mozilla.org
3. Flame A taps on Flame B (B is screen-unlocked)
4. Flame A swipe to share the URL to Flame B.
5. Flame B crashes in assertion.

Program received signal SIGSEGV, Segmentation fault.
0xb5201ce8 in mozilla::gfx::ScaleFactor<mozilla::LayoutDevicePixel, mozilla::LayerPixel>::ScaleFactor (this=<optimized out>, aX=<optimized out>, aY=<optimized out>)
    at ../../dist/include/mozilla/gfx/ScaleFactor.h:36
36	    MOZ_ASSERT(fabs(aX - aY) < 1e-6);
(gdb) bt
#0  0xb5201ce8 in mozilla::gfx::ScaleFactor<mozilla::LayoutDevicePixel, mozilla::LayerPixel>::ScaleFactor (this=<optimized out>, aX=<optimized out>, aY=<optimized out>)
    at ../../dist/include/mozilla/gfx/ScaleFactor.h:36
#1  0xb522b8f8 in nsDisplayScrollLayer::ComputeFrameMetrics (aForFrame=0xaae63010, aScrollFrame=0xae625df0, aReferenceFrame=aReferenceFrame@entry=0xaa7ac420, aLayer=aLayer@entry=0xaa77b700, 
    aScrollParentId=0, aViewport=..., aForceNullScrollId=aForceNullScrollId@entry=false, aIsRoot=aIsRoot@entry=false, aContainerParameters=...)
    at ../../../../../../mozilla/mozilla-central/layout/base/nsDisplayList.cpp:782
#2  0xb527f80a in mozilla::ScrollFrameHelper::ComputeFrameMetrics (this=<optimized out>, aLayer=0xaa77b700, aContainerReferenceFrame=0xaa7ac420, aParameters=..., aClipRect=0xbe904f10, aOutput=0xbe904f30)
    at ../../../../../../mozilla/mozilla-central/layout/generic/nsGfxScrollFrame.cpp:3182
#3  0xb51e1f54 in mozilla::ContainerState::SetupScrollingMetadata (this=this@entry=0xbe905398, aEntry=aEntry@entry=0xaa1dfd84)
    at ../../../../../../mozilla/mozilla-central/layout/base/FrameLayerBuilder.cpp:3636
#4  0xb51e2064 in mozilla::ContainerState::PostprocessRetainedLayers (this=this@entry=0xbe905398, aOpaqueRegionForContainer=aOpaqueRegionForContainer@entry=0xbe90523c)
    at ../../../../../../mozilla/mozilla-central/layout/base/FrameLayerBuilder.cpp:3676
#5  0xb51e7c28 in mozilla::ContainerState::Finish (this=this@entry=0xbe905398, aTextContentFlags=aTextContentFlags@entry=0xbe9052b4, aData=aData@entry=0xafa794f0, aContainerPixelBounds=..., 
    aChildItems=aChildItems@entry=0xaa1dd0e8, aHasComponentAlphaChildren=@0xbe9052af: false) at ../../../../../../mozilla/mozilla-central/layout/base/FrameLayerBuilder.cpp:3756
#6  0xb51e8784 in mozilla::FrameLayerBuilder::BuildContainerLayerFor (this=0xae65be20, aBuilder=aBuilder@entry=0xbe905ff8, aManager=0xafaa3780, aContainerFrame=0xaa7ac420, 
    aContainerItem=aContainerItem@entry=0xaa1dd088, aChildren=aChildren@entry=0xaa1dd0e8, aParameters=..., aTransform=aTransform@entry=0xaa1dd130, aFlags=aFlags@entry=1)
    at ../../../../../../mozilla/mozilla-central/layout/base/FrameLayerBuilder.cpp:4134
#7  0xb5210c0c in nsDisplayTransform::BuildLayer (this=0xaa1dd088, aBuilder=0xbe905ff8, aManager=<optimized out>, aContainerParameters=...)
    at ../../../../../../mozilla/mozilla-central/layout/base/nsDisplayList.cpp:5407
#8  0xb51e7ae2 in mozilla::ContainerState::ProcessDisplayItems (this=this@entry=0xbe9057a0, aList=aList@entry=0xaa1def20) at ../../../../../../mozilla/mozilla-central/layout/base/FrameLayerBuilder.cpp:3004
#9  0xb51e8750 in mozilla::FrameLayerBuilder::BuildContainerLayerFor (this=0xae65be20, aBuilder=aBuilder@entry=0xbe905ff8, aManager=aManager@entry=0xafaa3780, aContainerFrame=0xaf6872b8, 
    aContainerItem=aContainerItem@entry=0xaa1deef0, aChildren=aChildren@entry=0xaa1def20, aParameters=..., aTransform=aTransform@entry=0x0, aFlags=aFlags@entry=0)
    at ../../../../../../mozilla/mozilla-central/layout/base/FrameLayerBuilder.cpp:4126
#10 0xb5201fb6 in nsDisplayOwnLayer::BuildLayer (this=this@entry=0xaa1deef0, aBuilder=aBuilder@entry=0xbe905ff8, aManager=aManager@entry=0xafaa3780, aContainerParameters=...)
    at ../../../../../../mozilla/mozilla-central/layout/base/nsDisplayList.cpp:4016
#11 0xb5221d60 in nsDisplaySubDocument::BuildLayer (this=0xaa1deef0, aBuilder=0xbe905ff8, aManager=0xafaa3780, aContainerParameters=...)
    at ../../../../../../mozilla/mozilla-central/layout/base/nsDisplayList.cpp:4061
#12 0xb51e7ae2 in mozilla::ContainerState::ProcessDisplayItems (this=this@entry=0xbe905be0, aList=aList@entry=0xbe905fac) at ../../../../../../mozilla/mozilla-central/layout/base/FrameLayerBuilder.cpp:3004
#13 0xb51e8750 in mozilla::FrameLayerBuilder::BuildContainerLayerFor (this=this@entry=0xae65be20, aBuilder=aBuilder@entry=0xbe905ff8, aManager=0xafaa3780, aContainerFrame=aContainerFrame@entry=0xb12dd2b8, 
    aContainerItem=aContainerItem@entry=0x0, aChildren=aChildren@entry=0xbe905fac, aParameters=..., aTransform=aTransform@entry=0x0, aFlags=aFlags@entry=0)
    at ../../../../../../mozilla/mozilla-central/layout/base/FrameLayerBuilder.cpp:4126
#14 0xb522c0fe in nsDisplayList::PaintRoot (this=this@entry=0xbe905fac, aBuilder=aBuilder@entry=0xbe905ff8, aCtx=aCtx@entry=0x0, aFlags=aFlags@entry=13)
    at ../../../../../../mozilla/mozilla-central/layout/base/nsDisplayList.cpp:1598
#15 0xb522cbbc in nsLayoutUtils::PaintFrame (aRenderingContext=aRenderingContext@entry=0x0, aFrame=aFrame@entry=0xb12dd2b8, aDirtyRegion=..., aBackstop=aBackstop@entry=4294967295, aFlags=772)
    at ../../../../../../mozilla/mozilla-central/layout/base/nsLayoutUtils.cpp:3191
#16 0xb523abfc in PresShell::Paint (this=0xb25a79c0, aViewToPaint=0xb125b650, aDirtyRegion=..., aFlags=1) at ../../../../../../mozilla/mozilla-central/layout/base/nsPresShell.cpp:6338
#17 0xb50a68d4 in nsViewManager::ProcessPendingUpdatesPaint (this=0xb12d9340, aWidget=aWidget@entry=0xb02b2800) at ../../../../../mozilla/mozilla-central/view/nsViewManager.cpp:443
#18 0xb50a6c24 in nsViewManager::ProcessPendingUpdatesForView (this=this@entry=0xb27d9e40, aView=<optimized out>, aFlushDirtyRegion=aFlushDirtyRegion@entry=true)
    at ../../../../../mozilla/mozilla-central/view/nsViewManager.cpp:384
#19 0xb50a6cb2 in nsViewManager::ProcessPendingUpdates (this=this@entry=0xb12d9340) at ../../../../../mozilla/mozilla-central/view/nsViewManager.cpp:1074
#20 0xb51d1932 in nsRefreshDriver::Tick (this=0xb27d9e40, this@entry=0xb02174c0, aNowEpoch=<optimized out>, aNowTime=...) at ../../../../../../mozilla/mozilla-central/layout/base/nsRefreshDriver.cpp:1680
#21 0xb51d1f7a in mozilla::RefreshDriverTimer::TickDriver (driver=0xb02174c0, jsnow=<optimized out>, now=..., now@entry=...) at ../../../../../../mozilla/mozilla-central/layout/base/nsRefreshDriver.cpp:198
#22 0xb51d208a in mozilla::RefreshDriverTimer::Tick (this=this@entry=0xb02174c0, jsnow=<optimized out>, now=..., now@entry=...)
    at ../../../../../../mozilla/mozilla-central/layout/base/nsRefreshDriver.cpp:189
#23 0xb51d2104 in Tick (this=0xb02174c0) at ../../../../../../mozilla/mozilla-central/layout/base/nsRefreshDriver.cpp:166
#24 mozilla::RefreshDriverTimer::TimerTick (aTimer=<optimized out>, aClosure=0xb02174c0) at ../../../../../../mozilla/mozilla-central/layout/base/nsRefreshDriver.cpp:212
#25 0xb4273aaa in nsTimerImpl::Fire (this=0xb0204880) at ../../../../../../mozilla/mozilla-central/xpcom/threads/nsTimerImpl.cpp:631
#26 0xb4273c5e in nsTimerEvent::Run (this=0xb022b190) at ../../../../../../mozilla/mozilla-central/xpcom/threads/nsTimerImpl.cpp:724
#27 0xb4271318 in nsThread::ProcessNextEvent (this=0xb6afe320, aMayWait=<optimized out>, aResult=0xbe906837) at ../../../../../../mozilla/mozilla-central/xpcom/threads/nsThread.cpp:855
#28 0xb4286308 in NS_ProcessNextEvent (aThread=0xb6afe320, aMayWait=aMayWait@entry=false) at /home/allstars/src/mozilla/mozilla-central/xpcom/glue/nsThreadUtils.cpp:265
#29 0xb443bc48 in mozilla::ipc::MessagePump::Run (this=0xb25c9220, aDelegate=0xb25bb1a0) at ../../../../../../mozilla/mozilla-central/ipc/glue/MessagePump.cpp:99
#30 0xb4427d18 in MessageLoop::RunInternal (this=this@entry=0xb25bb1a0) at ../../../../../../mozilla/mozilla-central/ipc/chromium/src/base/message_loop.cc:233
#31 0xb4427d32 in RunHandler (this=0xb25bb1a0) at ../../../../../../mozilla/mozilla-central/ipc/chromium/src/base/message_loop.cc:226
#32 MessageLoop::Run (this=0xb25bb1a0) at ../../../../../../mozilla/mozilla-central/ipc/chromium/src/base/message_loop.cc:200
#33 0xb50a9f8e in nsBaseAppShell::Run (this=0xb2765400) at ../../../../../mozilla/mozilla-central/widget/nsBaseAppShell.cpp:164
#34 0xb54e0a12 in nsAppStartup::Run (this=0xb277fac0) at ../../../../../../../mozilla/mozilla-central/toolkit/components/startup/nsAppStartup.cpp:281
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
What I said in comment 2 still applies, though the bug that will fix this is more specifically bug 1036967; marking it as dependency.
I ran into this as well, without using NFC - just typing in the Browser app address bar / search bar, and rotating the phone.
This seems to happen now reliably every time a screen rotation is performed in the Browser app. 

It looks like something is setting a transform corresponding to the rotation that ends up having different x and y scale factors, and APZ doesn't support that right now.

It's not immediately clear to me whether setting such a transform during a screen rotation is correct/desirable.
Do you have an ETA for bug 1036967? It would be nice to be able to use the browser in landscape mode :)
Flags: needinfo?(botond)
Attached patch WorkaroundSplinter Review
I hope to get to it in the next week or so, but let's work around it until then.
Assignee: nobody → botond
Flags: needinfo?(botond)
Attachment #8569504 - Flags: review?(bugmail.mozilla)
Attachment #8569504 - Flags: review?(bugmail.mozilla) → review+
https://hg.mozilla.org/mozilla-central/rev/57c5da72813a
Status: REOPENED → RESOLVED
Closed: 10 years ago9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: