Altered program throwing exception when running exe outside visual studio?

Post Reply
Olivia
Posts: 4
Joined: Fri May 20, 2016 5:57 pm

Altered program throwing exception when running exe outside visual studio?

Post by Olivia » Thu Jun 16, 2016 4:26 pm

I have edited the program's user interface and added a few capabilities that do not have anything to do with the cameras. It runs perfectly fine in visual studio in release mode. However, when I try and run the exe outside of Visual Studio it throws an exception roughly 2% of the time. This happens when the pictures are loaded from the camera to the computer.

I can create the exception outside of visual studio (in the exe) by taking pictures less than a second apart on the same camera (before it has time to load properly). However, this is not the only time that this happens. When I do this same thing inside Visual Studio Release, it does not cause an exception and it loads all of the pictures properly. Any help to debug this would be much appreciated.

The program comes up with a message box that complains that the temp file does not exist.

The output I'm getting from the log is:

2016-06-16 09:02:50,133 [10]ERROR DCC [(null)] - Error transfer memory file
Canon.Eos.Framework.EosException: - 1.
Unexpected exception while downloading. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at Canon.Eos.Framework.Internal.SDK.Edsdk.EdsDownload(IntPtr inDirItemRef, UInt32 inReadSize, IntPtr outStream)
at Canon.Eos.Framework.Internal.EosImageTransporter.Download(IntPtr directoryItem, UInt32 size, IntPtr stream) in c:\...\Canon.Eos.Framework\Internal\EosImageTransporter.cs:line 53
--- End of inner exception stack trace ---

Altered program throwing exception when running exe outside visual studio?

Advertisment
 

Duka Istvan
Posts: 684
Joined: Sat Oct 03, 2015 7:57 pm

Re: Altered program throwing exception when running exe outside visual studio?

Post by Duka Istvan » Thu Jun 16, 2016 11:36 pm

Do you use the latest source code ? I made some changes in this part of code a week ago

Olivia
Posts: 4
Joined: Fri May 20, 2016 5:57 pm

Re: Altered program throwing exception when running exe outside visual studio?

Post by Olivia » Fri Jun 17, 2016 5:00 pm

I started on this altered program several weeks ago, so I actually started with your stable release 2.0.0.

I just found a solution for my problem. I changed it so that I am saving the images to file (TransportAsFileName) rather than using TransportInMemory. This doesn't seem to have affected any other features that I am using.

Thank you very much.

Post Reply