AForge.NET

  :: AForge.NET Framework :: Articles :: Forums ::

System.AccessViolationException

Forum to discuss AForge.NET Framework, its features, API, how-tos, etc.

System.AccessViolationException

Postby Constey » Wed Oct 19, 2016 1:45 pm

I'm using 2.2.5 .NET 4 x64 from https://aforgeffmpeg.codeplex.com/ and I get sometimes this error when adding some bitmaps to an mpeg4 file. It happens sometimes, sometimes not, so I dont get why it crashs.

Code: Select all
//Create VideoFile
VideoFileWriter writer = new VideoFileWriter();
writer.Open(videofilename, width, height, 25, VideoCodec.MPEG4, 12000000);
writer.WriteVideoFrame(bitmapDebug); <--- Exception


Any ideas whats wrong here?

An unhandled exception of type 'System.AccessViolationException' occurred in AForge.Video.FFMPEG.dll


Code: Select all
bei avcodec_encode_video(AVCodecContext* , Byte* , Int32 , AVFrame* )
   bei AForge.Video.FFMPEG.?A0xfb175571.write_video_frame(WriterPrivateData data) in c:\projects\aforge.net\sources\video.ffmpeg\videofilewriter.cpp:Zeile 319.
   bei AForge.Video.FFMPEG.VideoFileWriter.WriteVideoFrame(Bitmap frame, TimeSpan timestamp) in c:\projects\aforge.net\sources\video.ffmpeg\videofilewriter.cpp:Zeile 302.
   bei CSRingBuffer.MainForm.btnSaveFFMPEG_Click(Object sender, EventArgs e) in C:\dev\CSRingBuffer\MainForm.cs:Zeile 873.
   bei System.Windows.Forms.Control.OnClick(EventArgs e)
   bei System.Windows.Forms.Button.OnClick(EventArgs e)
   bei System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   bei System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   bei System.Windows.Forms.Control.WndProc(Message& m)
   bei System.Windows.Forms.ButtonBase.WndProc(Message& m)
   bei System.Windows.Forms.Button.WndProc(Message& m)
   bei System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   bei System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   bei System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
   bei System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   bei System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   bei CSRingBuffer.Program.Main() in C:\dev\CSRingBuffer\Program.cs:Zeile 17.
   bei System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
   bei System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext, String[] activationCustomData)
   bei Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone()
   bei System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   bei System.Threading.ThreadHelper.ThreadStart()
Constey
 
Posts: 1
Joined: Wed Oct 19, 2016 1:36 pm



Return to AForge.NET Framework