[pygtk] pyGtk segfault comparing gtk.Image with 0

2009-10-17 Thread Ralph Sleigh
Hey

The following code is getting me a segfault (found by mistake on my
part, meant to compare with another attribute):

#!/usr/bin/env python
# -*- coding: utf-8 -*-

import pygtk
pygtk.require('2.0')
import gtk

class myImage(gtk.Image):
def __init__(self):
  return

image = myImage()

if(image.parent == 0):
print image


Current Ubuntu 9.04, python2.6.2-0ubuntu1, python-gtk2 2.14.1ubuntu1

It's silly code I know, but a more friendly error would be nice.

-Ralph



signature.asc
Description: OpenPGP digital signature
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Re: [pygtk] pyGtk segfault comparing gtk.Image with 0

2009-10-17 Thread René 'Necoro' Neumann
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Well -- you are not initializing gtk.Image. So it's your very own
mistake. I don't see a pygtk issue here.
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkrZ7PIACgkQ4UOg/zhYFuB9TgCcCGNFRlS4MHf/G97U8FphEczC
vh4AmwZmNhY2Ph1n7uRLf1FbDR2kADLu
=IIT/
-END PGP SIGNATURE-
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] pyGtk segfault comparing gtk.Image with 0

2009-10-17 Thread Tomeu Vizoso
On Sat, Oct 17, 2009 at 17:12, René 'Necoro' Neumann li...@necoro.eu wrote:

 Well -- you are not initializing gtk.Image. So it's your very own
 mistake. I don't see a pygtk issue here.

This is Python, any crash is a bug.

Regards,

Tomeu
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] pyGtk segfault comparing gtk.Image with 0

2009-10-17 Thread Pietro Battiston
Il giorno sab, 17/10/2009 alle 17.30 +0100, Tomeu Vizoso ha scritto:
 On Sat, Oct 17, 2009 at 17:12, René 'Necoro' Neumann li...@necoro.eu wrote:
 
  Well -- you are not initializing gtk.Image. So it's your very own
  mistake. I don't see a pygtk issue here.
 
 This is Python, any crash is a bug.

Wait, wait.

Read http://bugzilla.gnome.org/show_bug.cgi?id=561130 , then come back
here and let's talk :-)

Pietro

(P.S: as you can desume from the page, I _would like_ to agree with you)


signature.asc
Description: Questa è una parte del messaggio firmata digitalmente
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Re: [pygtk] pyGtk segfault comparing gtk.Image with 0

2009-10-17 Thread Paul Pogonyshev
Pietro Battiston wrote:
 Il giorno sab, 17/10/2009 alle 17.30 +0100, Tomeu Vizoso ha scritto:
  On Sat, Oct 17, 2009 at 17:12, René 'Necoro' Neumann li...@necoro.eu 
  wrote:
  
   Well -- you are not initializing gtk.Image. So it's your very own
   mistake. I don't see a pygtk issue here.
  
  This is Python, any crash is a bug.
 
 Wait, wait.
 
 Read http://bugzilla.gnome.org/show_bug.cgi?id=561130 , then come back
 here and let's talk :-)
 
 Pietro
 
 (P.S: as you can desume from the page, I _would like_ to agree with you)

You can still rightfully agree with him that it _is_ a bug.  Whether
it gets fixed is another point.

Paul
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] pyGtk segfault comparing gtk.Image with 0

2009-10-17 Thread Pietro Battiston
Il giorno sab, 17/10/2009 alle 20.49 +0300, Paul Pogonyshev ha scritto:
 Pietro Battiston wrote:
  Il giorno sab, 17/10/2009 alle 17.30 +0100, Tomeu Vizoso ha scritto:
   On Sat, Oct 17, 2009 at 17:12, René 'Necoro' Neumann li...@necoro.eu 
   wrote:
   
Well -- you are not initializing gtk.Image. So it's your very own
mistake. I don't see a pygtk issue here.
   
   This is Python, any crash is a bug.
  
  Wait, wait.
  
  Read http://bugzilla.gnome.org/show_bug.cgi?id=561130 , then come back
  here and let's talk :-)
  
  Pietro
  
  (P.S: as you can desume from the page, I _would like_ to agree with you)
 
 You can still rightfully agree with him that it _is_ a bug.  Whether
 it gets fixed is another point.

What I mean is: where is it written that every crash is a bug, if Pygtk
developers themselves are not so clear on that (and I'm possibly too
ignorant)?

Pietro

___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Re: [pygtk] pyGtk segfault comparing gtk.Image with 0

2009-10-17 Thread Paul Pogonyshev
Pietro Battiston wrote:
 What I mean is: where is it written that every crash is a bug, if Pygtk
 developers themselves are not so clear on that (and I'm possibly too
 ignorant)?

I am a PyGTK developer (not active currently), Matthias Classen is
not.  He is a developer of GTK+ itself.  I think it is pretty much
common sense that Python or any other script language must not crash.

For the record, the bug with gtk.Image (actually, with almost any
PyGObject wrapper class) is known and there is an entry for it in the
Bugzilla.  It is a bug in PyGTK/PyGObject, not GTK+.

Paul
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] pyGtk segfault comparing gtk.Image with 0

2009-10-17 Thread John Finlay
Pietro Battiston wrote:
 Il giorno sab, 17/10/2009 alle 20.49 +0300, Paul Pogonyshev ha scritto:
   
 Pietro Battiston wrote:
 
 Il giorno sab, 17/10/2009 alle 17.30 +0100, Tomeu Vizoso ha scritto:
   
 On Sat, Oct 17, 2009 at 17:12, René 'Necoro' Neumann li...@necoro.eu 
 wrote:
 
 Well -- you are not initializing gtk.Image. So it's your very own
 mistake. I don't see a pygtk issue here.
   
 This is Python, any crash is a bug.
 
 Wait, wait.

 Read http://bugzilla.gnome.org/show_bug.cgi?id=561130 , then come back
 here and let's talk :-)

 Pietro

 (P.S: as you can desume from the page, I _would like_ to agree with you)
   
 You can still rightfully agree with him that it _is_ a bug.  Whether
 it gets fixed is another point.
 

 What I mean is: where is it written that every crash is a bug, if Pygtk
 developers themselves are not so clear on that (and I'm possibly too
 ignorant)?

   
this question has come around a couple of times before and I recall that 
each time it's deemed too impractical to catch every possible error to 
prevent a segfault.

John
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/