--===============1088703406== Content-Type: multipart/signed; boundary="nextPart1991923.PMSgzuWduV"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit --nextPart1991923.PMSgzuWduV Content-Type: text/plain; charset="iso-8859-6" Content-Transfer-Encoding: 7bit Content-Disposition: inline On Mon, 10 Dec 2007 02:24:41 am Vladimir Prus wrote: > Hello! > > While working on KDevelop4, using Oxygen style, I've run > into a situation where KateViewInternal::doUpdateView is > called while height() returns -4. Since height() is used > in various math in that function, this leads to overflow, > and Kate starts to allocate huge vectors, and eventually > crashes. > > The problem seems to be that: > > - KDevelop4, for a short moment, sets height 0 for > the KateView object. > - KateView, sometimes, add a padding of 4. This code > in particularly suspect: > > if (style()->styleHint(QStyle::SH_ScrollView_FrameOnlyAroundContents)) { > QHBoxLayout *extrahbox = new QHBoxLayout (); > QFrame * frame = new QFrame(this); > > Now, I don't know what's right solution for this problem. > On KDevelop side, I'm gonna make sure KateView is never 0 in height. > However, I'd like propose the following patch that merely adds > assert -- so that next time somebody runs into this problem, the > crash is more obvious. > > OK to commit? Ok by me. Cheers, Hamish. --nextPart1991923.PMSgzuWduV Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQBHXKKcH8BtnSmIlUYRAnIPAKDiAKCcHsxjXmIx7wXhYyEcxKC4ogCcC+WL sYrHGxgvGUOWHqoRkHrL/dM= =vjuf -----END PGP SIGNATURE----- --nextPart1991923.PMSgzuWduV-- --===============1088703406== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ KWrite-Devel mailing list KWrite-Devel@kde.org https://mail.kde.org/mailman/listinfo/kwrite-devel --===============1088703406==--