kmonsoor / pyglet

Automatically exported from code.google.com/p/pyglet
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

pyglet-1.1.4 memory leak in media.load streaming=True #746

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This code:

import pyglet

while True:
    source = pyglet.media.load("somefile.avi", streaming=True)

will give a memory leak soon with traceback:

Traceback (most recent call last):
  File "memleak.py", line 4, in <module>
    source = pyglet.media.load("test\AAA_Wielkanoc.avi", streaming=True)
  File "c:\python27\lib\site-packages\pyglet\media\__init__.py", line 1406, in load
    source = get_source_loader().load(filename, file)
  File "c:\python27\lib\site-packages\pyglet\media\__init__.py", line 1382, in load
    return avbin.AVbinSource(filename, file)
  File "c:\python27\lib\site-packages\pyglet\media\avbin.py", line 315, in __init__
    self._decode_thread.start()
  File "c:\python27\lib\site-packages\pyglet\media\__init__.py", line 144, in start
    self._thread.start()
  File "c:\python27\lib\threading.py", line 745, in start
    _start_new_thread(self.__bootstrap, ())
thread.error: can't start new thread

Original issue reported on code.google.com by michal....@gmail.com on 29 May 2014 at 2:23

GoogleCodeExporter commented 9 years ago
without "streaming = True" this code still gives a memory leak on pyglet 1.1.4

Original comment by michal....@gmail.com on 29 May 2014 at 2:25

GoogleCodeExporter commented 9 years ago
... and with the latest source checkout from google code's hg as for today 
(29.05.2014) the leak also exists. 

Original comment by michal....@gmail.com on 29 May 2014 at 2:48

GoogleCodeExporter commented 9 years ago
as muppy does NOT show raised objects count, I believe this leak has something 
to do with libavbin, investigating...

Original comment by michal....@gmail.com on 29 May 2014 at 2:52

GoogleCodeExporter commented 9 years ago
With libavbin-5 the leak does NOT occur. 

The leak occurs with libavbin-10. 

Original comment by michal....@gmail.com on 29 May 2014 at 2:54

GoogleCodeExporter commented 9 years ago
I was testing on win32 8 pro 64-bit, python 2.7 32bit.

libavbin-11 alpha4 for windows does NOT have the leak. 

Original comment by michal....@gmail.com on 29 May 2014 at 2:56

GoogleCodeExporter commented 9 years ago
Thanks for the follow up. Nathan is working on a new release of AVBin so 11 
will be the stable version soon.

Original comment by useboxnet on 30 May 2014 at 6:08