Memory Leak?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Memory Leak?

Keith
Hi Marcus,

I think I posted them in the wrong way earlier.

I am running libgphoto 2.5.0 on Ubuntu 10.04 and testing with the sample-preview in the examples directory. I noticed in top that each time that I run sample-preview the total amount of memory used increases. Is this a memory leak while saving files out to the disk? This is an issue for me as I am running in live view mode at 30 frames per seconds for several minutes and eventually getting an out-of-memory error even though I have 4GB.

Regards,
Keith

------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Gphoto-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gphoto-user
Reply | Threaded
Open this post in threaded view
|

Re: Memory Leak?

Marcus Meissner
On Mon, Jul 15, 2013 at 02:36:56PM -0700, Keith Laband wrote:

> Hi Marcus,
>
> I think I posted them in the wrong way earlier.
>
> I am running libgphoto 2.5.0 on Ubuntu 10.04 and testing with the
> sample-preview in the examples directory. I noticed in top that each time
> that I run sample-preview the total amount of memory used increases. Is
> this a memory leak while saving files out to the disk? This is an issue for
> me as I am running in live view mode at 30 frames per seconds for several
> minutes and eventually getting an out-of-memory error even though I have
> 4GB.

Such a thing might happen.

What camera type? With my Nikon D7000 it does not seem to leak.

Do you do gp_file_unref in your code?

If you run under "valgrind --leak-check=full PROGRAM" it will show
the leak points.

Ciao, Marcus

------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Gphoto-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gphoto-user
Reply | Threaded
Open this post in threaded view
|

Re: Memory Leak?

Keith
I am working with a Canon 5D Mark II. I have turned off debug in libgphoto2 and am able to get 30 fps. I am using the sample-preview program in the examples directory and it does do the gp_file_unref in it. I will run with valgrind and see what it has to report and get back to you.

Regards,
Keith



On Tue, Jul 16, 2013 at 4:51 AM, Marcus Meissner <[hidden email]> wrote:
On Mon, Jul 15, 2013 at 02:36:56PM -0700, Keith Laband wrote:
> Hi Marcus,
>
> I think I posted them in the wrong way earlier.
>
> I am running libgphoto 2.5.0 on Ubuntu 10.04 and testing with the
> sample-preview in the examples directory. I noticed in top that each time
> that I run sample-preview the total amount of memory used increases. Is
> this a memory leak while saving files out to the disk? This is an issue for
> me as I am running in live view mode at 30 frames per seconds for several
> minutes and eventually getting an out-of-memory error even though I have
> 4GB.

Such a thing might happen.

What camera type? With my Nikon D7000 it does not seem to leak.

Do you do gp_file_unref in your code?

If you run under "valgrind --leak-check=full PROGRAM" it will show
the leak points.

Ciao, Marcus


------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Gphoto-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gphoto-user
Reply | Threaded
Open this post in threaded view
|

Re: Memory Leak?

Marcus Meissner
On Tue, Jul 16, 2013 at 05:35:41AM -0700, Keith Laband wrote:
> I am working with a Canon 5D Mark II. I have turned off debug in libgphoto2
> and am able to get 30 fps. I am using the sample-preview program in the
> examples directory and it does do the gp_file_unref in it. I will run with
> valgrind and see what it has to report and get back to you.

I ran it now against my EOS 1000D with 100 captures and I did not see liveview
related leaks (just some in the usb detection/init code because the code
does not free the camera).

Ciao, Marcus

------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Gphoto-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gphoto-user
Reply | Threaded
Open this post in threaded view
|

Re: Memory Leak?

Keith
I ran using valgrind and it showed no leaks. However, top shows additional used memory that is not released. Whether this is cached memory or something else, it keeps growing as I run liveview until all memory is used and I get a std::alloc error because there is no memory to allocate. I am still looking into what is going on.

Keith


On Wed, Jul 17, 2013 at 11:36 PM, Marcus Meissner <[hidden email]> wrote:
On Tue, Jul 16, 2013 at 05:35:41AM -0700, Keith Laband wrote:
> I am working with a Canon 5D Mark II. I have turned off debug in libgphoto2
> and am able to get 30 fps. I am using the sample-preview program in the
> examples directory and it does do the gp_file_unref in it. I will run with
> valgrind and see what it has to report and get back to you.

I ran it now against my EOS 1000D with 100 captures and I did not see liveview
related leaks (just some in the usb detection/init code because the code
does not free the camera).

Ciao, Marcus


------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Gphoto-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gphoto-user