Fixed potential crash when trying to import Cue Sheet where *all* files are missing: If none of the files exist, we shouldn't try to analyze them. The real problem, however, was a potential NULL-pointer access in the FileAnalyzer thread's destructor code. Thanks to XhmikosR for reporting!

This commit is contained in:
LoRd_MuldeR 2014-08-16 14:45:18 +02:00
parent a63baad374
commit 0a65e42012
22 changed files with 135 additions and 61 deletions

View File

@ -21,6 +21,7 @@ a:visited { color: #0000EE; }
<li>Updated mpg123 decoder to v1.20.1 (2014-06-17), compiled with GCC 4.9.0 <li>Updated mpg123 decoder to v1.20.1 (2014-06-17), compiled with GCC 4.9.0
<li>Updated Vorbis encoder to OggEnc v2.87 (2014-06-24), using libvorbis v1.3.4 and aoTuV b6.03_2014 <li>Updated Vorbis encoder to OggEnc v2.87 (2014-06-24), using libvorbis v1.3.4 and aoTuV b6.03_2014
<li>Updated Vorbis decoder to OggDec v1.10.1 (2014-06-25), using libVorbis v1.3.4 <li>Updated Vorbis decoder to OggDec v1.10.1 (2014-06-25), using libVorbis v1.3.4
<li>Fixed potential crash in Cue Sheet importer (occurred when *all* input files were missing)
</ul><br> </ul><br>
<a name="4.10"></a>Changes between v4.09 and v4.10 [2014-06-23]:<br><ul> <a name="4.10"></a>Changes between v4.09 and v4.10 [2014-06-23]:<br><ul>

View File

@ -434,8 +434,9 @@
<message> <message>
<location filename="../../src/Dialog_CueImport.cpp" line="121"/> <location filename="../../src/Dialog_CueImport.cpp" line="121"/>
<location filename="../../src/Dialog_CueImport.cpp" line="222"/> <location filename="../../src/Dialog_CueImport.cpp" line="222"/>
<location filename="../../src/Dialog_CueImport.cpp" line="420"/> <location filename="../../src/Dialog_CueImport.cpp" line="358"/>
<location filename="../../src/Dialog_CueImport.cpp" line="424"/> <location filename="../../src/Dialog_CueImport.cpp" line="431"/>
<location filename="../../src/Dialog_CueImport.cpp" line="435"/>
<source>Cue Sheet Error</source> <source>Cue Sheet Error</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -542,63 +543,70 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/Dialog_CueImport.cpp" line="383"/> <location filename="../../src/Dialog_CueImport.cpp" line="358"/>
<source>Warning: Some of the required input files could not be found!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/Dialog_CueImport.cpp" line="394"/>
<source>Analyzing file(s), please wait...</source> <source>Analyzing file(s), please wait...</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/Dialog_CueImport.cpp" line="388"/> <location filename="../../src/Dialog_CueImport.cpp" line="399"/>
<source>Analysis Failed</source> <source>Analysis Failed</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/Dialog_CueImport.cpp" line="388"/> <location filename="../../src/Dialog_CueImport.cpp" line="399"/>
<source>Warning: The format of some of the input files could not be determined!</source> <source>Warning: The format of some of the input files could not be determined!</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/Dialog_CueImport.cpp" line="388"/> <location filename="../../src/Dialog_CueImport.cpp" line="358"/>
<location filename="../../src/Dialog_CueImport.cpp" line="399"/>
<source>Continue Anyway</source> <source>Continue Anyway</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/Dialog_CueImport.cpp" line="388"/> <location filename="../../src/Dialog_CueImport.cpp" line="358"/>
<location filename="../../src/Dialog_CueImport.cpp" line="399"/>
<source>Abort</source> <source>Abort</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../../src/Dialog_CueImport.cpp" line="415"/> <location filename="../../src/Dialog_CueImport.cpp" line="426"/>
<source>Splitting file(s), please wait...</source> <source>Splitting file(s), please wait...</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message numerus="yes"> <message numerus="yes">
<location filename="../../src/Dialog_CueImport.cpp" line="420"/> <location filename="../../src/Dialog_CueImport.cpp" line="431"/>
<source>Process was aborted by the user after %n track(s)!</source> <source>Process was aborted by the user after %n track(s)!</source>
<translation type="unfinished"> <translation type="unfinished">
<numerusform></numerusform> <numerusform></numerusform>
</translation> </translation>
</message> </message>
<message> <message>
<location filename="../../src/Dialog_CueImport.cpp" line="424"/> <location filename="../../src/Dialog_CueImport.cpp" line="435"/>
<source>An unexpected error has occured while splitting the Cue Sheet!</source> <source>An unexpected error has occured while splitting the Cue Sheet!</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message numerus="yes"> <message numerus="yes">
<location filename="../../src/Dialog_CueImport.cpp" line="428"/> <location filename="../../src/Dialog_CueImport.cpp" line="439"/>
<source>Imported %n track(s) from the Cue Sheet.</source> <source>Imported %n track(s) from the Cue Sheet.</source>
<translation type="unfinished"> <translation type="unfinished">
<numerusform></numerusform> <numerusform></numerusform>
</translation> </translation>
</message> </message>
<message numerus="yes"> <message numerus="yes">
<location filename="../../src/Dialog_CueImport.cpp" line="428"/> <location filename="../../src/Dialog_CueImport.cpp" line="439"/>
<source>Skipped %n track(s).</source> <source>Skipped %n track(s).</source>
<translation type="unfinished"> <translation type="unfinished">
<numerusform></numerusform> <numerusform></numerusform>
</translation> </translation>
</message> </message>
<message> <message>
<location filename="../../src/Dialog_CueImport.cpp" line="429"/> <location filename="../../src/Dialog_CueImport.cpp" line="440"/>
<source>Cue Sheet Completed</source> <source>Cue Sheet Completed</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>

View File

@ -470,6 +470,10 @@
<numerusform>%n Dateien übersprungen.</numerusform> <numerusform>%n Dateien übersprungen.</numerusform>
</translation> </translation>
</message> </message>
<message>
<source>Warning: Some of the required input files could not be found!</source>
<translation>Achtung: Einige der Eingabedateien konnten nicht gefunden werden!</translation>
</message>
</context> </context>
<context> <context>
<name>CueSheetImport</name> <name>CueSheetImport</name>

View File

@ -4,7 +4,7 @@
<context> <context>
<name>CueImportDialog</name> <name>CueImportDialog</name>
<message numerus="yes"> <message numerus="yes">
<location filename="../../src/Dialog_CueImport.cpp" line="420"/> <location filename="../../src/Dialog_CueImport.cpp" line="431"/>
<source>Process was aborted by the user after %n track(s)!</source> <source>Process was aborted by the user after %n track(s)!</source>
<translation> <translation>
<numerusform>Process was aborted by the user after %n track!</numerusform> <numerusform>Process was aborted by the user after %n track!</numerusform>
@ -12,7 +12,7 @@
</translation> </translation>
</message> </message>
<message numerus="yes"> <message numerus="yes">
<location filename="../../src/Dialog_CueImport.cpp" line="428"/> <location filename="../../src/Dialog_CueImport.cpp" line="439"/>
<source>Imported %n track(s) from the Cue Sheet.</source> <source>Imported %n track(s) from the Cue Sheet.</source>
<translation> <translation>
<numerusform>Imported %n track from the Cue Sheet.</numerusform> <numerusform>Imported %n track from the Cue Sheet.</numerusform>
@ -20,7 +20,7 @@
</translation> </translation>
</message> </message>
<message numerus="yes"> <message numerus="yes">
<location filename="../../src/Dialog_CueImport.cpp" line="428"/> <location filename="../../src/Dialog_CueImport.cpp" line="439"/>
<source>Skipped %n track(s).</source> <source>Skipped %n track(s).</source>
<translation> <translation>
<numerusform>Skipped %n track.</numerusform> <numerusform>Skipped %n track.</numerusform>

View File

@ -470,6 +470,10 @@
<numerusform>%n pistas omitidas.</numerusform> <numerusform>%n pistas omitidas.</numerusform>
</translation> </translation>
</message> </message>
<message>
<source>Warning: Some of the required input files could not be found!</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>CueSheetImport</name> <name>CueSheetImport</name>

View File

@ -474,6 +474,10 @@
<numerusform>%n pistes ignorées.</numerusform> <numerusform>%n pistes ignorées.</numerusform>
</translation> </translation>
</message> </message>
<message>
<source>Warning: Some of the required input files could not be found!</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>CueSheetImport</name> <name>CueSheetImport</name>

View File

@ -470,6 +470,10 @@
<numerusform></numerusform> <numerusform></numerusform>
</translation> </translation>
</message> </message>
<message>
<source>Warning: Some of the required input files could not be found!</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>CueSheetImport</name> <name>CueSheetImport</name>

View File

@ -468,6 +468,10 @@
<numerusform>%n .</numerusform> <numerusform>%n .</numerusform>
</translation> </translation>
</message> </message>
<message>
<source>Warning: Some of the required input files could not be found!</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>CueSheetImport</name> <name>CueSheetImport</name>

View File

@ -434,8 +434,9 @@
<message> <message>
<location filename="../../src/Dialog_CueImport.cpp" line="121"/> <location filename="../../src/Dialog_CueImport.cpp" line="121"/>
<location filename="../../src/Dialog_CueImport.cpp" line="222"/> <location filename="../../src/Dialog_CueImport.cpp" line="222"/>
<location filename="../../src/Dialog_CueImport.cpp" line="420"/> <location filename="../../src/Dialog_CueImport.cpp" line="358"/>
<location filename="../../src/Dialog_CueImport.cpp" line="424"/> <location filename="../../src/Dialog_CueImport.cpp" line="431"/>
<location filename="../../src/Dialog_CueImport.cpp" line="435"/>
<source>Cue Sheet Error</source> <source>Cue Sheet Error</source>
<translation type="unfinished">Błąd pliku Cue Sheet</translation> <translation type="unfinished">Błąd pliku Cue Sheet</translation>
</message> </message>
@ -542,37 +543,44 @@
<translation type="unfinished">Jest wysoce zalecane zwolnić miejsce na dysku zanim zaczniesz importować!</translation> <translation type="unfinished">Jest wysoce zalecane zwolnić miejsce na dysku zanim zaczniesz importować!</translation>
</message> </message>
<message> <message>
<location filename="../../src/Dialog_CueImport.cpp" line="383"/> <location filename="../../src/Dialog_CueImport.cpp" line="358"/>
<source>Warning: Some of the required input files could not be found!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/Dialog_CueImport.cpp" line="394"/>
<source>Analyzing file(s), please wait...</source> <source>Analyzing file(s), please wait...</source>
<translation type="unfinished">Analizowanie pliku/ów, prosze czekać...</translation> <translation type="unfinished">Analizowanie pliku/ów, prosze czekać...</translation>
</message> </message>
<message> <message>
<location filename="../../src/Dialog_CueImport.cpp" line="388"/> <location filename="../../src/Dialog_CueImport.cpp" line="399"/>
<source>Analysis Failed</source> <source>Analysis Failed</source>
<translation type="unfinished">Analiza zakończona niepowodzeniem</translation> <translation type="unfinished">Analiza zakończona niepowodzeniem</translation>
</message> </message>
<message> <message>
<location filename="../../src/Dialog_CueImport.cpp" line="388"/> <location filename="../../src/Dialog_CueImport.cpp" line="399"/>
<source>Warning: The format of some of the input files could not be determined!</source> <source>Warning: The format of some of the input files could not be determined!</source>
<translation type="unfinished">Ostrzeżenie: Nie można rozpoznać formatu kilku plików wejściowych!</translation> <translation type="unfinished">Ostrzeżenie: Nie można rozpoznać formatu kilku plików wejściowych!</translation>
</message> </message>
<message> <message>
<location filename="../../src/Dialog_CueImport.cpp" line="388"/> <location filename="../../src/Dialog_CueImport.cpp" line="358"/>
<location filename="../../src/Dialog_CueImport.cpp" line="399"/>
<source>Continue Anyway</source> <source>Continue Anyway</source>
<translation type="unfinished">Kontynuuj pomimo to</translation> <translation type="unfinished">Kontynuuj pomimo to</translation>
</message> </message>
<message> <message>
<location filename="../../src/Dialog_CueImport.cpp" line="388"/> <location filename="../../src/Dialog_CueImport.cpp" line="358"/>
<location filename="../../src/Dialog_CueImport.cpp" line="399"/>
<source>Abort</source> <source>Abort</source>
<translation type="unfinished">Przerwij</translation> <translation type="unfinished">Przerwij</translation>
</message> </message>
<message> <message>
<location filename="../../src/Dialog_CueImport.cpp" line="415"/> <location filename="../../src/Dialog_CueImport.cpp" line="426"/>
<source>Splitting file(s), please wait...</source> <source>Splitting file(s), please wait...</source>
<translation type="unfinished">Dzielenie pliku/ów, prosze czekać...</translation> <translation type="unfinished">Dzielenie pliku/ów, prosze czekać...</translation>
</message> </message>
<message numerus="yes"> <message numerus="yes">
<location filename="../../src/Dialog_CueImport.cpp" line="420"/> <location filename="../../src/Dialog_CueImport.cpp" line="431"/>
<source>Process was aborted by the user after %n track(s)!</source> <source>Process was aborted by the user after %n track(s)!</source>
<translation type="unfinished"> <translation type="unfinished">
<numerusform>Proces został przerwany przez użytkownika po zakończeniu %n ścieżki!</numerusform> <numerusform>Proces został przerwany przez użytkownika po zakończeniu %n ścieżki!</numerusform>
@ -581,12 +589,12 @@
</translation> </translation>
</message> </message>
<message> <message>
<location filename="../../src/Dialog_CueImport.cpp" line="424"/> <location filename="../../src/Dialog_CueImport.cpp" line="435"/>
<source>An unexpected error has occured while splitting the Cue Sheet!</source> <source>An unexpected error has occured while splitting the Cue Sheet!</source>
<translation type="unfinished">Wystąpił nieoczekiwany błąd podczas podziału pliku Cue Sheet!</translation> <translation type="unfinished">Wystąpił nieoczekiwany błąd podczas podziału pliku Cue Sheet!</translation>
</message> </message>
<message numerus="yes"> <message numerus="yes">
<location filename="../../src/Dialog_CueImport.cpp" line="428"/> <location filename="../../src/Dialog_CueImport.cpp" line="439"/>
<source>Imported %n track(s) from the Cue Sheet.</source> <source>Imported %n track(s) from the Cue Sheet.</source>
<translation type="unfinished"> <translation type="unfinished">
<numerusform>Zaimportowano %n ścieżkę z pliku Cue Sheet.</numerusform> <numerusform>Zaimportowano %n ścieżkę z pliku Cue Sheet.</numerusform>
@ -595,7 +603,7 @@
</translation> </translation>
</message> </message>
<message numerus="yes"> <message numerus="yes">
<location filename="../../src/Dialog_CueImport.cpp" line="428"/> <location filename="../../src/Dialog_CueImport.cpp" line="439"/>
<source>Skipped %n track(s).</source> <source>Skipped %n track(s).</source>
<translation type="unfinished"> <translation type="unfinished">
<numerusform>Pominięto %n ścieżkę.</numerusform> <numerusform>Pominięto %n ścieżkę.</numerusform>
@ -604,7 +612,7 @@
</translation> </translation>
</message> </message>
<message> <message>
<location filename="../../src/Dialog_CueImport.cpp" line="429"/> <location filename="../../src/Dialog_CueImport.cpp" line="440"/>
<source>Cue Sheet Completed</source> <source>Cue Sheet Completed</source>
<translation type="unfinished">Utworzono plik Cue Sheet</translation> <translation type="unfinished">Utworzono plik Cue Sheet</translation>
</message> </message>

View File

@ -475,6 +475,10 @@
<numerusform>Пропущено %n трэков.</numerusform> <numerusform>Пропущено %n трэков.</numerusform>
</translation> </translation>
</message> </message>
<message>
<source>Warning: Some of the required input files could not be found!</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>CueSheetImport</name> <name>CueSheetImport</name>

View File

@ -435,8 +435,9 @@
<message> <message>
<location filename="../../src/Dialog_CueImport.cpp" line="121"/> <location filename="../../src/Dialog_CueImport.cpp" line="121"/>
<location filename="../../src/Dialog_CueImport.cpp" line="222"/> <location filename="../../src/Dialog_CueImport.cpp" line="222"/>
<location filename="../../src/Dialog_CueImport.cpp" line="420"/> <location filename="../../src/Dialog_CueImport.cpp" line="358"/>
<location filename="../../src/Dialog_CueImport.cpp" line="424"/> <location filename="../../src/Dialog_CueImport.cpp" line="431"/>
<location filename="../../src/Dialog_CueImport.cpp" line="435"/>
<source>Cue Sheet Error</source> <source>Cue Sheet Error</source>
<translation>Cue-fel</translation> <translation>Cue-fel</translation>
</message> </message>
@ -543,37 +544,44 @@
<translation>Du bör frigöra mer diskutrymme innan du fortsätter med importen!</translation> <translation>Du bör frigöra mer diskutrymme innan du fortsätter med importen!</translation>
</message> </message>
<message> <message>
<location filename="../../src/Dialog_CueImport.cpp" line="383"/> <location filename="../../src/Dialog_CueImport.cpp" line="358"/>
<source>Warning: Some of the required input files could not be found!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/Dialog_CueImport.cpp" line="394"/>
<source>Analyzing file(s), please wait...</source> <source>Analyzing file(s), please wait...</source>
<translation>Analyserar fil(er), vänta...</translation> <translation>Analyserar fil(er), vänta...</translation>
</message> </message>
<message> <message>
<location filename="../../src/Dialog_CueImport.cpp" line="388"/> <location filename="../../src/Dialog_CueImport.cpp" line="399"/>
<source>Analysis Failed</source> <source>Analysis Failed</source>
<translation>Analys misslyckades</translation> <translation>Analys misslyckades</translation>
</message> </message>
<message> <message>
<location filename="../../src/Dialog_CueImport.cpp" line="388"/> <location filename="../../src/Dialog_CueImport.cpp" line="399"/>
<source>Warning: The format of some of the input files could not be determined!</source> <source>Warning: The format of some of the input files could not be determined!</source>
<translation>Varning! Formatet vissa filer kunde inte avgöras!</translation> <translation>Varning! Formatet vissa filer kunde inte avgöras!</translation>
</message> </message>
<message> <message>
<location filename="../../src/Dialog_CueImport.cpp" line="388"/> <location filename="../../src/Dialog_CueImport.cpp" line="358"/>
<location filename="../../src/Dialog_CueImport.cpp" line="399"/>
<source>Continue Anyway</source> <source>Continue Anyway</source>
<translation>Fortsätt ändå</translation> <translation>Fortsätt ändå</translation>
</message> </message>
<message> <message>
<location filename="../../src/Dialog_CueImport.cpp" line="388"/> <location filename="../../src/Dialog_CueImport.cpp" line="358"/>
<location filename="../../src/Dialog_CueImport.cpp" line="399"/>
<source>Abort</source> <source>Abort</source>
<translation>Avbryt</translation> <translation>Avbryt</translation>
</message> </message>
<message> <message>
<location filename="../../src/Dialog_CueImport.cpp" line="415"/> <location filename="../../src/Dialog_CueImport.cpp" line="426"/>
<source>Splitting file(s), please wait...</source> <source>Splitting file(s), please wait...</source>
<translation>Delar fil(er), vänta...</translation> <translation>Delar fil(er), vänta...</translation>
</message> </message>
<message numerus="yes"> <message numerus="yes">
<location filename="../../src/Dialog_CueImport.cpp" line="420"/> <location filename="../../src/Dialog_CueImport.cpp" line="431"/>
<source>Process was aborted by the user after %n track(s)!</source> <source>Process was aborted by the user after %n track(s)!</source>
<translation> <translation>
<numerusform>Åtgärden avbröts av användaren efter %n spår!</numerusform> <numerusform>Åtgärden avbröts av användaren efter %n spår!</numerusform>
@ -581,12 +589,12 @@
</translation> </translation>
</message> </message>
<message> <message>
<location filename="../../src/Dialog_CueImport.cpp" line="424"/> <location filename="../../src/Dialog_CueImport.cpp" line="435"/>
<source>An unexpected error has occured while splitting the Cue Sheet!</source> <source>An unexpected error has occured while splitting the Cue Sheet!</source>
<translation>Ett oväntat fel uppstod vid delningen av cue-filen!</translation> <translation>Ett oväntat fel uppstod vid delningen av cue-filen!</translation>
</message> </message>
<message numerus="yes"> <message numerus="yes">
<location filename="../../src/Dialog_CueImport.cpp" line="428"/> <location filename="../../src/Dialog_CueImport.cpp" line="439"/>
<source>Imported %n track(s) from the Cue Sheet.</source> <source>Imported %n track(s) from the Cue Sheet.</source>
<translation> <translation>
<numerusform>Importerade %n spår från cue-filen.</numerusform> <numerusform>Importerade %n spår från cue-filen.</numerusform>
@ -594,7 +602,7 @@
</translation> </translation>
</message> </message>
<message numerus="yes"> <message numerus="yes">
<location filename="../../src/Dialog_CueImport.cpp" line="428"/> <location filename="../../src/Dialog_CueImport.cpp" line="439"/>
<source>Skipped %n track(s).</source> <source>Skipped %n track(s).</source>
<translation> <translation>
<numerusform>Hoppade över %n spår.</numerusform> <numerusform>Hoppade över %n spår.</numerusform>
@ -602,7 +610,7 @@
</translation> </translation>
</message> </message>
<message> <message>
<location filename="../../src/Dialog_CueImport.cpp" line="429"/> <location filename="../../src/Dialog_CueImport.cpp" line="440"/>
<source>Cue Sheet Completed</source> <source>Cue Sheet Completed</source>
<translation>cue-fil färdigbearbetad</translation> <translation>cue-fil färdigbearbetad</translation>
</message> </message>

View File

@ -467,6 +467,10 @@
<numerusform> %n .</numerusform> <numerusform> %n .</numerusform>
</translation> </translation>
</message> </message>
<message>
<source>Warning: Some of the required input files could not be found!</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>CueSheetImport</name> <name>CueSheetImport</name>

View File

@ -474,6 +474,10 @@
<numerusform>Пропущено %n доріжок.</numerusform> <numerusform>Пропущено %n доріжок.</numerusform>
</translation> </translation>
</message> </message>
<message>
<source>Warning: Some of the required input files could not be found!</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>CueSheetImport</name> <name>CueSheetImport</name>

View File

@ -467,6 +467,10 @@
<numerusform> %n </numerusform> <numerusform> %n </numerusform>
</translation> </translation>
</message> </message>
<message>
<source>Warning: Some of the required input files could not be found!</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>CueSheetImport</name> <name>CueSheetImport</name>

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -35,7 +35,7 @@
#define VER_LAMEXP_MINOR_LO 1 #define VER_LAMEXP_MINOR_LO 1
#define VER_LAMEXP_TYPE Alpha #define VER_LAMEXP_TYPE Alpha
#define VER_LAMEXP_PATCH 1 #define VER_LAMEXP_PATCH 1
#define VER_LAMEXP_BUILD 1565 #define VER_LAMEXP_BUILD 1566
#define VER_LAMEXP_CONFG 1558 #define VER_LAMEXP_CONFG 1558
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -330,41 +330,52 @@ void CueImportDialog::analyzedFile(const AudioFileModel &file)
void CueImportDialog::importCueSheet(void) void CueImportDialog::importCueSheet(void)
{ {
QStringList files; QStringList files;
QList<LockedFile*> locks;
//Fetch all files that are referenced in the Cue Sheet and lock them //Fetch all files that are referenced in the Cue Sheet and lock them
int nFiles = m_model->getFileCount(); int nFiles = m_model->getFileCount();
for(int i = 0; i < nFiles; i++) for(int i = 0; i < nFiles; i++)
{ {
QString temp = m_model->getFileName(i);
try try
{ {
m_locks << new LockedFile(temp); LockedFile *temp = new LockedFile(m_model->getFileName(i));
locks << temp;
files << temp->filePath();
} }
catch(const std::exception &error) catch(const std::exception &error)
{ {
qWarning("Failed to lock file:\n%s\n", error.what()); qWarning("Failed to lock file:\n%s\n", error.what());
continue;
} }
catch(...) catch(...)
{ {
qWarning("Failed to lock file!"); qWarning("Failed to lock file!");
continue;
} }
files << temp;
} }
//Check if all files could be locked
if(files.count() < m_model->getFileCount())
{
if(QMessageBox::warning(this, tr("Cue Sheet Error"), tr("Warning: Some of the required input files could not be found!"), tr("Continue Anyway"), tr("Abort")) == 1)
{
files.clear();
}
}
//Process all avialble input files
if(files.count() > 0)
{
//Analyze all source files first //Analyze all source files first
if(analyzeFiles(files)) if(analyzeFiles(files))
{ {
//Now split files according to Cue Sheet //Now split files according to Cue Sheet
splitFiles(); splitFiles();
} }
}
//Release locks //Release locks
while(!m_locks.isEmpty()) while(!locks.isEmpty())
{ {
delete m_locks.takeFirst(); delete locks.takeFirst();
} }
} }

View File

@ -68,7 +68,6 @@ private:
const SettingsModel *m_settings; const SettingsModel *m_settings;
QList<LockedFile*> m_locks;
QList<AudioFileModel> m_fileInfo; QList<AudioFileModel> m_fileInfo;
QString m_cueFileName; QString m_cueFileName;
QString m_outputDir; QString m_outputDir;

View File

@ -201,9 +201,9 @@ LockedFile::LockedFile(const QString &filePath, const bool bOwnsFile)
existingFileInfo.setCaching(false); existingFileInfo.setCaching(false);
//Make sure the file exists, before we try to lock it //Make sure the file exists, before we try to lock it
if(!(existingFileInfo.exists() && existingFileInfo.isFile())) if((!existingFileInfo.exists()) || (!existingFileInfo.isFile()) || m_filePath.isEmpty())
{ {
THROW_FMT("File '%s' does not exist!", QUTF8(m_filePath)); THROW_FMT("File '%s' does not exist!", QUTF8(filePath));
} }
//Now lock the file //Now lock the file

View File

@ -75,11 +75,14 @@ FileAnalyzer::FileAnalyzer(const QStringList &inputFiles)
} }
FileAnalyzer::~FileAnalyzer(void) FileAnalyzer::~FileAnalyzer(void)
{
if(m_pool)
{ {
if(!m_pool->waitForDone(2500)) if(!m_pool->waitForDone(2500))
{ {
qWarning("There are still running tasks in the thread pool!"); qWarning("There are still running tasks in the thread pool!");
} }
}
LAMEXP_DELETE(m_templateFile); LAMEXP_DELETE(m_templateFile);
LAMEXP_DELETE(m_pool); LAMEXP_DELETE(m_pool);