[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] pgu broken with pygame 1.8.1release ? - patch for one bug(crash)
- To: pygame-users@xxxxxxxx
- Subject: Re: [pygame] pgu broken with pygame 1.8.1release ? - patch for one bug(crash)
- From: "René Dudfield" <renesd@xxxxxxxxx>
- Date: Fri, 15 Aug 2008 10:49:10 +1000
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Thu, 14 Aug 2008 20:49:17 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=f10s6qHKv3z/20i9SG8528BsFgzsLUkgfIIeiCFuN3A=; b=dfBmRMQi3LoUFNak4TQrFduNDqmr3V4qHm7Kz8LdePMX+/P3+vIzoDPfZHlMTc4mbM 9mMA6sX7kigkIjS/0Pmy0YWGt5JeT/CV8Pdc+v3Lz7Yn7aJFj9P9QJjJIqj43w80zyFV BlJF2KgllkpEOFE4sW0jWm16beV41xsCJrmZc=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=olaG2VPrm5cIHoZqmcWkFdW1uP0R6+m3Cd4r6AuTHj97m1jheX3n5nkQqAm0No/kbK taR3ZnBVZe+Qc3bgCgYtS66JooV1/hMj3lWVFNdbmHI0E9W2KN5SlBA8TCn5Q7JZrXar FqkH45Y/a8/p/iEysv6oagrxn6Paaifk3OXLE=
- In-reply-to: <f5f20e3a0808140746j22f8ea4cm3b12b171de565d9@xxxxxxxxxxxxxx>
- References: <f5f20e3a0808140746j22f8ea4cm3b12b171de565d9@xxxxxxxxxxxxxx>
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
ah, bugger.
I don't think we can fix this error in pygame.
As the code was using:
if type(x) == tuple:
Unfortunately we can't make the Color type a tuple type.
This is annoying, because pgu is used by a lot of games. So the Color
changes in pygame 1.8.1 will break a lot of things. Well, they'll
need to patch pgu.
On Fri, Aug 15, 2008 at 12:46 AM, claudio canepa <ccanepacc@xxxxxxxxx> wrote:
> Knowing that a number of pygame games used pgu, and on top of that pyweek is
> near, I take the liberty to re-post at pygame-users.
>
> pgu broken with pygame 1.8.1release ? - patch for one bug(crash)
> Nine of the demos crash with the same (except script name) traceback:
>
> Traceback (most recent call last):
> File "F:\cla 2008 08 13\trunk\examples\gui11.py", line 67, in ?
> app.run(main)
> File "..\pgu\gui\app.py", line 207, in run
> self.loop()
> File "..\pgu\gui\app.py", line 163, in loop
> us = self.update(s)
> File "..\pgu\gui\app.py", line 188, in update
> self.paint(screen)
> File "..\pgu\gui\app.py", line 174, in paint
> container.Container.paint(self,screen)
> File "..\pgu\gui\container.py", line 100, in paint
> w.paint(sub)
> File "..\pgu\gui\theme.py", line 288, in func
> r = m(surface.subsurface(s,w._rect_content))
> File "..\pgu\gui\container.py", line 100, in paint
> w.paint(sub)
> File "..\pgu\gui\theme.py", line 288, in func
> r = m(surface.subsurface(s,w._rect_content))
> File "..\pgu\gui\container.py", line 100, in paint
> w.paint(sub)
> File "..\pgu\gui\theme.py", line 288, in func
> r = m(surface.subsurface(s,w._rect_content))
> File "..\pgu\gui\container.py", line 100, in paint
> w.paint(sub)
> File "..\pgu\gui\theme.py", line 286, in func
> w.background.paint(surface.subsurface(s,w._rect_border))
> File "..\pgu\gui\theme.py", line 473, in paint
> self.theme.render(s,v,r)
> File "..\pgu\gui\theme.py", line 404, in render
> ww,hh=box.get_width()/3,box.get_height()/3
> AttributeError: 'pygame.Color' object has no attribute 'get_width'
>
> The offending scripts are:
> gui6.py
> gui11.py
> gui13.py
> gui15.py
> gui16.py
> gui17.py
>
> html2.py
> html3.py
> html5.py
>
> Besides, gui9.py don't crash but misbehaves: with pygame 1.7.1 you can draw
> boxes and circles but with pygame 1.8.1release no boxes and circles.
>
> I tried pgu '0.10.6' ( checked out from imitation pickles, rev 38 ), also
> pgu-0.10.6.tar.gz from sourceforge and pgu 0.10.3, same results.
>
> The demos run fine with pygame 1.7.1
>
> Extra info:
> win xp + sp2, python 2.4.3
>
> Okay, found the problem for the crashes: will manifest in widgets with solid
> color background.
> Cause: color was a tuple, now it is a pygame.colors.Color instance. See
> patch for details.
> A patch (against pgu svn imitation pickles r38) is attached.
> It is pygame 1.7.1 and 1.8.1 compatible.
>
> The other problem (gui9.py misbehaving with pygame 1.8.1release) remains.
>
> --
> claxo
>
> -------------------------
>