This way, building the minsrc tarball doesn't require multiple versions
of Automake to be installed. (Most things were at the 1.11 version, but
some were at the 1.14 version.)
Building minsrc should now work just fine.
We can't go to 3.0.1 yet as there are still build issues on
Linux and OSX. You can get Windows to build, but there's
still some display issues.
These changes should work with wxWidgets 2.8.12 as well, so
we can take our time to get things working properly before
switching over.
Replace the custom Makefile by automake. In addition drop the hacky
libwidgetextra-uninstalled.pc and configure the library like every other
optional library, but check if the library is not disabled.
the list of dependent libraries for static library linkage, so they go in libs.private. This was causing the duplication of CFLAGS into the final link (which was clumsy but largely harmless), but also build failures for people with funky multi-part options in their CFLAGS (which is where it was found), because some of the flags didn't survive pkg-config's manipulations and came out corrupted.
Was able to make the bug occur after lots of fast clicking around, by double-clicking Preview in Amplify dialog.
The key seems to be the call to wxYield. That function is obsolete, but looking at the documentation for its successor, wxApp::Yield():
"Caution should be exercised, however, since yielding may allow the user to perform actions which are not compatible with the current task. Disabling menu items or whole menus during processing can avoid unwanted reentrance of code: see ::wxSafeYield for a better function."
That sounds like exactly the situations where this has occurred. And the documentation for ::wxSafeYieldsays:
"This function is similar to wxYield, except that it disables the user input to all program windows before calling wxYield and re-enables it again afterwards."
Sounds like what we need. So I went through the code and for all the wxYield and wxGetApp()::Yield occurrences where Audacity is doing some drawing or already in the process of responding to a GUI event, I replaced them with ::wxSafeYield. Replaced all the remaining wxYield calls with calls to wxGetApp()::Yield().
Haven't been able to replicate the bug since these changes. Please test.