Re: [PyKDE] memleak with QMovie

2005-09-21 Thread Russell Valentine
Torsten Marek said the following on 09/20/05 13:06:
> Hans-Peter Jansen schrieb:
> 
>>>Am Montag, 19. September 2005 00:28 schrieb Russell Valentine:
>>>
>>>
Phil Thompson said the following on 09/18/05 17:13:


>On Sunday 18 September 2005 10:11 pm, Russell Valentine wrote:
>
>
>>So if it isn't doing it on your system, I wonder what is different
>>with mine that causes this. It does it on two of my systems Debian
>>and Gentoo. Alright then, if it was just me sorry to bother you, I
>>thought I was onto something. If I ever figure out the reason for
>>this I'll post it in case anyone was curious.
>
>No, I'm saying that I don't think your test is working for me. Is
>the movie supposed to be played - as it does with the Qt movie
>example?
>
>Phil

No it isn't supposed to do anything (just a blank QMainWindow pops up
no QMovie in it or anything), it loads a QMovie object and doesn't do
anything with it. It seems the very fact of doing
"variable=QMovie(path_to_mng)" then causes there to be a memory leak
for me. I was attempting to make it as simple as possible so the
memleak.py doesn't do anything expect make a blank QMainWindow and
set a variable to a QMovie object.
>>>
>>>
>>>Something strange is going on on your side. 
>>>
>>>Cannot reproduce it here under SuSE 9.3 with Python 2.4, Qt 3.3.4, sip 
>>>4.1.1 and PyQt 3.13.
>>>
>>>Let us know the versions of your distribution, Python, Qt, sip and PyQt 
>>>and who made them for a start..
>>>
> 
> 
> Hi,
> 
> I see some increased memory usage while running the program.
> 
> Qt 3.3.5
> sip 4.3.1
> PyQt 3.15
> 
> Compiler: g++ 4.0.2
> 
> All packages are as official as possible, given that I created the packages 
> for
> sip and PyQt.
> 
> greetings
> 
> Torsten

Comforting knowing it isn't just me.

More info I upgraded to Python 2.4.1 still same issue. I am using "gcc
version 3.3.6 (Gentoo 3.3.6, ssp-3.3.6-1.0, pie-8.7.8)". I'll keep
trying different stuff, or perhaps actually see how PyQt works
internally to see if I could get a hint out of that.


Russell Valentine


signature.asc
Description: OpenPGP digital signature
___
PyKDE mailing listPyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde


Re: [PyKDE] memleak with QMovie

2005-09-20 Thread Torsten Marek
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hans-Peter Jansen schrieb:
> Am Montag, 19. September 2005 00:28 schrieb Russell Valentine:
> 
>>Phil Thompson said the following on 09/18/05 17:13:
>>
>>>On Sunday 18 September 2005 10:11 pm, Russell Valentine wrote:
>>>
So if it isn't doing it on your system, I wonder what is different
with mine that causes this. It does it on two of my systems Debian
and Gentoo. Alright then, if it was just me sorry to bother you, I
thought I was onto something. If I ever figure out the reason for
this I'll post it in case anyone was curious.
>>>
>>>No, I'm saying that I don't think your test is working for me. Is
>>>the movie supposed to be played - as it does with the Qt movie
>>>example?
>>>
>>>Phil
>>
>>No it isn't supposed to do anything (just a blank QMainWindow pops up
>>no QMovie in it or anything), it loads a QMovie object and doesn't do
>>anything with it. It seems the very fact of doing
>>"variable=QMovie(path_to_mng)" then causes there to be a memory leak
>>for me. I was attempting to make it as simple as possible so the
>>memleak.py doesn't do anything expect make a blank QMainWindow and
>>set a variable to a QMovie object.
> 
> 
> Something strange is going on on your side. 
> 
> Cannot reproduce it here under SuSE 9.3 with Python 2.4, Qt 3.3.4, sip 
> 4.1.1 and PyQt 3.13.
> 
> Let us know the versions of your distribution, Python, Qt, sip and PyQt 
> and who made them for a start..
> 

Hi,

I see some increased memory usage while running the program.

Qt 3.3.5
sip 4.3.1
PyQt 3.15

Compiler: g++ 4.0.2

All packages are as official as possible, given that I created the packages for
sip and PyQt.

greetings

Torsten
- --
Torsten Marek <[EMAIL PROTECTED]>
ID: A244C858 -- FP: 1902 0002 5DFC 856B F146  894C 7CC5 451E A244 C858
Keyserver: subkeys.pgp.net

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDME+NfMVFHqJEyFgRApqcAKCx7Y8tnaKxnPSoWmatCMn9erVVWgCfdHya
fskMnWI/T+0VJxzMet/uxEs=
=DO+b
-END PGP SIGNATURE-

___
PyKDE mailing listPyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde


Re: [PyKDE] memleak with QMovie

2005-09-19 Thread Russell Valentine
Hans-Peter Jansen said the following on 09/19/05 08:35:
> Am Montag, 19. September 2005 00:28 schrieb Russell Valentine:
> 
>>Phil Thompson said the following on 09/18/05 17:13:
>>
>>>On Sunday 18 September 2005 10:11 pm, Russell Valentine wrote:
>>>
So if it isn't doing it on your system, I wonder what is different
with mine that causes this. It does it on two of my systems Debian
and Gentoo. Alright then, if it was just me sorry to bother you, I
thought I was onto something. If I ever figure out the reason for
this I'll post it in case anyone was curious.
>>>
>>>No, I'm saying that I don't think your test is working for me. Is
>>>the movie supposed to be played - as it does with the Qt movie
>>>example?
>>>
>>>Phil
>>
>>No it isn't supposed to do anything (just a blank QMainWindow pops up
>>no QMovie in it or anything), it loads a QMovie object and doesn't do
>>anything with it. It seems the very fact of doing
>>"variable=QMovie(path_to_mng)" then causes there to be a memory leak
>>for me. I was attempting to make it as simple as possible so the
>>memleak.py doesn't do anything expect make a blank QMainWindow and
>>set a variable to a QMovie object.
> 
> 
> Something strange is going on on your side. 
> 
> Cannot reproduce it here under SuSE 9.3 with Python 2.4, Qt 3.3.4, sip 
> 4.1.1 and PyQt 3.13.
> 
> Let us know the versions of your distribution, Python, Qt, sip and PyQt 
> and who made them for a start..
> 
> Pete
> 

Latest Gentoo
Python 2.3.5-r2
Qt 3.3.4-r3
sip snapshot 20050917
PyQt snapshot-20050917

Debian testing
Python 2.3.5-3
Qt 3.3.4-3
sip snapshot 20050917
PyQt snapshot-20050917

Actually the debian doesn't have the leak in QMovie, there is a leak
somewhere else because my application still is losing memory somewhere.
I narrowed one leak using Gentoo to QMovie and it does it reliably
thought I found it, but the Debian box doesn't leak with the QMovie
example the leak is somewhere else.

Ok, so if you don't have the leak either, I'll just assume something is
really weird with me. I also need to narrow the debian leak.

So there must be something I do terribly wrong when I install sip and
PyQt or PyKDE because both machines cause leaks one way or another. I've
been having troubles for months, this whole time I was just waiting on a
newer version but it seems it is me that has the problem.

Thanks for your time.


Russell Valentine


signature.asc
Description: OpenPGP digital signature
___
PyKDE mailing listPyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde


Re: [PyKDE] memleak with QMovie

2005-09-19 Thread Hans-Peter Jansen
Am Montag, 19. September 2005 00:28 schrieb Russell Valentine:
> Phil Thompson said the following on 09/18/05 17:13:
> > On Sunday 18 September 2005 10:11 pm, Russell Valentine wrote:
> >>So if it isn't doing it on your system, I wonder what is different
> >> with mine that causes this. It does it on two of my systems Debian
> >> and Gentoo. Alright then, if it was just me sorry to bother you, I
> >> thought I was onto something. If I ever figure out the reason for
> >> this I'll post it in case anyone was curious.
> >
> > No, I'm saying that I don't think your test is working for me. Is
> > the movie supposed to be played - as it does with the Qt movie
> > example?
> >
> > Phil
>
> No it isn't supposed to do anything (just a blank QMainWindow pops up
> no QMovie in it or anything), it loads a QMovie object and doesn't do
> anything with it. It seems the very fact of doing
> "variable=QMovie(path_to_mng)" then causes there to be a memory leak
> for me. I was attempting to make it as simple as possible so the
> memleak.py doesn't do anything expect make a blank QMainWindow and
> set a variable to a QMovie object.

Something strange is going on on your side. 

Cannot reproduce it here under SuSE 9.3 with Python 2.4, Qt 3.3.4, sip 
4.1.1 and PyQt 3.13.

Let us know the versions of your distribution, Python, Qt, sip and PyQt 
and who made them for a start..

Pete

___
PyKDE mailing listPyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde


Re: [PyKDE] memleak with QMovie

2005-09-18 Thread Russell Valentine
Phil Thompson said the following on 09/18/05 17:13:
> On Sunday 18 September 2005 10:11 pm, Russell Valentine wrote:
> 
>>
>>So if it isn't doing it on your system, I wonder what is different with
>>mine that causes this. It does it on two of my systems Debian and
>>Gentoo. Alright then, if it was just me sorry to bother you, I thought I
>>was onto something. If I ever figure out the reason for this I'll post
>>it in case anyone was curious.
> 
> 
> No, I'm saying that I don't think your test is working for me. Is the movie 
> supposed to be played - as it does with the Qt movie example?
> 
> Phil
> 

No it isn't supposed to do anything (just a blank QMainWindow pops up no
QMovie in it or anything), it loads a QMovie object and doesn't do
anything with it. It seems the very fact of doing
"variable=QMovie(path_to_mng)" then causes there to be a memory leak for
me. I was attempting to make it as simple as possible so the memleak.py
doesn't do anything expect make a blank QMainWindow and set a variable
to a QMovie object.


Russell Valentine

___
PyKDE mailing listPyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde


Re: [PyKDE] memleak with QMovie

2005-09-18 Thread Phil Thompson
On Sunday 18 September 2005 10:11 pm, Russell Valentine wrote:
> Phil Thompson said the following on 09/18/05 14:07:
> > On Sunday 18 September 2005 6:12 pm, Russell Valentine wrote:
> >>Phil Thompson said the following on 09/18/05 05:18:
> >>>On Sunday 18 September 2005 9:04 am, Russell Valentine wrote:
> I've been seeing a mem leak in my PyKDE application for several months.
> I figured it was because I upgraded KDE to 3.4 or something because I
> saw it around that time. I finally made my self try to figure out where
> the leak was coming from and narrowed it down to QMovie.
> >>>
> >>>Difficult to see how this would be a PyQt problem. I'd try a C++ version
> >>>and see if the problem is still there.
> >>>
> >>>Phil
> >>
> >>I tried a C++ version and I see no memory leak. So it seems localized to
> >>something with PyQt. Attached is a tar with the C++ code and the python
> >>one for comparison.
> >
> > They both do the same thing for me - which is nothing. Am I missing
> > something? The Qt movies example plays the file fine.
> >
> > Phil
>
> So the python example on your system doesn't eventually use up a lot of
> memory?
>
> For example on my system:
>
> $ python memleak.py& ps auxw| head -n 1|awk '{ print $4" "$11"
> "$12}';while `/bin/true`; do
> ps auxw|grep memleak | grep -v grep | awk '{ print $4" "$11" "$12}'
> sleep 60
> done
>
> OUTPUT:
> %MEM COMMAND
> 2.1 python memleak.py
> 2.3 python memleak.py
> 2.5 python memleak.py
> 2.7 python memleak.py
> 2.9 python memleak.py
> 3.0 python memleak.py
> 3.2 python memleak.py
> ... higher %MEM everytime
>
> If I run it for a few hours, all my RAM is being used by python. Comment
> out the QMovie statement and the memory usage is constant.
>
> As compared to the C++ version of the program on my system.
>
> $ ./memleak& ps auxw| head -n 1|awk '{ print $4" "$11" "$12}';while
> `/bin/true`; do
> ps auxw|grep memleak | grep -v grep | awk '{ print $4" "$11" "$12}'
> sleep 60
> done
>
> OUTPUT:
> %MEM COMMAND
> 1.4 ./memleak
> 1.4 ./memleak
> 1.4 ./memleak
> 1.4 ./memleak
> 1.4 ./memleak
> 1.4 ./memleak
> 1.4 ./memleak
> 1.4 ./memleak
> ... constant mem usage
>
>
> The python version without QMovie:
>
> $ python memleak-noqmovie.py& ps auxw| head -n 1|awk '{ print $4" "$11"
> "$12}';while `/bin/true`; do
> ps auxw|grep memleak | grep -v grep | awk '{ print $4" "$11" "$12}'
> sleep 60
> done
>
> OUTPUT:
> %MEM COMMAND
> 1.9 python memleak-noqmovie.py
> 2.0 python memleak-noqmovie.py
> 2.0 python memleak-noqmovie.py
> 2.0 python memleak-noqmovie.py
> 2.0 python memleak-noqmovie.py
> 2.0 python memleak-noqmovie.py
> 2.0 python memleak-noqmovie.py
> 2.0 python memleak-noqmovie.py
> 2.0 python memleak-noqmovie.py
> 2.0 python memleak-noqmovie.py
> 2.0 python memleak-noqmovie.py
> ... constant mem usage
>
>
> So if it isn't doing it on your system, I wonder what is different with
> mine that causes this. It does it on two of my systems Debian and
> Gentoo. Alright then, if it was just me sorry to bother you, I thought I
> was onto something. If I ever figure out the reason for this I'll post
> it in case anyone was curious.

No, I'm saying that I don't think your test is working for me. Is the movie 
supposed to be played - as it does with the Qt movie example?

Phil

___
PyKDE mailing listPyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde


Re: [PyKDE] memleak with QMovie

2005-09-18 Thread Russell Valentine
Phil Thompson said the following on 09/18/05 14:07:
> On Sunday 18 September 2005 6:12 pm, Russell Valentine wrote:
> 
>>Phil Thompson said the following on 09/18/05 05:18:
>>
>>>On Sunday 18 September 2005 9:04 am, Russell Valentine wrote:
>>>
I've been seeing a mem leak in my PyKDE application for several months.
I figured it was because I upgraded KDE to 3.4 or something because I
saw it around that time. I finally made my self try to figure out where
the leak was coming from and narrowed it down to QMovie.
>>>
>>>Difficult to see how this would be a PyQt problem. I'd try a C++ version
>>>and see if the problem is still there.
>>>
>>>Phil
>>
>>I tried a C++ version and I see no memory leak. So it seems localized to
>>something with PyQt. Attached is a tar with the C++ code and the python
>>one for comparison.
> 
> 
> They both do the same thing for me - which is nothing. Am I missing 
> something? 
> The Qt movies example plays the file fine.
> 
> Phil


So the python example on your system doesn't eventually use up a lot of
memory?

For example on my system:

$ python memleak.py& ps auxw| head -n 1|awk '{ print $4" "$11"
"$12}';while `/bin/true`; do
ps auxw|grep memleak | grep -v grep | awk '{ print $4" "$11" "$12}'
sleep 60
done

OUTPUT:
%MEM COMMAND
2.1 python memleak.py
2.3 python memleak.py
2.5 python memleak.py
2.7 python memleak.py
2.9 python memleak.py
3.0 python memleak.py
3.2 python memleak.py
... higher %MEM everytime

If I run it for a few hours, all my RAM is being used by python. Comment
out the QMovie statement and the memory usage is constant.

As compared to the C++ version of the program on my system.

$ ./memleak& ps auxw| head -n 1|awk '{ print $4" "$11" "$12}';while
`/bin/true`; do
ps auxw|grep memleak | grep -v grep | awk '{ print $4" "$11" "$12}'
sleep 60
done

OUTPUT:
%MEM COMMAND
1.4 ./memleak
1.4 ./memleak
1.4 ./memleak
1.4 ./memleak
1.4 ./memleak
1.4 ./memleak
1.4 ./memleak
1.4 ./memleak
... constant mem usage


The python version without QMovie:

$ python memleak-noqmovie.py& ps auxw| head -n 1|awk '{ print $4" "$11"
"$12}';while `/bin/true`; do
ps auxw|grep memleak | grep -v grep | awk '{ print $4" "$11" "$12}'
sleep 60
done

OUTPUT:
%MEM COMMAND
1.9 python memleak-noqmovie.py
2.0 python memleak-noqmovie.py
2.0 python memleak-noqmovie.py
2.0 python memleak-noqmovie.py
2.0 python memleak-noqmovie.py
2.0 python memleak-noqmovie.py
2.0 python memleak-noqmovie.py
2.0 python memleak-noqmovie.py
2.0 python memleak-noqmovie.py
2.0 python memleak-noqmovie.py
2.0 python memleak-noqmovie.py
... constant mem usage


So if it isn't doing it on your system, I wonder what is different with
mine that causes this. It does it on two of my systems Debian and
Gentoo. Alright then, if it was just me sorry to bother you, I thought I
was onto something. If I ever figure out the reason for this I'll post
it in case anyone was curious.


Russell Valentine

___
PyKDE mailing listPyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde


Re: [PyKDE] memleak with QMovie

2005-09-18 Thread Phil Thompson
On Sunday 18 September 2005 6:12 pm, Russell Valentine wrote:
> Phil Thompson said the following on 09/18/05 05:18:
> > On Sunday 18 September 2005 9:04 am, Russell Valentine wrote:
> >>I've been seeing a mem leak in my PyKDE application for several months.
> >>I figured it was because I upgraded KDE to 3.4 or something because I
> >>saw it around that time. I finally made my self try to figure out where
> >>the leak was coming from and narrowed it down to QMovie.
> >
> > Difficult to see how this would be a PyQt problem. I'd try a C++ version
> > and see if the problem is still there.
> >
> > Phil
>
> I tried a C++ version and I see no memory leak. So it seems localized to
> something with PyQt. Attached is a tar with the C++ code and the python
> one for comparison.

They both do the same thing for me - which is nothing. Am I missing something? 
The Qt movies example plays the file fine.

Phil

___
PyKDE mailing listPyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde


Re: [PyKDE] memleak with QMovie

2005-09-18 Thread Russell Valentine
Phil Thompson said the following on 09/18/05 05:18:
> On Sunday 18 September 2005 9:04 am, Russell Valentine wrote:
> 
>>I've been seeing a mem leak in my PyKDE application for several months.
>>I figured it was because I upgraded KDE to 3.4 or something because I
>>saw it around that time. I finally made my self try to figure out where
>>the leak was coming from and narrowed it down to QMovie.
>>
> 
> Difficult to see how this would be a PyQt problem. I'd try a C++ version and 
> see if the problem is still there.
> 
> Phil
> 

I tried a C++ version and I see no memory leak. So it seems localized to
something with PyQt. Attached is a tar with the C++ code and the python
one for comparison.


Russell Valentine


memleak.tar.gz
Description: GNU Zip compressed data
___
PyKDE mailing listPyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde


Re: [PyKDE] memleak with QMovie

2005-09-18 Thread Phil Thompson
On Sunday 18 September 2005 9:04 am, Russell Valentine wrote:
> I've been seeing a mem leak in my PyKDE application for several months.
> I figured it was because I upgraded KDE to 3.4 or something because I
> saw it around that time. I finally made my self try to figure out where
> the leak was coming from and narrowed it down to QMovie.
>
> Attached is a minimal program where I see the leak happening it doesn't
> require PyKDE only PyQT. Slowly the memory usage of the application goes
> up, when I comment the QMovie line there is no memory leak. I hadn't
> tried a C++ version of it so I don't know where the heart of the problem
> lies. I am running Gentoo with the latest sip, and pyqt snapshots (qt
> 3.3.4). I don't think it is my setup because it does the same on my
> Debian box and it has been doing it for a while which include previous
> versions of sip and pyqt.
>
> Thanks for any help resolving this issue.

Difficult to see how this would be a PyQt problem. I'd try a C++ version and 
see if the problem is still there.

Phil

___
PyKDE mailing listPyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde