Bug 226118

Summary: ASSERTION FAILED: Component at index 1 is 1.000000 and is greater than the allowed maximum 1.000000
Product: WebKit Reporter: Robert Jenner <jenner>
Component: New BugsAssignee: Devin Rousso <hi>
Status: RESOLVED FIXED    
Severity: Normal CC: darin, hi, sam, webkit-bot-watchers-bugzilla, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Full Crashlog for API
none
Patch none

Robert Jenner
Reported 2021-05-21 16:07:40 PDT
TestWebKitAPI.SampledPageTopColor.MainDocumentChange is having an Assertion Failure/ crash on Debug for Catalina and up, as well as iOS14-Simulator Debug. HISTORY: https://results.webkit.org/?suite=api-tests&test=TestWebKitAPI.SampledPageTopColor.MainDocumentChange It appears that it was recently introduced at r277523, and has crashed on Debug ever since: https://trac.webkit.org/changeset/277523/webkit TestWebKitAPI.SampledPageTopColor.MainDocumentChange ASSERTION FAILED: Component at index 1 is 1.000000 and is greater than the allowed maximum 1.000000 components[i] <= T::Model::componentInfo[i].max /Volumes/Data/worker/catalina-debug/build/Source/WebCore/platform/graphics/ColorTypes.h(133) : void WebCore::assertInRange(T) [T = WebCore::RGBAType<float, WebCore::SRGBADescriptor<float>, WebCore::BoundedGammaEncoded<float, WebCore::SRGBADescriptor<float> >, WebCore::RGBModel<float>, WebCore::SRGBTransferFunction<float, WebCore::TransferFunctionMode::Clamped> >] 1 0x10d7102f9 WTFCrash 2 0x12a8366dd void WebCore::assertInRange<WebCore::RGBAType<float, WebCore::SRGBADescriptor<float>, WebCore::BoundedGammaEncoded<float, WebCore::SRGBADescriptor<float> >, WebCore::RGBModel<float>, WebCore::SRGBTransferFunction<float, (WebCore::TransferFunctionMode)0> > >(WebCore::RGBAType<float, WebCore::SRGBADescriptor<float>, WebCore::BoundedGammaEncoded<float, WebCore::SRGBADescriptor<float> >, WebCore::RGBModel<float>, WebCore::SRGBTransferFunction<float, (WebCore::TransferFunctionMode)0> >) 3 0x12a836549 WebCore::RGBAType<float, WebCore::SRGBADescriptor<float>, WebCore::BoundedGammaEncoded<float, WebCore::SRGBADescriptor<float> >, WebCore::RGBModel<float>, WebCore::SRGBTransferFunction<float, (WebCore::TransferFunctionMode)0> >::RGBAType(float, float, float, float) 4 0x12a8364d0 WebCore::BoundedGammaEncoded<float, WebCore::SRGBADescriptor<float> >::BoundedGammaEncoded(float, float, float, float) 5 0x12a8363bd WebCore::BoundedGammaEncoded<float, WebCore::SRGBADescriptor<float> >::BoundedGammaEncoded(float, float, float, float) 6 0x12ec485e6 WebCore::roundAndClampToSRGBALossy(CGColor*) 7 0x12ec4863b WebCore::Color::Color(CGColor*, WTF::OptionSet<WebCore::Color::Flags>) 8 0x10a8121ba SampledPageTopColor_MainDocumentChange_Test::TestBody() 9 0x10ad00024 void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) 10 0x10acc23eb void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) 11 0x10acc2323 testing::Test::Run() 12 0x10acc34f4 testing::TestInfo::Run() 13 0x10acc46d5 testing::TestSuite::Run() 14 0x10acd388d testing::internal::UnitTestImpl::RunAllTests() 15 0x10ad05204 bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) 16 0x10acd322b bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) 17 0x10acd30fd testing::UnitTest::Run() 18 0x10aa08a11 RUN_ALL_TESTS() 19 0x10aa089a2 TestWebKitAPI::TestsController::run(int, char**) 20 0x10ac8981f main 21 0x7fff6afeacc9 start 22 0x2
Attachments
Full Crashlog for API (155.67 KB, text/plain)
2021-05-21 16:12 PDT, Robert Jenner
no flags
Patch (1.64 KB, patch)
2021-05-21 19:13 PDT, Devin Rousso
no flags
Robert Jenner
Comment 1 2021-05-21 16:11:52 PDT
Was able to reproduce the Assertion/crash on BigSur Debug ToT with the following test: run-api-tests TestWebKitAPI.SampledPageTopColor.MainDocumentChange Full crashlog from my results is attached below.
Robert Jenner
Comment 2 2021-05-21 16:12:36 PDT
Created attachment 429358 [details] Full Crashlog for API Attaching full crashing for API.
Radar WebKit Bug Importer
Comment 3 2021-05-21 16:13:14 PDT
Devin Rousso
Comment 4 2021-05-21 19:13:28 PDT
Darin Adler
Comment 5 2021-05-21 22:43:25 PDT
Comment on attachment 429387 [details] Patch Sam should review this.
Sam Weinig
Comment 6 2021-05-22 06:52:25 PDT
Comment on attachment 429387 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=429387&action=review > Source/WebCore/platform/graphics/cg/ColorCG.cpp:86 > - return convertColor<SRGBA<uint8_t>>(SRGBA<float> { r, g, b, a }); > + return convertColor<SRGBA<uint8_t>>(makeFromComponentsClamping<SRGBA<float>>(r, g, b, a )); This is a good short term fix for the tests, but I need to fix this function to do something actually reasonable here. I'll tackle that in https://bugs.webkit.org/show_bug.cgi?id=226141.
EWS
Comment 7 2021-05-22 07:16:38 PDT
Committed r277919 (238052@main): <https://commits.webkit.org/238052@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 429387 [details].
Note You need to log in before you can comment on or make changes to this bug.