Crash during using QWebKit
-
I am experimenting with QWebKit and while using it, my application is crashing with below stack trace. Is it possible to infer any pointer regarding root cause from this stack trace alone?
QFontEngineFT::recalcAdvances(QGlyphLayout*, QFlagsQFontEngine::ShaperFlag) const+37
QRawFont::advancesForGlyphIndexes(unsigned int const*, QPointF*, int, QFlagsQRawFont::LayoutFlag) const+582
WebCore::applyFontTransforms(WebCore::GlyphBuffer*, bool, int&, WebCore::SimpleFontData const*, WebCore::WidthIterator&, unsigned int, WTF::Vector<std::pair<int, WebCore::OriginalAdvancesForCharacterTreatedAsSpace>, 64ul, WTF::CrashOnOverflow>&)+1023
unsigned int WebCore::WidthIterator::advanceInternalWebCore::SurrogatePairAwareTextIterator(WebCore::SurrogatePairAwareTextIterator&, WebCore::GlyphBuffer*)+3360
WebCore::WidthIterator::advance(int, WebCore::GlyphBuffer*)+142
WebCore::Font::floatWidthForSimpleText(WebCore::TextRun const&, WTF::HashSet<WebCore::SimpleFontData const*, WTF::PtrHash<WebCore::SimpleFontData const*>, WTF::HashTraits<WebCore::SimpleFontData const*> >, WebCore::GlyphOverflow) const+222
WebCore::Font::width(WebCore::TextRun const&, WTF::HashSet<WebCore::SimpleFontData const*, WTF::PtrHash<WebCore::SimpleFontData const*>, WTF::HashTraits<WebCore::SimpleFontData const*> >, WebCore::GlyphOverflow) const+312
WebCore::RenderBlock::LineBreaker::nextSegmentBreak(WebCore::BidiResolver<WebCore::InlineIterator, WebCore::BidiRun>&, WebCore::LineInfo&, WebCore::RenderBlock::RenderTextInfo&, WebCore::RenderBlock::FloatingObject*, unsigned int, WTF::Vector<WebCore::WordMeasurement, 64ul, WTF::CrashOnOverflow>&)+15672
WebCore::RenderBlock::LineBreaker::nextLineBreak(WebCore::BidiResolver<WebCore::InlineIterator, WebCore::BidiRun>&, WebCore::LineInfo&, WebCore::RenderBlock::RenderTextInfo&, WebCore::RenderBlock::FloatingObject*, unsigned int, WTF::Vector<WebCore::WordMeasurement, 64ul, WTF::CrashOnOverflow>&)+240
WebCore::RenderBlock::layoutRunsAndFloatsInRange(WebCore::LineLayoutState&, WebCore::BidiResolver<WebCore::InlineIterator, WebCore::BidiRun>&, WebCore::InlineIterator const&, WebCore::BidiStatus const&, unsigned int)+987
WebCore::RenderBlock::layoutRunsAndFloats(WebCore::LineLayoutState&, bool)+1695
WebCore::RenderBlock::layoutInlineChildren(bool, WebCore::LayoutUnit&, WebCore::LayoutUnit&)+2810
WebCore::RenderBlock::layoutBlock(bool, WebCore::LayoutUnit)+699
WebCore::RenderBlock::layout()+73
WebCore::RenderBlock::layoutBlockChild(WebCore::RenderBox*, WebCore::RenderBlock::MarginInfo&, WebCore::LayoutUnit&, WebCore::LayoutUnit&)+343
WebCore::RenderBlock::layoutBlockChildren(bool, WebCore::LayoutUnit&)+342
WebCore::RenderBlock::layoutBlock(bool, WebCore::LayoutUnit)+1765
WebCore::RenderBlock::layout()+73
WebCore::RenderBlock::layoutBlockChild(WebCore::RenderBox*, WebCore::RenderBlock::MarginInfo&, WebCore::LayoutUnit&, WebCore::LayoutUnit&)+343
WebCore::RenderBlock::layoutBlockChildren(bool, WebCore::LayoutUnit&)+342
WebCore::RenderBlock::layoutBlock(bool, WebCore::LayoutUnit)+1765
WebCore::RenderBlock::layout()+73
WebCore::RenderBlock::layoutBlockChild(WebCore::RenderBox*, WebCore::RenderBlock::MarginInfo&, WebCore::LayoutUnit&, WebCore::LayoutUnit&)+343
WebCore::RenderBlock::layoutBlockChildren(bool, WebCore::LayoutUnit&)+342
WebCore::RenderBlock::layoutBlock(bool, WebCore::LayoutUnit)+1765
WebCore::RenderBlock::layout()+73
WebCore::RenderView::layoutContent(WebCore::LayoutState const&)+17
WebCore::RenderView::layout()+419
WebCore::FrameView::layout(bool)+807
WebCore::Document::implicitClose() [clone .part.0]+663 -
Hi,
You are likely going to have a hard time getting help for QtWebkit. The module has been deprecated in 5.6 if memory serves well and was replaced with QtWebEngine.
Can you explain your use case ?
-
Hi,
You are likely going to have a hard time getting help for QtWebkit. The module has been deprecated in 5.6 if memory serves well and was replaced with QtWebEngine.
Can you explain your use case ?
@SGaist
Hi , I am creating a dashboard with some data. This data maybe updated from time to time during course of my (c++based) application usage.
Right now I am experimenting with a manually created html file styled by css to finalize formatting for how to present data.
Earlier I was trying to use QWebEngine but it is not present yet in our Qt installation for all supported architectures so now I am working with QWebKit.
Currently I am just loading my html file in QWebView . During my experiments I sometimes change html and css and then trigger creation of new QWebView object and load latest version of my html file. During this experimentation, I encountered this crash. Crash has happened just once so far. -
Which version of Qt are you using ?
Beside that, depending on your dashboard, do you really need html + css to show that ?
That's quite a heavy dependency. -
Which version of Qt are you using ?
Beside that, depending on your dashboard, do you really need html + css to show that ?
That's quite a heavy dependency.@SGaist
Hi,I am using version Qt version 5.15.18.
Dashboard will have multiple sections each showing different types of data, some might be tabular, some maybe simple text. We may also end up adding some images.
It will also have some actionable links which will trigger some action on the application upon clicking.Currently I am loading html and css file during course of application.
While application is alive, I sometimes manually edit (this manual edit step is only for experimentation phase to try different ways of presenting data) html/css file and then without exiting application I triggered another load of same html file using new instance of QWebView (old instance of QWebView is still active).
I noticed while experimenting like this even latest CSS changes were not reflected in second load(maybe it does some caching, I am not sure). Can this way of using QWebView be the cause of crash? -
So, unless I am mistaken, you are building QtWebKit yourself. Correct ?
One thing you can do is to start from an empty html file and add content gradually until it fails to find the culprit. If nothing comes out then start adding the CSS stuff back and again piece by piece.
-
So, unless I am mistaken, you are building QtWebKit yourself. Correct ?
One thing you can do is to start from an empty html file and add content gradually until it fails to find the culprit. If nothing comes out then start adding the CSS stuff back and again piece by piece.
@SGaist
Thanks for your help.
I already have access to QtWebKit. Its there in my Qt installation. Crash is intermittent so inferring what content triggers crash might not be easy.I am trying to figure out again if I can instead use QWebEngine. Lets see, hopefully I wont have to use QtWebKit.