[Mono-list] simple test case for threading bug
Jamin Philip Gray
jamin@pubcrawler.org
Tue, 4 Nov 2003 23:01:24 -0600 (CST)
This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
Send mail to mime@docserver.cac.washington.edu for more info.
---1463786239-1878420950-1068008484=:5865
Content-Type: TEXT/PLAIN; charset=US-ASCII
In developing a multithreaded Gtk# application I've run across a problem
where the Gnome.Canvas stops updating. It's somewhat random as to when
it happens, but I was able to create a relatively simple test case that
reproduces the problem nearly every time I run it on my machine. You can
tweak the values of loopsize to increase the likelihood the freeze will
occur. I'm sure there is something obvious I'm missing, so if someone
could take a look at the attached .cs and Makefile and let me know
what you think, I'd appreciate it. Nevermind that this is a silly app;
it's just a simple test case to illustrate the issue I'm having.
Thanks,
--
name: Jamin Philip Gray
email: jamin@pubcrawler.org
icq: 1361499
aim: jamingray47
yahoo: jamin47
web: http://pubcrawler.org
The thunder was ominous-sounding, much like the sound of a thin
sheet of metal being shaken backstage during the storm scene in a
play. (Barbara Fetherolf, Alexandria)
---1463786239-1878420950-1068008484=:5865
Content-Type: TEXT/PLAIN; charset=US-ASCII; name=Makefile
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.4.44.0311042301240.5865@eowyn.dolinux.foobar>
Content-Description:
Content-Disposition: attachment; filename=Makefile
Q1NDPW1jcyAtLWRlYnVnIA0KDQpkZWZhdWx0OiBhbGwNCg0KQ2FudmFzRXhh
bXBsZS5leGU6IENhbnZhc0V4YW1wbGUuY3MgDQoJJChDU0MpIC9yOmd0ay1z
aGFycC5kbGwgL3I6Z25vbWUtc2hhcnAuZGxsIC9yOmdsYWRlLXNoYXJwLmRs
bCAvcjpnZGstc2hhcnAuZGxsICQ8DQoNCmFsbDogQ2FudmFzRXhhbXBsZS5l
eGUNCg0KY2xlYW46DQoJcm0gLWYgKi5kbGwgKi5leGUNCg0K
---1463786239-1878420950-1068008484=:5865
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="CanvasExample.cs"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.4.44.0311042301241.5865@eowyn.dolinux.foobar>
Content-Description:
Content-Disposition: attachment; filename="CanvasExample.cs"
bmFtZXNwYWNlIEd0a1NhbXBsZXMgew0KDQoJdXNpbmcgR25vbWU7DQoJdXNp
bmcgR3RrOw0KCXVzaW5nIEdkazsNCgl1c2luZyBHdGtTaGFycDsNCgl1c2lu
ZyBTeXN0ZW07DQoJdXNpbmcgU3lzdGVtLlRocmVhZGluZzsNCg0KCXB1Ymxp
YyBjbGFzcyBDYW52YXNFeGFtcGxlIHsNCgkJcHJpdmF0ZSBpbnQgd2lkdGgg
PSA0MDAsIGhlaWdodCA9IDQwMDsgLy8gZGltZW5zaW9ucyBvZiBjYW52YXMN
CgkJcHJpdmF0ZSBpbnQgbG9vcHNpemUgPSA3MDAwMDsNCgkJcHJpdmF0ZSBk
b3VibGUgeCwgeTsgLy8gbG9jYXRpb24gb2Ygb3VyIHNxdWFyZQ0KCQlwcml2
YXRlIGRvdWJsZSBzaXplID0gMTA7IC8vIGxlbmd0aCBvZiBvdXIgc3F1YXJl
DQoJCXByaXZhdGUgQ2FudmFzIGNhbnZhczsNCgkJcHJpdmF0ZSBDYW52YXNS
RSBpdGVtOw0KCQlwcml2YXRlIFRocmVhZCBhbmltYXRlVGhyZWFkOw0KDQoJ
CXB1YmxpYyBDYW52YXNFeGFtcGxlICgpIHsNCgkJCUd0ay5XaW5kb3cgd2lu
ID0gbmV3IEd0ay5XaW5kb3cgKCJTaW1wbGUgVGVzdCIpOw0KCQkJd2luLkRl
bGV0ZUV2ZW50ICs9IG5ldyBEZWxldGVFdmVudEhhbmRsZXIgKFdpbmRvd19E
ZWxldGUpOw0KDQoJCQlWQm94IHZib3ggPSBuZXcgVkJveCAoZmFsc2UsIDAp
Ow0KCQkJd2luLkFkZCAodmJveCk7DQoNCgkJCWNhbnZhcyA9IG5ldyBDYW52
YXMgKCk7DQoJCQljYW52YXMuU2V0U2l6ZVJlc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