indi_canon_ccd ERROR:Unsufficient memory

  • Posts: 48
  • Thank you received: 7

Rendering Error in layout Message/Item: array_keys(): Argument #1 ($array) must be of type array, null given. Please enable debug mode for more information.

Please Log in or Create an account to join the conversation.

  • Posts: 992
  • Thank you received: 161
Without closer checks, I had a similar problem in a low memory environment when FITSviewer kept all the photos in memory. Try checking the "Single Window Open" and "Single Preview Tab" boxes in Options/FITS. Hope this helps.
Last edit: 6 years 2 months ago by Alfred.
6 years 2 months ago #27016

Please Log in or Create an account to join the conversation.

  • Posts: 13
  • Thank you received: 4
I've encountered this same bug/error using the indi_gphoto_ccd driver with my Canon T6, also using a Raspberry Pi as a remote INDI server (although mine is a 3B+.) I'm able to take about 80 exposures before receiving the "Insufficient Memory" error, and then if I restart INDI, I'm able to take another 80 before receiving the error again. I would reproduce it and post my logs, but I'm not sure how much it would help given that you've posted your logs already and they're probably almost identical.

At some point, when I get the time, I'll need to investigate this more closely, as this definitely has been a pain for me (having to stop and restart my sequences every time this happens.) Seems to be a memory leak somewhere in INDI, I would guess, since restarting the INDI server corrects it immediately.
6 years 2 months ago #27018

Please Log in or Create an account to join the conversation.

  • Posts: 48
  • Thank you received: 7
Dear Herrhausen.

Thanks for your advice.
Both "Single Window Open" and "Single Preview Tab" have been checked in my setting options.
It seems that this is not the cause, as the INDI server and the KStars client are running on separate machines.
6 years 2 months ago #27039

Please Log in or Create an account to join the conversation.

indi_canon_ccd ERROR:Unsufficient memory - INDI Forum
  • Posts: 48
  • Thank you received: 7

Rendering Error in layout Message/Item: array_keys(): Argument #1 ($array) must be of type array, null given. Please enable debug mode for more information.

Please Log in or Create an account to join the conversation.

  • Posts: 13
  • Thank you received: 4
Interesting... I think I may have isolated a memory leak, but just doing a quick calculation, it doesn't seem like it would account for anywhere near the 33 MB per exposure that you're observing. Right now I can only account for about 280 KB leaked per exposure, unless I'm missing something... there is definitely something fishy about the way that INDI is handling libraw though, and it definitely is leaking memory, I just need to do a little more digging to figure out why it's leaking so much. I want to make sure that this bug is actually responsible for the whole 33 MB before celebrating, since there's quite a difference between 33 MB and 280 KB. If I can determine where that other 32.7 MB is coming from, I'll submit a bugfix patch.

One clue as to that mysterious 33 MB figure is that it's almost exactly the size that I would expect a single raw exposure from a Canon T7i to be (I'm not sure why the logs are showing it as allocating 51 MB, that seems a bit high to me.) Anyway, it seems very likely that the entire contents of the image are being leaked somewhere, either in RAW format before the conversion, or FITS format afterwards. Either would have the same effect, obviously, since eventually it would get to the point where there wasn't enough memory left to read the next image in.
Last edit: 6 years 2 months ago by Ryan M.
6 years 2 months ago #27042

Please Log in or Create an account to join the conversation.


×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

  • Posts: 111
  • Thank you received: 41

Rendering Error in layout Message/Item: array_keys(): Argument #1 ($array) must be of type array, null given. Please enable debug mode for more information.

Please Log in or Create an account to join the conversation.

  • Posts: 13
  • Thank you received: 4
That might do it. I was so focused on the fact that "RawProcessor.recycle()" should actually be "delete RawProcessor" (since the object is not being reused) that I didn't check that it was present in all possible branches. Good find, I bet that's it.

EDIT: Actually, now I'm not so sure (C++ isn't my strong suit as far as programming goes.) The LibRaw class has a destructor, so wouldn't that be automatically called when RawProcessor goes out of scope? I'm not sure that any of the recycle() calls are actually necessary here, I think it would be called automatically as recycle() is invoked in the destructor method. Maybe someone with more C++ knowledge than me can figure out whether that's really the issue.
Last edit: 6 years 2 months ago by Ryan M.
6 years 2 months ago #27044

Please Log in or Create an account to join the conversation.

  • Posts: 13
  • Thank you received: 4

Rendering Error in layout Message/Item: array_keys(): Argument #1 ($array) must be of type array, null given. Please enable debug mode for more information.

Please Log in or Create an account to join the conversation.

  • Posts: 48
  • Thank you received: 7
Hi smhxx,

I tried your advice. It worked very well!
A memory leak has not occurred.
The problem is solved with the latest nightly builds.
I checked my environment.
Cause my nightly builds automatic download script seemed to be failing.
I'm sorry.
Also, as you say, note that this problem occurs on the current stable version.

Thank you.
6 years 2 months ago #27067

Please Log in or Create an account to join the conversation.

Time to create page: 5.459 seconds