public Form1() { InitializeComponent(); _mpv = new Mpv(Handle); _mpv.LoadConfig("mpv.conf"); _mpv.Initialize(); var args = Environment.GetCommandLineArgs(); if( args.Length > 1 ) { _mpv.LoadFile(args[1]); Text = args[1]; } #if DEBUG //HACK - breaking here seems to fix an access violation when running in Debug mode. //Not sure why (race condition in MSVCRT?) but it doesn't happen in Release mode, so whatever. Debugger.Break(); #endif }