Author Topic: Memory leak  (Read 5265 times)

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
Memory leak
« on: 2010 June 05 09:34:51 »
Using an Image Container to apply a process container to many images, I can see how memory in the order of 100MBytes/Image is slowly eaten up (monitored using task manager). There is some memory leak. Platform Win7-x64.

Georg
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)

Offline Harry page

  • PTeam Member
  • PixInsight Jedi Knight
  • *****
  • Posts: 1458
    • http://www.harrysastroshed.com
Re: Memory leak
« Reply #1 on: 2010 June 06 09:34:33 »
Hi

I see this as well it gets slower and slower  :'(


Harry
Harry Page

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Memory leak
« Reply #2 on: 2010 June 06 11:09:21 »
Hi Georg,

I'm gonna check this thoroughly. If I can confirm this problem, it is definitely a critical bug that will stop the next version until I get it fixed completely. It sounds like a regression in the Windows version (actually a Qt-related problem). Thanks for reporting it.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
Re: Memory leak
« Reply #3 on: 2010 June 06 11:46:25 »
Juan,

if you need more infomation, let me know.

Harry,

yes, PI also gets slower and slower. This happens even though only 2.1 of 4 GBytes (Win7-x64 !) are actually used according to the task manager. Currently I can run at most 10 images, after that ABE slows down to a crawl.

Georg
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)

Offline Harry page

  • PTeam Member
  • PixInsight Jedi Knight
  • *****
  • Posts: 1458
    • http://www.harrysastroshed.com
Re: Memory leak
« Reply #4 on: 2010 June 06 11:49:43 »
Hi

Just to let you know I am running vista 64 with 4 gig ram  ;)


Harry
Harry Page

Offline Niall Saunders

  • PTeam Member
  • PixInsight Jedi Knight
  • *****
  • Posts: 1456
  • We have cookies? Where ?
Re: Memory leak
« Reply #5 on: 2010 June 06 14:37:23 »
With Vista-64 and 8Gb of RAM, I see PI getting slower and slower as time goes on as well.

And, I am only processing 640x480 size mono images - but I am processing  around 30 or 60 at a time, and repeating multi-image processes over and over again.

Eventually it can take TWO SECONDS just for PI to be able to re-name an on-screen image. Two seconds before control is handed back after clicking <OK> on the SetImageIdentifier dialogue box.

By then, if you try to drag an image window, or any icon, anywhere on the screen you can expect a total loss of synchronisation between what you 'see' on the screen, and what you actually 'wanted to happen'.

It is only 'tolerable' because I hope that Juan will be fixing it 'the next time' - but v1.6.0 is definitely taking a regression step in this regard.

Unfortunately, I have not taken the time to determine if this is a 'memory leak' issue or not.

Cheers,
Cheers,
Niall Saunders
Clinterty Observatories
Aberdeen, UK

Altair Astro GSO 10" f/8 Ritchey Chrétien CF OTA on EQ8 mount with homebrew 3D Balance and Pier
Moonfish ED80 APO & Celestron Omni XLT 120
QHY10 CCD & QHY5L-II Colour
9mm TS-OAG and Meade DSI-IIC

Offline Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
Re: Memory leak
« Reply #6 on: 2010 June 06 15:25:04 »
Just to mention that I've been using PI for 10 straight hours in Fedora, with no slow down problems...
Regards,

Carlos Milovic F.
--------------------------------
PixInsight Project Developer
http://www.pixinsight.com

Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
Re: Memory leak
« Reply #7 on: 2010 June 08 07:30:18 »
I guess you just caught me no using PI a whole lot these days :) I haven't run into this yet.
Best,

    Sander
---
Edge HD 1100
QHY-8 for imaging, IMG0H mono for guiding, video cameras for occulations
ASI224, QHY5L-IIc
HyperStar3
WO-M110ED+FR-III/TRF-2008
Takahashi EM-400
PIxInsight, DeepSkyStacker, PHD, Nebulosity

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
Re: Memory leak
« Reply #8 on: 2010 June 08 10:48:04 »
Juan,

this problem apparently does not happen with a process that does  reads a .CR2, Dynamic Crop, Masked Histogram Stretch, write .jpg. The problem does appear with my original process that reads a .tif, does ABE, CanonBandingReduction script (V6), ABE, Histogram Stretch, write .jpg. So it may affect only some process container, and others not.

Georg
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Memory leak
« Reply #9 on: 2010 June 10 01:46:07 »
Then we have:

No memory leak:
reads a .CR2, Dynamic Crop, Masked Histogram Stretch, write .jpg

Yes memory leak:
reads a .tif, does ABE, CanonBandingReduction script (V6), ABE, Histogram Stretch, write .jpg

So we might have caught it by elimination: can you confirm that if you suppress the call to a script, then the memory leak does not happen?

If what I suspect is true, then the memory leak is not such, but just JavaScript's garbage collector eating memory (that is, lazily not releasing unused objects after script termination). This should not happen, but if we can find evidence...
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
Re: Memory leak
« Reply #10 on: 2010 June 10 16:04:22 »
...
So we might have caught it by elimination: can you confirm that if you suppress the call to a script, then the memory leak does not happen?
...

If I exclude the script, memory is still consumed at maybe 30-50 MBytes per image, so apparently slower than with script. I have attached the .psm file with the ImageContainer and both process containers. Maybe they give you a hint.

Georg
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)