1
Python / Re: Script crashes on exit (sf.RenderWindow, sf.Texture)
« on: April 28, 2015, 08:27:20 pm »
Windows 7 64bit
python-3.3.5.amd64
pySFML-1.3.0.win64-py3.3
PyCharm Community Edition 4.0.6
The window appears, closes and then "Python.exe has stopped working".
Console output:
With slightly different code:
This works normal:
python-3.3.5.amd64
pySFML-1.3.0.win64-py3.3
PyCharm Community Edition 4.0.6
import sfml as sf
class Window(sf.RenderWindow):
def __init__(self):
super().__init__(sf.VideoMode(400, 300),'GAME')
if __name__ == '__main__':
w = Window()
sf.sleep(sf.seconds(3))
w.close()
class Window(sf.RenderWindow):
def __init__(self):
super().__init__(sf.VideoMode(400, 300),'GAME')
if __name__ == '__main__':
w = Window()
sf.sleep(sf.seconds(3))
w.close()
The window appears, closes and then "Python.exe has stopped working".
Console output:
Code: [Select]
Process finished with exit code -1073741819 (0xC0000005)
With slightly different code:
import sfml as sf
class Window(sf.RenderWindow):
def load_config(self):
self.title = 'GAME'
def __init__(self):
self.load_config()
super().__init__(sf.VideoMode(400, 300), 'GAME')
if __name__ == '__main__':
w = Window()
sf.sleep(sf.seconds(3))
w.close()
The window does not show. Instantly Python.exe crach, same message and output as for previous code.class Window(sf.RenderWindow):
def load_config(self):
self.title = 'GAME'
def __init__(self):
self.load_config()
super().__init__(sf.VideoMode(400, 300), 'GAME')
if __name__ == '__main__':
w = Window()
sf.sleep(sf.seconds(3))
w.close()
This works normal:
import sfml as sf
if __name__ == '__main__':
window = sf.RenderWindow(sf.VideoMode(88,88), 'yy')
sf.sleep(sf.seconds(5))
window.close()
if __name__ == '__main__':
window = sf.RenderWindow(sf.VideoMode(88,88), 'yy')
sf.sleep(sf.seconds(5))
window.close()