Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Python binding buggy?  (Read 15341 times)

0 Members and 1 Guest are viewing this topic.

Spellbreaker

  • Newbie
  • *
  • Posts: 33
    • ICQ Messenger - 287156171
    • MSN Messenger - spellbreaker@live.de
    • Yahoo Instant Messenger - Spellbreaker1979
    • View Profile
    • http://www.apeironstudios.com
Python binding buggy?
« Reply #15 on: September 23, 2010, 02:21:23 pm »
I rebuilt the sf.pyd using mingw32-gcc-4.5.0 . Did not changed anything in the sources or whatever.

Now the error does not happen.

Download it here :



Built with Python 2.7
http://www.apeironstudios.com/sf-mingw32-4.5.0-python-2.7.zip

Built with Python 3.1.2
http://www.apeironstudios.com/sf-mingw32-4.5.0-python-3.1.2.zip

Greets,

Spellbreaker

Kadoba

  • Newbie
  • *
  • Posts: 7
    • View Profile
Python binding buggy?
« Reply #16 on: December 24, 2010, 02:03:00 pm »
I am getting exactly the same errors as posted here. I'm running vista32 and python 2.7 32bit. I've tried the precompiled binaries and compiling them myself with MinGW 4.4.1 with the same results.

Whenever python tries to dispose of a sf window it will immediately crash the interpreter without an error.

Code: [Select]
from PySFML import sf
import gc

win = sf.Window()
del win        # Nothing
gc.collect()   # Crash


I can run the worms example but it crashes past the menu selection.

I don't know if it's related but I also get errors using some of the image functions. Specifically, sf.Image.Copy() and sf.Image.Create() will both produce this error:

Code: [Select]
Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
SystemError: ..\Python\getargs.c:1424: bad argument to internal function

Kadoba

  • Newbie
  • *
  • Posts: 7
    • View Profile
Python binding buggy?
« Reply #17 on: December 24, 2010, 08:33:42 pm »
Okay I tried compiling with MinGW 4.5 and I don't get the crash errors anymore but I do still get the one error from the image functions.

JS Lemming

  • Newbie
  • *
  • Posts: 1
    • View Profile
Python binding buggy?
« Reply #18 on: January 23, 2011, 09:09:24 pm »
I can confirm there is a problem.

In the worms demo, it crashes after selecting a difficulty. "Python.exe has stopped working."

It would appear to crash after running this line twice:
Code: [Select]
self['arena_rect'] = sf.Shape.Rectangle(self.arena_left, self.arena_top, self.arena_right, self.arena_bottom, sf.Color.Black)

I found that by putting prints in places closer and closer to the crash point.

Code: [Select]
def update_arena_rect(self):
print "before"
self['arena_rect'] = sf.Shape.Rectangle(self.arena_left, self.arena_top, self.arena_right, self.arena_bottom, sf.Color.Black)
print "after"

it prints "Before After Before" and then crashes.

I'm using python 2.6.6

I've tried this with Win7 32Bit and Win7 64Bit. It works, however, on WinXP 32Bit.

 

anything