Discussion:
Crash on ASIO de-init
(too old to reply)
Louis-Paul CORDIER
2018-08-02 09:04:31 UTC
Permalink
Hi all,

I have a build of Portaudio commit
8dc6d59877f2d102065871c3ef3020f3b98fd6b1, and I have a crash in my
application. Loading the debug version of the library, crashing is
occuring in asiolist.cpp lin 111. This occurs when I call Pa_Terminate().

Hardware context:
- I have a Yamaha AG03 mix board that supports ASIO.
- When it is plugged on the USB port, there are no crashes.
- When it is off or unplugged, the device seems to be still listed by
the ASIO driver (LPASIODRVSTRUCT contains the name of my Yamaha mixer).
Then it crashes.

Any clues?

static void deleteDrvStruct (LPASIODRVSTRUCT lpdrv)
{
    IASIO    *iasio;

    if (lpdrv != 0) {
        deleteDrvStruct(lpdrv->next);
        if (lpdrv->asiodrv) {
            iasio = (IASIO *)lpdrv->asiodrv;
            iasio->Release();
        }
        delete lpdrv; // crash here
    }
}
Reinhold Hoffmann
2018-08-02 13:00:18 UTC
Permalink
Hi Louis-Paul,

According to

https://lists.columbia.edu/pipermail/portaudio/2016-November/000946.html

there is a regression bug in the ASIO SDK 2.3 which is open for quite some
time.

Instead

delete lpdrv; // crash here

the correct code line is

delete[] lpdrv; <====================

Hope this fixes your issue. Please let us know.

Reinhold

-----Ursprüngliche Nachricht-----
Von: portaudio-***@lists.columbia.edu
[mailto:portaudio-***@lists.columbia.edu] Im Auftrag von Louis-Paul
CORDIER
Gesendet: Donnerstag, 2. August 2018 11:05
An: 'portaudio list'
Betreff: [Portaudio] Crash on ASIO de-init

Hi all,

I have a build of Portaudio commit
8dc6d59877f2d102065871c3ef3020f3b98fd6b1, and I have a crash in my
application. Loading the debug version of the library, crashing is
occuring in asiolist.cpp lin 111. This occurs when I call Pa_Terminate().

Hardware context:
- I have a Yamaha AG03 mix board that supports ASIO.
- When it is plugged on the USB port, there are no crashes.
- When it is off or unplugged, the device seems to be still listed by
the ASIO driver (LPASIODRVSTRUCT contains the name of my Yamaha mixer).
Then it crashes.

Any clues?

static void deleteDrvStruct (LPASIODRVSTRUCT lpdrv)
{
    IASIO    *iasio;

    if (lpdrv != 0) {
        deleteDrvStruct(lpdrv->next);
        if (lpdrv->asiodrv) {
            iasio = (IASIO *)lpdrv->asiodrv;
            iasio->Release();
        }
        delete lpdrv; // crash here
    }
}

Loading...