Summary: | KWin crashed when I changed my display resolution | ||
---|---|---|---|
Product: | [Plasma] kwin | Reporter: | wodencafe |
Component: | effects-various | Assignee: | KWin default assignee <kwin-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | mich.delbianco, wodencafe |
Priority: | NOR | Keywords: | drkonqi |
Version: | 5.2.2 | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/kwin/12358f839a293d7936e12dbabdd1aca953063b36 | Version Fixed In: | 5.3.1 |
Sentry Crash Report: |
Description
wodencafe
2015-05-18 12:51:59 UTC
Untested patch - blur and contrast share too much code, btw. diff --git a/effects/backgroundcontrast/contrast.cpp b/effects/backgroundcontrast/contrast.cpp index 059a5d8..882055b 100644 --- a/effects/backgroundcontrast/contrast.cpp +++ b/effects/backgroundcontrast/contrast.cpp @@ -230,6 +230,8 @@ void ContrastEffect::uploadRegion(QVector2D *&map, const QRegion ®ion) void ContrastEffect::uploadGeometry(GLVertexBuffer *vbo, const QRegion ®ion) { const int vertexCount = region.rectCount() * 6; + if (!vertexCount) + return; QVector2D *map = (QVector2D *) vbo->map(vertexCount * sizeof(QVector2D)); uploadRegion(map, region); diff --git a/effects/blur/blur.cpp b/effects/blur/blur.cpp index e238bd2..fe0d467 100644 --- a/effects/blur/blur.cpp +++ b/effects/blur/blur.cpp @@ -236,6 +236,8 @@ void BlurEffect::uploadRegion(QVector2D *&map, const QRegion ®ion) void BlurEffect::uploadGeometry(GLVertexBuffer *vbo, const QRegion &horizontal, const QRegion &vertical) { const int vertexCount = (horizontal.rectCount() + vertical.rectCount()) * 6; + if (!vertexCount) + return; QVector2D *map = (QVector2D *) vbo->map(vertexCount * sizeof(QVector2D)); uploadRegion(map, horizontal); Hi Thomas, I added your patch and built / installed / tested with kwin (5.2.2) and can no longer reproduce the issue. Git commit 12358f839a293d7936e12dbabdd1aca953063b36 by Thomas Lübking. Committed on 21/05/2015 at 07:42. Pushed by luebking into branch 'Plasma/5.3'. no VBO upload for zero vertex count causes out of bounds segfault REVIEW: 123865 FIXED-IN: 5.3.1 M +2 -0 effects/backgroundcontrast/contrast.cpp M +2 -0 effects/blur/blur.cpp http://commits.kde.org/kwin/12358f839a293d7936e12dbabdd1aca953063b36 *** Bug 356620 has been marked as a duplicate of this bug. *** |