c# - System.DivideByZeroException without division -


i using code capture short bursts of video connected camera:

private void show() {     if (videodevice != null) {         videodevice.videoresolution = capabilities[combobox1.selectedindex];         size = ((size) combobox1.selecteditem);         videodevice.newframe += new aforge.video.newframeeventhandler(frame);         videodevice.start();     } } private void frame(object sender, newframeeventargs e) {     if (count > 7 && !motion) {         urame = 0;         b = ((bitmap) e.frame.clone());         if (detector.processframe(b) > 0.02) {             motion = true;             writer.open(@"c:\users\home\documents\visual studio 2013\projects\cctv\cctv\bin\wesdgzufjw3.mp4", size.width, size.height, 30, videocodec.msmpeg4v3);         }     }      else if (motion) {         b = ((bitmap) e.frame.clone());         writer.writevideoframe(b);         if (detector.processframe(b) < 0.02) {             motion = false;             writer.close();         }     }     count++; } 

but reason, when motion detected, visual studio throws error saying that:

"an exception of type 'system.dividebyzeroexception' occurred in aforge.video.ffmpeg.dll not handled in user code"

i have checked code "bad divisions" , out of desperation i've removed all arithmetic code. friend of mine used exact same lib - aforge.video.ffmpeg - in 1 of projects few weeks ago , didn't encounter error this.

the problem error doesn't tell wrong.. division in lib, in method i've used, heck, tostring() must use sort of division..

note: i've added tag c++ because 1) aforge written in c++ , 2) few minutes before error got error saying vs2013 c# debugger can't debug c++ , error had occurred in c++


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -