http://bugs.winehq.org/show_bug.cgi?id=24624
Summary: Audacity 1.3.12 treats all file type selections as "all files" when exporting Product: Wine Version: 1.3.4 Platform: x86-64 URL: http://audacity.sourceforge.net/ OS/Version: Linux Status: UNCONFIRMED Severity: minor Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: RandomAccountName@mail.com
Created an attachment (id=31111) --> (http://bugs.winehq.org/attachment.cgi?id=31111) Terminal output
In Audacity, open an audio file and then go to file -> export. On this file dialog, any selection from the "files of type" drop-down list will (apparently) be treated as "all files", which leads to two minor annoyances:
1. DLLs and other unrelated file types will be listed while browsing for a destination folder. (This doesn't happen immediately when the dialog opens, only after changing the destination directory and/or file type.) 2. If the file extension isn't specified manually, Audacity will try to append ".*" to the end of the file name and then warn that this is a non-standard extension for this type of file.
http://bugs.winehq.org/show_bug.cgi?id=24624
A Wine user RandomAccountName@mail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, source
http://bugs.winehq.org/show_bug.cgi?id=24624
--- Comment #1 from A Wine user RandomAccountName@mail.com 2011-04-14 01:11:17 CDT --- In wine-1.3.17-275-g24ba89c, the first issue is still present but the second is gone.
http://bugs.winehq.org/show_bug.cgi?id=24624
A Wine user RandomAccountName@mail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Depends on| |28454 Summary|Audacity 1.3.12 treats all |Audacity 1.3 treats all |file type selections as |file type selections as |"all files" when exporting |"all files" when exporting Severity|minor |trivial
--- Comment #2 from A Wine user RandomAccountName@mail.com 2011-10-12 05:09:53 CDT --- No change in wine-1.3.30-45-ga843ace.
http://bugs.winehq.org/show_bug.cgi?id=24624
Bug 24624 depends on bug 28454, which changed state.
Bug 28454 Summary: Audacity 1.3 crashes on startup - unimplemented function msvcp90.dll.?replace@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@IIABV12@@Z http://bugs.winehq.org/show_bug.cgi?id=28454
What |Old Value |New Value ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |FIXED
http://bugs.winehq.org/show_bug.cgi?id=24624
--- Comment #3 from A Wine user RandomAccountName@mail.com --- No change in wine-1.7.13-186-g049f08f.
https://bugs.winehq.org/show_bug.cgi?id=24624
Damjan Jovanovic damjan.jov@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |damjan.jov@gmail.com
--- Comment #4 from Damjan Jovanovic damjan.jov@gmail.com --- Audacity 2.3.2 running under today's Wine Git (5725ed3b46309b62469e4f305cb0b5a9b292dd43) does correctly filter file types in the "File" -> "Export" -> "Export audio" dialog (your first issue).
Was it an older version of Audacity that was broken? Which version of it did you test?
https://bugs.winehq.org/show_bug.cgi?id=24624
sh neoneun87@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |neoneun87@gmail.com
--- Comment #5 from sh neoneun87@gmail.com --- The bug is fixed...
Tested in wine 4.21 - ok Tested in wine 5.0-rc3 - ok
audacity 1.3.4 http://www.oldversion.com/windows/audacity-1-3-4
I followed the steps detailed in the first post and could not reproduce the bug,both `open...` and `export...` behave as expected.. the dialog shows you only the files for the specified file type. I exported a .wav file, no issues at all.
https://bugs.winehq.org/show_bug.cgi?id=24624
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Summary|Audacity 1.3 treats all |Audacity v1.3 - v2.0.x |file type selections as |treats all file type |"all files" when exporting |selections as "all files" | |when exporting with WinVer | |set to 'Windows XP' Ever confirmed|0 |1 CC| |focht@gmx.net
--- Comment #6 from Anastasius Focht focht@gmx.net --- Hello folks,
I did some tests as well and it seems the problem only affected Audacity versions 1.x to 2.0.x. In later versions of Audacity (2.1.0+), the export menu/dialog appears to have changed.
https://www.fosshub.com/Audacity-old.html
https://www.fosshub.com/Audacity-old.html?dwl=audacity-win-2.0.zip
Example WAV:
https://file-examples.com/index.php/sample-audio-files/sample-wav-download/
https://file-examples.com/wp-content/uploads/2017/11/file_example_WAV_1MG.wa...
It's always good to be curious about things.
By doing a reverse bisect I found that starting with commit https://source.winehq.org/git/wine.git/commitdiff/6737ac70d6233f6b10f397ee8f... ("wine.inf: Set default Windows version to win7.") the problem "magically" disappears (part of Wine 2.2+). Voila - if you set the WINEPREFIX WinVer to 'Windows XP' you still get that erroneous behaviour even with latest Wine 5.0.
Refining summary to reflect that.
$ sha1sum audacity-win-* 594acb9f2f0af41625299b5f102b19b36ac7b681 audacity-win-1.3.4.exe c7ed8695effa9db52af0e34c5abe7e8da7909b4f audacity-win-2.0.exe b83fc170f97648f2d77aef3077998c1f7352a6e8 audacity-win-2.0.zip af52f001877508ba29f6ddddb7288adbad3aea37 audacity-win-2.1.0.zip
$ du -sh audacity-win-* 2.9M audacity-win-1.3.4.exe 20M audacity-win-2.0.exe 7.8M audacity-win-2.0.zip 9.2M audacity-win-2.1.0.zip
$ wine --version wine-5.0-rc3
Regards
https://bugs.winehq.org/show_bug.cgi?id=24624
--- Comment #7 from Damjan Jovanovic damjan.jov@gmail.com --- In Audacity's git, tag Audacity-2.0.0, file lib-src/FileDialog/win/FileDialogPrivate.cpp:
---snip--- // We do not use the custom filter code on Windows 7 or higher since it now // handles filters larger than 260 characters. gs_customFilter = (major < 6 || minor < 1);
wxString filterBuffer;
for (i = 0; i < items ; i++) { filterBuffer += wildDescriptions[i]; filterBuffer += wxT("|"); filterBuffer += (gs_customFilter ? wxT("*.*") : m_FilterGroups[i]); filterBuffer += wxT("|"); } ---snip---
(Each '|' eventually becomes '\0').
So the file type mask is always "*.*" on Windows < 6.1, presumably to save space and allow many file type masks within the 260 character limit. That "gs_customFilter" global variable is also checked when notifications are delivered to its file dialog hook function:
---snip--- else if (CDN_TYPECHANGE == (pNotifyCode->hdr).code && gs_customFilter) { OPENFILENAME *ofn = (OPENFILENAME *) GetWindowLongPtr(hDlg, GWLP_USERDATA); FileDialog *me = (FileDialog *) ofn->lCustData; me->ParseFilter(ofn->nFilterIndex); me->FilterFiles(hDlg, true); } ---snip---
So on Windows < 6.1, we run all that. The "me->ParseFilter()" will populate "m_Filters" with the list of masks for the currently selected file type, while "me->FilterFiles()" does the filtering work based on those masks. How?
The lengthy FileDialog::FilterFiles() method looks up the "lst2" listview on the dialog box, iterates over its contents, then uses many shell32 APIs. In brief, it allows folders, otherwise gets the filename and tries to match it against each filter from the earlier "m_Filters", using wxMatchWild(). If no filters matched, ListView_DeleteItem() deletes that filename from the listview.
Finally, where I believe things go wrong:
---snip--- // On Vista and maybe XP, we seem to need to refresh the view after // changing the filters. But, only refresh for type changes and not // selection changes since it causes additional selection change // events to occur. if (ishellview && refresh) { ishellview->Refresh(); } ---snip---
To summarize, Audacity 2.0: 1. Expects the file save dialog listview to be fully populated when it is called, with *.* as the filter. 2. Wants to decide which files do not match, and expects itself to be able to delete them from the listview. 3. Expects IShellview::Refresh() not to change which files are displayed, after it does the deletion.
(2) works as long as (1) is satisfied, but Wine fails (1) as it populates the listview with IShellview::Refresh() AFTER sending CDN_TYPECHANGE, and fails (3) as its IShellview::Refresh() does re-add deleted items.
To hack this into working, it is enough to comment the "ishellview->Refresh()" from earlier, and patch Wine to call IShellView::Refresh() prior to sending CDN_TYPECHANGE:
---snip--- diff --git a/dlls/comdlg32/filedlg.c b/dlls/comdlg32/filedlg.c index 0ada09aad96..0ec1e2f3fe9 100644 --- a/dlls/comdlg32/filedlg.c +++ b/dlls/comdlg32/filedlg.c @@ -3194,13 +3194,18 @@ static BOOL FILEDLG95_FILETYPE_OnCommand(HWND hwnd, WORD wNotifyCode) len = lstrlenW(lpstrFilter)+1; fodInfos->ShellInfos.lpstrCurrentFilter = heap_alloc( len * sizeof(WCHAR) ); lstrcpyW(fodInfos->ShellInfos.lpstrCurrentFilter,lpstrFilter); + /* Refresh the actual view to display the included items*/ + if (fodInfos->Shell.FOIShellView) + IShellView_Refresh(fodInfos->Shell.FOIShellView); if(fodInfos->ofnInfos->Flags & OFN_EXPLORER) SendCustomDlgNotificationMessage(hwnd,CDN_TYPECHANGE); } - - /* Refresh the actual view to display the included items*/ - if (fodInfos->Shell.FOIShellView) - IShellView_Refresh(fodInfos->Shell.FOIShellView); + else + { + /* Refresh the actual view to display the included items*/ + if (fodInfos->Shell.FOIShellView) + IShellView_Refresh(fodInfos->Shell.FOIShellView); + } } } return FALSE; ---snip---
A real fix would involve changes to IShellView::Refresh() itself, whose real function is currently a mystery.
https://bugs.winehq.org/show_bug.cgi?id=24624
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- URL|http://audacity.sourceforge |https://web.archive.org/web |.net/ |/20210427064038/https://www | |.fosshub.com/Audacity-old.h | |tml?dwl=audacity-win-2.0.zi | |p