SFML community forums

Bindings - other languages => Python => Topic started by: hugoruscitti on October 14, 2010, 08:40:09 am

Title: bug in Image.Copy ?
Post by: hugoruscitti on October 14, 2010, 08:40:09 am
Hi, i working in a new library named pilas [1] with
pySFML but i get a segmentation fault when i try
to copy between images.

By example:

Code: [Select]

from PySFML import sf

window = sf.RenderWindow(sf.VideoMode(800, 600), "PySFML test")
running = True

imagen2 = sf.Image()
imagen2.LoadFromFile("pilas/data/bomba.png")

imagen = sf.Image()
imagen.LoadFromFile("pilas/data/banana.png")

rect = sf.IntRect(0, 0, 10, 10)
imagen.Copy(imagen2, 0, 0, rect)

sprite = sf.Sprite(imagen)


i get in console:

Code: [Select]

/bin/bash: line 1:  6023 Segmentation fault      python test_bug.py

shell returned 139



This is a bug?, is there any way to work around to it?

I want to create a surface with tiles in a simple tiled map editor.

[1] www.pilas-engine.com.ar
Title: bug in Image.Copy ?
Post by: Tank on October 14, 2010, 10:18:02 am
Mh, I think that one was reported before. I guess you're using PySFML 1.6?
Title: bug in Image.Copy ?
Post by: lattyware on December 31, 2010, 06:04:49 pm
This is a problem I have had, whenever I use the sf.Image.Copy method the program crashes with a segfault. It's rather annoying to say the least.