Bug 90165

Summary: [Qt][WK1] css3/filters/huge-region-composited.html makes css3/filters/huge-region.html crash
Product: WebKit Reporter: Csaba Osztrogonác <ossy>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED INVALID    
Severity: Critical CC: noam, ossy, zherczeg
Priority: P1 Keywords: Qt, QtTriaged
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 79668    

Description Csaba Osztrogonác 2012-06-28 05:50:28 PDT
After https://bugs.webkit.org/show_bug.cgi?id=90164 fixed 
css3/filters/huge-region.html will started to crash

It didn't crash before, because Accelerated Composition was disabled by a previous test.
But with AC, it crashes if css3/filters/huge-region-composited.html runs before it.

You can easily reproduce it independently of the status of bug90164,
because AC is enabled by default, and these tests don't disable it:
- Tools/Scripts/run-webkit-tests css3/filters/huge-region-composited.html css3/filters/huge-region.html
Comment 1 Csaba Osztrogonác 2012-06-28 06:10:39 PDT
Here is the debug crash log:

crash log for DumpRenderTree (pid 10171):
STDOUT: <empty>
STDERR: ASSERTION FAILED: m_ptr
STDERR: ../../../../Source/WTF/wtf/OwnPtr.h(64) : typename WTF::RemovePointer<T>::Type* WTF::OwnPtr<T>::operator->() const [with T = WebCore::ImageBuffer]
STDERR: 1   0x7fa2fa4f344a /home/oszi/WebKit/WebKitBuild/Debug/lib/libQtWebKit.so.4(_ZNK3WTF6OwnPtrIN7WebCore11ImageBufferEEptEv+0x3c) [0x7fa2fa4f344a]
STDERR: 2   0x7fa2fb01c329 /home/oszi/WebKit/WebKitBuild/Debug/lib/libQtWebKit.so.4(_ZN7WebCore18TextureMapperLayer18updateBackingStoreEPNS_13TextureMapperEPNS_26GraphicsLayerTextureMapperE+0x319) [0x7fa2fb01c329]
STDERR: 3   0x7fa2fb01efaf /home/oszi/WebKit/WebKitBuild/Debug/lib/libQtWebKit.so.4(_ZN7WebCore18TextureMapperLayer20syncCompositingStateEPNS_26GraphicsLayerTextureMapperEPNS_13TextureMapperEi+0x14d) [0x7fa2fb01efaf]
STDERR: 4   0x7fa2fb01f064 /home/oszi/WebKit/WebKitBuild/Debug/lib/libQtWebKit.so.4(_ZN7WebCore18TextureMapperLayer20syncCompositingStateEPNS_26GraphicsLayerTextureMapperEPNS_13TextureMapperEi+0x202) [0x7fa2fb01f064]
Comment 2 Noam Rosenthal 2012-06-28 06:12:10 PDT
It's ok to skip the test for now.
Comment 3 Csaba Osztrogonác 2012-06-28 06:22:43 PDT
I skipped it to make the bots happier - http://trac.webkit.org/changeset/121427/trunk/LayoutTests/platform/qt/Skipped

Please unskip it with the proper fix.
Comment 4 Noam Rosenthal 2012-06-28 18:28:22 PDT
(In reply to comment #3)
> I skipped it to make the bots happier - http://trac.webkit.org/changeset/121427/trunk/LayoutTests/platform/qt/Skipped
> 
> Please unskip it with the proper fix.

Might be hard. I'd have to defer this for now, as there are not that many websites with huge filtered content.
Comment 5 Zoltan Herczeg 2012-07-30 05:21:43 PDT
I will check this
Comment 6 Zoltan Herczeg 2012-07-30 06:22:17 PDT
This is the problem:

    // Paint the entire dirty rect into an image buffer. This ensures we only paint once.
    OwnPtr<ImageBuffer> imageBuffer = ImageBuffer::create(dirtyRect.size());
    GraphicsContext* context = imageBuffer->context();

It creates a 3050 x 506366 image. ImageBuffer::create can return with NULL. How shall we handle this case?
Comment 7 Noam Rosenthal 2012-07-30 06:29:38 PDT
(In reply to comment #6)
> This is the problem:
> 
>     // Paint the entire dirty rect into an image buffer. This ensures we only paint once.
>     OwnPtr<ImageBuffer> imageBuffer = ImageBuffer::create(dirtyRect.size());
>     GraphicsContext* context = imageBuffer->context();
> 
> It creates a 3050 x 506366 image. ImageBuffer::create can return with NULL. How shall we handle this case?

We should leave this test skipped for WebKit1. It's fixed in WebKit2 with TiledBackingStore. Fixing this for WebKit1 requires tiled-backing-store per layer which would be quite an undertaking.
Comment 8 Csaba Osztrogonác 2012-07-31 02:09:56 PDT
Good to know if it works on WK2. I'll move this test to WK1 skipped list.
Comment 9 Noam Rosenthal 2012-07-31 05:55:14 PDT
(In reply to comment #8)
> Good to know if it works on WK2. I'll move this test to WK1 skipped list.

One way to make it not crash in WebKit1 is return early if creating the ImageBuffer fails. Then we can keep it out of the skipped list, and simply have wrong pixel results.
Comment 10 Jocelyn Turcotte 2014-02-03 03:21:32 PST
=== Bulk closing of Qt bugs ===

If you believe that this bug report is still relevant for a non-Qt port of webkit.org, please re-open it and remove [Qt] from the summary.

If you believe that this is still an important QtWebKit bug, please fill a new report at https://bugreports.qt-project.org and add a link to this issue. See http://qt-project.org/wiki/ReportingBugsInQt for additional guidelines.