CNewFileSelector crash, MacOS

I recently ran into an issue with CNewFileSelector with identical problems as the thread here (MacOS only):

https://sourceforge.net/p/vstgui/mailman/message/34870506/

It was also very repeatable - choosing or always crashed, from within the host code.

I replicated this same problem with a VST3 plugin written with SDK3.6.7 in Cubase 7 while trying to open the UI Description Editor. Choosing Save As (to get the CNewFileSelector instantiated) and then Cancel or Save will crash and is also repeatable.

The line of code causing the problem is where you set the default extension (for the UI Description Editor crash, it is in the VST3Editor.cpp file):

fileSelector->setDefaultExtension (CFileExtension (“VSTGUI UI Description”, “uidesc”));

Commenting this line of code out gets rid of the crash and this fix is also repeatable.

CNewFileSelector::addFileExtension only contains one line of code to push the extension object onto a std::list – is is possible this list is not being cleaned up somewhere else?

  • Will

Do you have a crash log ? Please send it to me via private message.

Cheers
Arne

Hi Will,
thanks for sending the crash log. But I’m afraid I don’t know what the reason is. I have no crashes when using the file selector. It may be a combination of the compiler and macOS version you’re using, but no real clue.

Cheers
Arne

Hi Arne

Thanks for checking it - right now it is not a problem to leave out the call to setDefaultExtension( ) so it is still workable. If it changes with the next Mac/XCode I get, I will post it.

  • Will