Musescore nightly build crashing after selecting lame_enc.dll for mp3 export
I'm using Windows XP, SP3
Nightly build is from Mar. 18th rev 9cde62c
I tried to point to a lame encoder dated 8-8-2003 at following link:
D:\Program Files\Magic Audio Converter\lame_enc.dll
Maybe the spaces in the path are causing a crash? The error message says cannot open the lame_enc file. When I click OK it generates abnormal termination 'must close' message which cause program to close when ok is clicked.
Comments
Confirmed:
I had similar crashes with MuseScoreNightly-2014-03-19-1408-abfb111.7z
(nighltyabfb111)
I tried both the 32bit and 64bit version of Lame 3.99.5 (from here: http://www.rarewares.org/mp3-lame-bundle.php)
This was on Win7 Ultimate 64bit (all latest updates).
When LAME MP3 output was implemented, I reported similar findings. I was told that _only_ the LAME version that was made (modded?) for Audacity was supported. You will have to try the "Lame for Audacity" version.
Indeed, MuseScore is not able to load this dll. However, it should not crash.
The crash is due because the QLibrary object lame_lib is deleted twice when the loading of the library fails.
First, when the initialization of the library fails in initLibrary, at line 284 of mscore\exportmp3.cpp; second, when the MP3Exporter object is deleted, at line 307 of mscore\exportmp3.cpp.
It is probably also extremely dangerous to call lame_lib->unload() at line 306 of mscore\exportmp3.cpp when the library has already been deleted (when the library loading has failed).
I guess moving the } from line mscore/exportmp3.cpp line 305 two lines down would solve this.
Maybe additionally do the unload and delete when lame_init() fails, in line 290
see PR #803
Could someone attach such a 'bad' DLL here, so we can test the fix?
Attached is Lame encoder dll that caused crash. You need to change the file extension from txt to dll. System wouldn't let me upload dll understandably.
Thanks. My fix does fix the crash and give an error message instead
Attached the working dll, in case you need that.
Fixed in 6513ffc205
Automatically closed -- issue fixed for 2 weeks with no activity.