Jump to content

Canada's top-tier Telescopes & Accessories
Be as specific as possible when reporting issues and *ALWAYS* include the full version number of the application you are using and your exact *CAMERA MODEL*
NEVER POST YOUR KEY IN ANY PUBLIC FORUM, INCLUDING THE O'TELESCOPE SUPPORT FORUM ::: IF YOU DO YOUR KEY WILL BE DEACTIVATED WITHOUT NOTICE!
  • 0

3.1.12 Out of memory exception


Zeranoe

Question

There appears to be some memory management issues in 3.1.12 when moving the preview window around in the Frame & Focus tab. The memory footprint will skyrocket after double clicking in the window and moving the preview box around.

This results in an "Out of memory" exception (see attached) on a machine with 4GB of memory.

My guess would be that the allocated memory for the preview image is not being replaced when the window is moved.

Here is the execution text of the error prompt:

************** Exception Text **************
System.OutOfMemoryException: Out of memory.
   at System.Drawing.Graphics.CheckErrorStatus(Int32 status)
   at System.Drawing.Graphics.DrawImage(Image image, Int32 x, Int32 y, Int32 width, Int32 height)
   at System.Drawing.Bitmap..ctor(Image original, Int32 width, Int32 height)
   at System.Drawing.Bitmap..ctor(Image original, Size newSize)
   at BinaryRivers.BackyardEOS.Modes.FrameFocusMode.DisplayImage(Bitmap image)
   at BinaryRivers.BackyardEOS.Modes.FrameFocusMode.PictureBoxPlus1MouseMove(Object sender, MouseEventArgs e)
   at System.Windows.Forms.MouseEventHandler.Invoke(Object sender, MouseEventArgs e)
   at System.Windows.Forms.Control.OnMouseMove(MouseEventArgs e)
   at System.Windows.Forms.Control.WmMouseMove(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

 

exception_out_of_memory.png

Link to comment
Share on other sites

  • Answers 15
  • Created
  • Last Reply

15 answers to this question

Recommended Posts

When you talk about moving the "preview box" around, do you mean the "Zoom box"?

Please provide more information about your setup.

When I move the zoom box around I can see BYE's memory usage rise and fall but I am unable to duplicate your issue without more details.

What camera?

What version of Windows? 64-bit or 32-bit?

How much physical memory? How much is available when BYE is started? I know that you said 8GB of memory.

What driver/SDK (Canon, Canon215, Canon210) are you using?

What steps to re-create your issue.

I can see memory usage change as I move the zoom box around and select a different area of the frame. The amount of memory usages goes up and down. I do not get "out of memory" errors with BYE 3.1.12 and a T5i camera on a 64-bit Windows 7 PC with 8 GB of RAM. BYE's working set size does not appear to approach the 2GB limit for 32-bit apps during my trying to re-create your issue.

Thanks!

Link to comment
Share on other sites

14 minutes ago, astroman133 said:

When you talk about moving the "preview box" around, do you mean the "Zoom box"?

Please provide more information about your setup.

When I move the zoom box around I can see BYE's memory usage rise and fall but I am unable to duplicate your issue without more details.

What camera?

What version of Windows? 64-bit or 32-bit?

How much physical memory? How much is available when BYE is started? I know that you said 8GB of memory.

What driver/SDK (Canon, Canon215, Canon210) are you using?

What steps to re-create your issue.

I can see memory usage change as I move the zoom box around and select a different area of the frame. The amount of memory usages goes up and down. I do not get "out of memory" errors with BYE 3.1.12 and a T5i camera on a 64-bit Windows 7 PC with 8 GB of RAM. BYE's working set size does not appear to approach the 2GB limit for 32-bit apps during my trying to re-create your issue.

Thanks!

Yes, the "Zoom Box".

Sometimes the issue doesn't happen right away, and the memory usage appears to decline. If you continue to move the preview box around it should happen.

Windows 10 32-bit, 4GB total system memory, and there appears to be around 2GB free before I double click to move the preview around.

I doubt this is related to my camera or the Canon SDK, but it's a 5D (210).

Link to comment
Share on other sites

I was able to reproduce this on a Windows 10 64-bit machine with 16GB of physical memory. There was around 7GB still available when it happened, but since BYE is an x86 app I think it's only allowed 2GB.

I used a Rebel XTi (210) to reproduce it.

Link to comment
Share on other sites

8 minutes ago, astroman133 said:

Perhaps your issue is because the 5D and the XTi do not support LiveView! Are you moving the zoom box around while displaying a static Snap image? That may be an important detail!

That may be an important detail I overlooked since I've never used LiveView. I am snapping an image first as it's the only way I can do the focus procedure.

Link to comment
Share on other sites

1 minute ago, astroman133 said:

It may help Guylain locate the code where he needs to release the memory from previous zoom box images.

The fact that you are using 32-bit Windows and older cameras may be why you are seeing this.

Maybe, but as I said it was reproduced on a 64-bit machine with an XTi.

Link to comment
Share on other sites

38 minutes ago, astroman133 said:

Perhaps your issue is because the 5D and the XTi do not support LiveView! Are you moving the zoom box around while displaying a static Snap image? That may be an important detail!

Actually you nailed it.  This *is* the scenario where this can occur.

Link to comment
Share on other sites

11 hours ago, astroman133 said:

Is it easily fixable?

I think so.  I can't reproduce here, the garbage collector passes in time and recycle the memory.

However, I've forced a GC.Collect() immediately after the zoombox has changed position and this should work for still images.  For live view the GC.Collect() is called evey 10 frames approx and this is why it is working with live feed.

What I find odd is the need to GC.Collect() in the first place.  The garbage collector should recycle that memory without have to force it... but for some reason on some computer it does not pass in time; I would estimate < 1% based on the last 5 years reported issues.  His PC seems to be one of them.

This is already addresses in 3.1.13 which I'm trying to release today.

Regards,

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...

Important Information

This site uses cookies to offer your a better browsing experience. You can adjust your cookie settings. By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to the use of cookies, our Privacy Policy, and our Terms of Use