[Task Manager] Limit badge label to a sane size
ClosedPublic

Authored by broulik on Feb 16 2018, 4:11 PM.

Details

Summary

When moving a horizontal panel around so it becomes vertical, the height of the badge would grow enormous briefly during re-layouting causing a crash in the font engine.

Test Plan

Had KMail sitting in my task bar with a badge, moved the panel from horizontal to vertical. Previously it would reproducibly crash, now it doesn't crash anymore.

Backtrace

(gdb) bt
#0  0x00007fffe389d2a6 in QTransformToFTMatrix (matrix=...) at freetype/qfontengine_ft.cpp:1533                                                              
#1  QFontEngineFT::loadGlyphSet (this=0x7ffe50114c90, matrix=...) at freetype/qfontengine_ft.cpp:1547                                                        
#2  0x00007fffe389d7e4 in QFontEngineFT::loadGlyphFor (this=this@entry=0x7ffe50114c90, g=g@entry=28, subPixelPosition=..., subPixelPosition@entry=...,       
    format=format@entry=QFontEngine::Format_A8, t=..., fetchBoundingBox=fetchBoundingBox@entry=false, disableOutlineDrawing=true)                            
    at freetype/qfontengine_ft.cpp:2058                                                                                                                      
#3  0x00007fffe389fa26 in QFontEngineFT::alphaMapForGlyph (this=this@entry=0x7ffe50114c90, g=g@entry=28, subPixelPosition=..., subPixelPosition@entry=...,   
    t=...) at freetype/qfontengine_ft.cpp:2089                                                                                                               
#4  0x00007fffe389750e in QFontEngineFT::alphaMapForGlyph (this=0x7ffe50114c90, g=28, subPixelPosition=...) at freetype/qfontengine_ft.cpp:2082              
#5  0x00007ffff26d851f in QFontEngine::alphaMapForGlyph (this=this@entry=0x7ffe50114c90, glyph=glyph@entry=28, subPixelPosition=...,                         
    subPixelPosition@entry=..., t=...) at text/qfontengine.cpp:879                                                                                           
#6  0x00007fffe389fba0 in QFontEngineFT::alphaMapForGlyph (this=this@entry=0x7ffe50114c90, g=g@entry=28, subPixelPosition=..., subPixelPosition@entry=...,   
    t=...) at freetype/qfontengine_ft.cpp:2100                                                                                                               
#7  0x00007fffe389750e in QFontEngineFT::alphaMapForGlyph (this=0x7ffe50114c90, g=28, subPixelPosition=...) at freetype/qfontengine_ft.cpp:2082              
#8  0x00007ffff26d851f in QFontEngine::alphaMapForGlyph (this=this@entry=0x7ffe50114c90, glyph=glyph@entry=28, subPixelPosition=...,                         
    subPixelPosition@entry=..., t=...) at text/qfontengine.cpp:879                                                                                           
#9  0x00007fffe389fba0 in QFontEngineFT::alphaMapForGlyph (this=this@entry=0x7ffe50114c90, g=g@entry=28, subPixelPosition=..., subPixelPosition@entry=...,   
    t=...) at freetype/qfontengine_ft.cpp:2100                                                                                                               
#10 0x00007fffe389750e in QFontEngineFT::alphaMapForGlyph (this=0x7ffe50114c90, g=28, subPixelPosition=...) at freetype/qfontengine_ft.cpp:2082              
#11 0x00007ffff26d851f in QFontEngine::alphaMapForGlyph (this=this@entry=0x7ffe50114c90, glyph=glyph@entry=28, subPixelPosition=...,                         
    subPixelPosition@entry=..., t=...) at text/qfontengine.cpp:879                                                                                           
#12 0x00007fffe389fba0 in QFontEngineFT::alphaMapForGlyph (this=this@entry=0x7ffe50114c90, g=g@entry=28, subPixelPosition=..., subPixelPosition@entry=...,   
    t=...) at freetype/qfontengine_ft.cpp:2100

and so on

Diff Detail

Repository
R119 Plasma Desktop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik created this revision.Feb 16 2018, 4:11 PM
Restricted Application added a project: Plasma. · View Herald TranscriptFeb 16 2018, 4:11 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik requested review of this revision.Feb 16 2018, 4:11 PM
hein accepted this revision.Feb 20 2018, 2:19 PM
This revision is now accepted and ready to land.Feb 20 2018, 2:19 PM
This revision was automatically updated to reflect the committed changes.