Audacity Bug Summary
••• Introduction •••
••• Keywords •••
    Audacity 3.0.3 development began 19th April 2021

Audacity Bugzilla



Bug 2 - Hang when scanning for VST effects on first-time install
Hang when scanning for VST effects on first-time install
Status: RESOLVED FIXED
Product: Audacity
Classification: Unclassified
Component: VST
1.3.10
Mac macOS
: P3 MoonPhase
Assigned To: Default Assignee for New Bugs
http://n2.nabble.com/Hang-when-scanni...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-10-30 14:15 UTC by Richard Ash
Modified: 2018-08-20 11:46 UTC (History)
3 users (show)

See Also:
Steps To Reproduce:
Release Note:
* (Mac OS X 10.5.8 PPC) A first-time installation of Audacity Beta will hang on first launch if it finds VST effects. Workaround: rename the system VST folders /Library/Audio/Plug-ins/VST or ~/Library/Audio/Plug-ins/VST. One of the found plug-ins will be available in the Audacity effect menu but no more can be added - re-scanning for further plug-ins will cause a permanent hang. Workaround: edit audacity.cfg to read "Rescan=0".
First Git SHA:
Group: ---
Workaround:
Closed: 2018-08-20 00:00:00
richard: Regression+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Ash 2009-10-30 14:15:26 UTC
Details in Bill Wharrie's post (see URL).

Conclusions:

1) If plugins.cfg does not exist or plugins.cfg is empty then Audacity does a
scan for VST effects. If it finds one, it hangs (on Mac, not Windows), but not
after writing to plugins.cfg. After that Audacity will launch and the VST
effect will be available.

2) If the user checks "Rescan for VST effects", quits Audacity, adds a VST
effect to the plug-ins folder then launches Audacity, they are in a bad
situation (on Mac, at least). They must either trash or edit audacity.cfg for
Audacity to launch.

3) It appears to be impossible (on Mac) to get Audacity to find more than one
VST effect in the plug-ins folder.
Comment 1 James Crook 2010-01-28 12:15:44 UTC
    * Demote from P2 to P3 as per wiki.  JC Marked as Heisenbug since only two instances known.

    * GA: LL committed possible fix on 14Nov09, Bill not tested yet
    * GA: 23 Nov09 Bill and LL tested extensively. Problem 100% replicable on Bill's 10.5.8 PPC machine, but 10.5.8 Intel and 10.4.11 PPC and Intel seem OK.
    * GA: 26Nov09 Demoted because only two confirmed instances known so far (both on 10.5.8 PPC). P3 lets us release note it and see if we can find other instances where person is able to debug. The inability to add more than one VST effect to plugins.cfg must be fixed as well as the initial hang.
Comment 2 Bill Wharrie 2010-03-02 09:16:44 UTC
Another report of this on the forum: http://forum.audacityteam.org/viewtopic.php?f=17&t=26857&p=76042
Comment 3 Bill Wharrie 2010-06-06 11:14:45 UTC
And another report of this on the forum:
http://forum.audacityteam.org/viewtopic.php?f=13&t=33026
Comment 4 Gale Andrews 2010-08-13 16:15:12 UTC
Looks like this averages out at about two reports per month, ongoing.
Comment 5 Bill Wharrie 2010-12-14 14:57:46 UTC
(In reply to comment #4)
Adding another report:
http://forum.audacityteam.org/viewtopic.php?f=17&t=47527&p=117212#p117208
Comment 6 Leland Lucius 2011-03-08 01:48:58 UTC
Wow, this is getting just a little worrisome.  Bill, do you or anyone you know have an extra copy of 10.5.8 PPC laying around that I could test with?  I would promise to delete it when I was done.

Leland
Comment 7 Leland Lucius 2011-04-01 22:29:01 UTC
Thanks to Bill, I have been able to research this bug and have found that
it is a problem in wxWidgets.  But, it's a known issue. Here's the comments
in wxWidgets/src/unix/utilsunx.cpp:

// ----------------------------------------------------------------------------
// wxExecute support
// ----------------------------------------------------------------------------

/*
    NOTE: The original code shipped in 2.8 used __DARWIN__ && __WXMAC__ to wrap
    the wxGUIAppTraits differences but __DARWIN__ && (__WXMAC__ || __WXCOCOA__)
    to decide whether to call wxAddProcessCallbackForPid instead of
    wxAddProcessCallback.  This define normalizes things so the two match.

    Since wxCocoa was already creating the pipes in its wxGUIAppTraits I
    decided to leave that as is and implement wxAddProcessCallback in the
    utilsexec_cf.cpp file.  I didn't see a reason to wrap that in a __WXCOCOA__
    check since it's valid for both wxMac and wxCocoa.

    Since the existing code is working for wxMac I've left it as is although
    do note that the old task_for_pid method still used on PPC machines is
    expected to fail in Leopard PPC and theoretically already fails if you run
    your PPC app under Rosetta.

    You thus have two choices if you find end process detect broken:
     1) Change the define below such that the new code is used for wxMac.
        This is theoretically ABI compatible since the old code still remains
        in utilsexec_cf.cpp it's just no longer used by this code.
     2) Change the USE_POLLING define in utilsexc_cf.cpp to 1 unconditionally
        This is theoretically not compatible since it removes the
        wxMAC_MachPortEndProcessDetect helper function.  Though in practice
        this shouldn't be a problem since it wasn't prototyped anywhere.
 */
#define USE_OLD_DARWIN_END_PROCESS_DETECT (defined(__DARWIN__) && defined(__WXMAC__))
// #define USE_OLD_DARWIN_END_PROCESS_DETECT 0

The third paragraph about Leopard and PPC machines is exactly what is going
on.  The main process never gets notified that the child has ended.  Changing
the defines as mentioned in option #1, does indeed correct the problem.

A report from Bill after testing:

Leland:
It seems to work well. Tested on 10.5.8 G5 and 10.4.11 G4. I can load up the plug-ins folder and all effects are found and installed in the Effect menu. Can't test on Intel until I get some Intel VST effects and get a chance to commandeer my wife's iMac - let me know if that is needed.

-- Bill 

The patch to wxMac 2.8.11 can be found in the audacity/mac directory and Paul has confirmed that the nightly builds will now include the patch so PPC Leopard machines should no longer have any problems with loading VST effects.
Comment 8 Gale Andrews 2011-04-02 11:57:17 UTC
Thanks. If all wxMac is now using the new code as I understand then I think it would be good for Bill to test on an Intel Mac if he could.
Comment 9 Bill Wharrie 2011-04-02 21:40:56 UTC
(In reply to comment #8)
I don't have an Intel 10.5 machine to test on, so someone else will have to check that.
Comment 10 Bill Wharrie 2011-04-07 10:52:50 UTC
(In reply to comment #9)
With 1.3.13rc3, running on my PPC 10.5.8 G5 machine, I can load up the plug-ins folder with VST effects and they are found and added to the Effect menu without incident :) Same if I put the VST effects in ~/Library/Audio/Plug-ins/VST
Comment 11 Bill Wharrie 2011-04-07 10:56:52 UTC
(In reply to comment #9)
As I understand what's happening, there was a change between 10.4 and 10.5 that caused this, and that change only affected PPC. But if you want to verify that the bug fix does not adversely affect Intel machines, then testing on a 10.6 Intel machine should be sufficient, should it not? And Leland can do that, no?
Comment 12 Gale Andrews 2011-04-07 11:34:07 UTC
(In reply to comment #11)
> As I understand what's happening, there was a change between 10.4 and 10.5 that
> caused this, and that change only affected PPC. But if you want to verify that
> the bug fix does not adversely affect Intel machines, then testing on a 10.6
> Intel machine should be sufficient, should it not? And Leland can do that, no?
My understanding was that the code change we made would affect everybody on Mac, and it would be "safest" to verify on Intel Macs (and especially 10.5). And Leland is not in QA, if you know what I mean :=) But if you are completely happy to resolve this fixed Leland, then I am.
Comment 13 Leland Lucius 2011-04-07 12:25:30 UTC
(In reply to comment #12)
> (In reply to comment #11)
> > As I understand what's happening, there was a change between 10.4 and 10.5 that
> > caused this, and that change only affected PPC. But if you want to verify that
> > the bug fix does not adversely affect Intel machines, then testing on a 10.6
> > Intel machine should be sufficient, should it not? And Leland can do that, no?
> My understanding was that the code change we made would affect everybody on
> Mac, and it would be "safest" to verify on Intel Macs (and especially 10.5).
> And Leland is not in QA, if you know what I mean :=) But if you are completely
> happy to resolve this fixed Leland, then I am.

Absolutely, I would consider this one fixed.  I've tested it on PPC 10.4 and Intel 10.6 without issue.
Comment 14 Gale Andrews 2011-04-07 12:46:29 UTC
Thanks, Leland. One more "RESOLVED - FIXED".