Search found 3 matches

by bvanderwkc
Fri May 04, 2018 12:38 pm
Forum: Development
Topic: Unexpected exception while downloading from Canon
Replies: 5
Views: 12139

Re: Unexpected exception while downloading from Canon

Call SuspendGarbageCollection before and ResumeGarbageCollection after the call to CanonSDKBase.TransferFile. (Replace the calls to LogInfo and LogInternalException with your own logging.) private void SuspendGarbageCollection() { try { var oneMB = 1024 * 1024; LogInfo(GC.TryStartNoGCRegion(5 * oneM...
by bvanderwkc
Mon Apr 30, 2018 1:10 am
Forum: Development
Topic: Unexpected exception while downloading from Canon
Replies: 5
Views: 12139

Re: Unexpected exception while downloading from Canon

This does appear to be an issue with memory allocation. If I surround the call to CanonSDKBase.TransferFile with GC.TryStartNoGCRegion and GC.EndNoGCRegion, the problem completely disappears.
by bvanderwkc
Thu Apr 26, 2018 6:13 pm
Forum: Development
Topic: Unexpected exception while downloading from Canon
Replies: 5
Views: 12139

Unexpected exception while downloading from Canon

I am having an issue that is totally kicking my butt. While capturing photos every few seconds from a Canon camera, less than 5% of the time we are seeing the following exception: Unexpected exception while downloading. Object reference not set to an instance of an object. at Canon.Eos.Framework.Int...