You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue Title (Memory_Heap_Corruption when opening MP3 files)
Hello,
I have the problem that when I open MP3 files the program crashes with a Memory_Heap_Corruption (0xc0000374) and very rarely
with a MemoryAccessViolation. The error occurs exclusively with MP3s but occurs randomly, sometimes I can open several MP3s in a
row and other times it crashes on the first one, making reproduction extremely difficult. I also tried using the LegacyAudioOut but it
didn't help. The Code has a lot of stuff in it specific to my program, so I don't know how much of problem that is going to be.
privateasyncvoidPlay_PreviewMouseLeftButtonDown(objectsender,MouseButtonEventArgse){foreach(Window window in Application.Current.Windows){if(window.GetType()==typeof(MainWindow)){if((window as MainWindow).selectedfilepath !=null){if((window as MainWindow).playstate !=1&(window as MainWindow).playstate !=2){if(Unosquare.FFME.Library.IsInitialized ==true){await(window as MainWindow).me.Open(new Uri((window as MainWindow).selectedfilepath));(window as MainWindow).playstate =1;}else{stringerror="Could not Initialize ffmpeg binaries!";stringcaption="Error 0x1";MessageBoxButtonbutton= MessageBoxButton.OK;MessageBoxImageimage= MessageBoxImage.Error;MessageBoxResultresult;result= MessageBox.Show(error, caption, button, image);switch(result){case MessageBoxResult.OK:
Process.GetCurrentProcess().Kill();break;}}}elseif((window as MainWindow).playstate ==2){await(window as MainWindow).me.Play();(window as MainWindow).playstate =1;}else{return;}}}}}
C# getting the filepath
privatevoidAllTracksDG_MouseDoubleClick(objectsender,MouseButtonEventArgse){stringfilepath="";varindex= AllTracksDG.SelectedCells[8];stringcontent=(index.Column.GetCellContent(index.Item)as TextBlock).Text;SQLiteCommandcommand= sqlite_conn.CreateCommand();
command.Parameters.Add(new SQLiteParameter("@Param1", content));
command.CommandText ="SELECT FilePath FROM Library WHERE FilePath=(@Param1)";varreader= command.ExecuteReader();while(reader.Read()){filepath= reader.GetString(0);}
command.Reset();varfile= ShellFile.FromFilePath(filepath);stringtrackname= file.Properties.System.Title.Value;if(trackname!=null&& trackname.Length >0){foreach(Window window in Application.Current.Windows){if(window.GetType()==typeof(MainWindow)){(window as MainWindow).Trackname.Content =trackname;}}}elseif(trackname==null){foreach(Window window in Application.Current.Windows){if(window.GetType()==typeof(MainWindow)){(window as MainWindow).Trackname.Content =null;}}}FileStreamfileStream=new FileStream(filepath, FileMode.Open, FileAccess.Read);
fileStream.Seek(0, SeekOrigin.Begin);SimpleFilefile1=new SimpleFile(filepath, fileStream);SimpleFileAbstractionfile2=new SimpleFileAbstraction(file1);varfilename= TagLib.File.Create(file2);if(filename.Tag.Performers.LongLength >0){stringperformer= filename.Tag.Performers[0];foreach(Window window in Application.Current.Windows){if(window.GetType()==typeof(MainWindow)){(window as MainWindow).Artistname.Content =performer;}}}else{foreach(Window window in Application.Current.Windows){if(window.GetType()==typeof(MainWindow)){(window as MainWindow).Artistname.Content =null;}}}if(filename.Tag.Pictures.Length >= 1){
TagLib.IPicture pic= filename.Tag.Pictures[0];MemoryStreamms=new MemoryStream(pic.Data.Data);
ms.Seek(0, SeekOrigin.Begin);BitmapImagebitmap=new BitmapImage();
bitmap.BeginInit();
bitmap.StreamSource =ms;
bitmap.EndInit();foreach(Window window in Application.Current.Windows){if(window.GetType()==typeof(MainWindow)){(window as MainWindow).Trackimage.Source =bitmap;}}}else{foreach(Window window in Application.Current.Windows){if(window.GetType()==typeof(MainWindow)){(window as MainWindow).Trackimage.Source =null;}}}varcontenttype=new Mime();stringtype= contenttype.Lookup(filepath);if(type.StartsWith("audio")){foreach(Window window in Application.Current.Windows){if(window.GetType()==typeof(MainWindow)){(window as MainWindow).selectedfilepath =filepath;}}}}}
Issue Title (Memory_Heap_Corruption when opening MP3 files)
Hello,
I have the problem that when I open MP3 files the program crashes with a Memory_Heap_Corruption (0xc0000374) and very rarely
with a MemoryAccessViolation. The error occurs exclusively with MP3s but occurs randomly, sometimes I can open several MP3s in a
row and other times it crashes on the first one, making reproduction extremely difficult. I also tried using the LegacyAudioOut but it
didn't help. The Code has a lot of stuff in it specific to my program, so I don't know how much of problem that is going to be.
Issue Categories
Version Information
Steps to Reproduce
--
Expected Results
Sample Code
XAML
C# Opening the file
C# getting the filepath
Command line ffplay
The text was updated successfully, but these errors were encountered: