From kwrite-devel Fri Apr 09 15:27:33 2010 From: Milian Wolff Date: Fri, 09 Apr 2010 15:27:33 +0000 To: kwrite-devel Subject: Re: TextBuffer is not thread safe - KateDocument->text() neither Message-Id: <201004091727.38470.mail () milianw ! de> X-MARC-Message: https://marc.info/?l=kwrite-devel&m=127082691107306 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============0347146732==" --===============0347146732== Content-Type: multipart/signed; boundary="nextPart10008629.GMExlqFmDb"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit --nextPart10008629.GMExlqFmDb Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Milian Wolff, 09.04.2010: > Hey all, esp. Cullmann: >=20 > I found an easy way to trigger the assert from > https://bugs.kde.org/show_bug.cgi?id=3D233823 . >=20 > I added debug output and it crashes really strangely, e.g. asserts and th= an > continues to output my debug output.... You know why, right :) >=20 > The text buffer is simply not threadsafe, I mean look at it... I bet this > is the issue :-X >=20 > Did you decide to do this on purpose to crash KDevelop, meaning: Was it > never intended to make KateDocument threadsafe? >=20 > Bye, a very sad Milian Here this shows perfectly the problem: TextBuffer::line( 12 ) index: 2 block: 512 768=20 TextBuffer::line( 4199 ) index: 16 block: 4096 4352=20 in: 12 corrected: -500 512 256=20 in: 4199 corrected: 103 4096 256=20 Essentially the blockForLine is not threadsafe, it gets called twice here a= nd=20 the m_lastUsedBlock is set in the middle, jerking things up... =2D-=20 Milian Wolff mail@milianw.de http://milianw.de --nextPart10008629.GMExlqFmDb Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEABECAAYFAku/R2UACgkQDA6yEs0dE5MIbACfRROiPC0+zawSi/Q+QuDjTfW/ kDEAnR3I0Qf/3/n3PwfJbzjwWUNvfCzC =Uev+ -----END PGP SIGNATURE----- --nextPart10008629.GMExlqFmDb-- --===============0347146732== 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 --===============0347146732==--