Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Feb 2020 12:35:22 +0100
From:      Miroslav Lachman <000.fbsd@quip.cz>
To:        Michael Osipov <1983-01-06@gmx.net>
Cc:        freebsd-ports@freebsd.org
Subject:   Re: Cannot build qt5-webkit with debug
Message-ID:  <4bc1f8a7-4a76-62ea-2026-0019333edc59@quip.cz>
In-Reply-To: <cdfa694f-1adb-0db1-b6ea-719be5deca04@gmx.net>
References:  <f0a4e30f-8856-b4e6-dc9b-ad87ecf1a17a@quip.cz> <86c4b386-9298-fa0a-ccc1-ec6b1e65b788@quip.cz> <81e73790-6b69-8038-b087-9ff75c1cf9b5@gmx.net> <1a72bb7d-8ded-afe4-6fa7-8c301d73839e@quip.cz> <c5d41be9-f2a7-7451-b2e5-370587209571@gmx.net> <23335a73-5853-eab2-5684-b40f430ec8c7@quip.cz> <nycvar.OFS.7.76.44444.807.2002241744450.61731@z.fncre.vasb> <nycvar.OFS.7.76.44444.807.2002241750480.61731@z.fncre.vasb> <12ae3631-1973-5a42-8aa2-2fb8b9b93f8b@quip.cz> <15dbf933-b04b-788f-5cab-0dc5ffdcc532@gmx.net> <1b7192f7-5ebe-8d28-6bd9-92c8a2097acf@quip.cz> <abf105f1-9407-4a03-f493-dbe154a15526@gmx.net> <79231bf9-6e7c-b5e6-9c8e-29edb921f18c@quip.cz> <cdfa694f-1adb-0db1-b6ea-719be5deca04@gmx.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Michael Osipov wrote on 2020/02/25 11:16:
> Am 2020-02-24 um 22:52 schrieb Miroslav Lachman:

[...]

>> I tried it on the simplest web page without any fonts, css etc. but it
>> is still crashing. I removed the charset from the page so it is now not
>> using ICU.
>>
>> https://hastebin.com/iyonapasuz.bash
>>
>> Let me know if I can try anything else.
> 
> OK, it is getting closer.
> 
> The crash comes from this call:
> https://github.com/qtwebkit/qtwebkit/blob/qtwebkit-5.212.0-alpha3/Source/WebCore/css/CSSParser.cpp#L6907 
> 
> 
> Can you commet comment this line, recompile qtwebkit and see what happens?

I am sorry for my late reply.  Rebuilding of qt5-webkit is very strange. 
The build crashes with out of memory 3 times but finally I have 
qt5-webkit rebuilt with commented out line you suggested and it works now!

The example from my first attempt works:

(root@testjail) ~/# phantomjs /tmp/phantom.2.js
[blocked] The page at https://phantomjs.org/api/phantom/ was not allowed 
to run insecure content from 
http://fonts.googleapis.com/css?family=Droid+Sans:400,700.

https://phantomjs.org/api/phantom/
element is [object Object]
https://phantomjs.org/


I tried few more examples without crash so far.

This is the exact modification patch for qt5-webkit

# cat 
/vol0/poudriere/ports/headtest/www/qt5-webkit/files/patch-Source_WebCore_css_CSSParser.cpp
--- Source/WebCore/css/CSSParser.cpp.orig       2019-06-26 16:25:02 UTC
+++ Source/WebCore/css/CSSParser.cpp
@@ -6904,7 +6904,7 @@ void CSSParser::parseSystemFont(bool imp
      addProperty(CSSPropertyFontWeight, 
CSSValuePool::singleton().createValue(fontDescription.weight()), important);
      addProperty(CSSPropertyFontSize, 
CSSValuePool::singleton().createValue(fontDescription.specifiedSize(), 
CSSPrimitiveValue::CSS_PX), important);
      Ref<CSSValueList> fontFamilyList = 
CSSValueList::createCommaSeparated();
- 
fontFamilyList->append(CSSValuePool::singleton().createFontFamilyValue(fontDescription.familyAt(0), 
FromSystemFontID::Yes));
+ 
//fontFamilyList->append(CSSValuePool::singleton().createFontFamilyValue(fontDescription.familyAt(0), 
FromSystemFontID::Yes));
      addProperty(CSSPropertyFontFamily, WTFMove(fontFamilyList), 
important);
      addProperty(CSSPropertyFontVariantCaps, 
CSSValuePool::singleton().createIdentifierValue(CSSValueNormal), important);
      addProperty(CSSPropertyLineHeight, 
CSSValuePool::singleton().createIdentifierValue(CSSValueNormal), important);



I am very curious what is wrong here? qt5-webkit is used by 60+ ports as 
a dependency so why only phantomjs crashes with it?

And what is not working now with the line fontFamilyList->append... 
removed()?

Should I report it upstream or is it FreeBSD specific problem?

Again, thank you so much for your help! Without it I will not be able to 
fix it.

Kind regards
Miroslav Lachman



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4bc1f8a7-4a76-62ea-2026-0019333edc59>