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

Author Topic: Drawing Shape.Rectangle crashes on Windows  (Read 7409 times)

0 Members and 1 Guest are viewing this topic.

nonexistent

  • Newbie
  • *
  • Posts: 14
    • View Profile
Drawing Shape.Rectangle crashes on Windows
« on: October 25, 2009, 04:48:24 pm »
I have a bit of code that draws a rectangle on the screen:

Code: [Select]
drawRect = Shape.Rectangle(rect.Left, rect.Top, rect.Right, rect.Bottom, Color.Green)
renderWindow.Draw(drawRect)


This works fine in Linux but crashes running under Windows (no error output in console before the program dies).  This same behavior occurs on two of my team's computers (both Windows Vista).  We are using Python3.0 and PySFML 1.5.

Is this a bug anyone has encountered before?

adema

  • Newbie
  • *
  • Posts: 14
    • View Profile
Drawing Shape.Rectangle crashes on Windows
« Reply #1 on: February 24, 2010, 01:42:16 am »
Well, lucky you!
sf.Shape doesn't exist for me ...
Code: [Select]

>>> from PySFML import sf
>>> sf.Shape
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'Shape'
[/quote]

Maybe i missed something ... but what ?

Adema

P.S : under linux

Tank

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1486
    • View Profile
    • Blog
    • Email
Drawing Shape.Rectangle crashes on Windows
« Reply #2 on: February 26, 2010, 10:04:38 am »
nonexistent, can you provide a complete example?

adema, can you describe which steps you took to build and install PySFML?

nonexistent

  • Newbie
  • *
  • Posts: 14
    • View Profile
Drawing Shape.Rectangle crashes on Windows
« Reply #3 on: March 09, 2010, 10:27:50 pm »
Tank: I wrote a minimal example and that runs correctly for some reason.  I guess it must have been some quirk with the previous project I was working on  :?:

Oh well, guess things are fine now.  I had hacked together a draw rectangle function to work around this earlier by drawing a resized blank sprite.

 

anything