This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients vstinner
Date 2008-08-21.22:00:12
SpamBayes Score 4.6868114e-05
Marked as misclassified No
Message-id <1219356014.43.0.144260212562.issue3638@psf.upfronthosting.co.za>
In-reply-to
Content
mainloop() is a method of a Tkapp object, but it's also a method of 
_tkinter module. In TkApp_MainLoop, self is seen as a TkappObject 
whereas it can be a module object! So instruction 
like "self->dispatch=1" will replace a random byte in the module 
object (eg. ob_type attribute). Example to crash:
  import gc
  import _tkinter
  _tkinter.mainloop()
  gc.collect()

It always crashs in my Python 3.0, but not in Python 2.6.

Solution: just remove _tkinter.mainloop() => it should have no side 
effect since users use tkinter (without the "_") which only uses 
Tkapp.mainloop() (the right way to use Tkapp_MainLoop() function). 
Solution "implemented" in the patch.
History
Date User Action Args
2008-08-21 22:00:14vstinnersetrecipients: + vstinner
2008-08-21 22:00:14vstinnersetmessageid: <1219356014.43.0.144260212562.issue3638@psf.upfronthosting.co.za>
2008-08-21 22:00:13vstinnerlinkissue3638 messages
2008-08-21 22:00:13vstinnercreate