Opened 9 years ago

Last modified 8 years ago

#17 closed defect

Audio: Failed to attach to driver — at Version 1

Reported by: Valery V. Sedletski Owned by: Valery V. Sedletski
Priority: major Milestone: Enhanced
Component: Common Tasks Keywords:
Cc:

Description (last modified by Valery V. Sedletski)

When trying to start the VM with an audio driver enabled, got a trap in VBoxDD.dll (src\VBox\Devices\Audio\DrvAudio?.cpp, line 1797, function drvAudioDestruct()):

        pThis->pHostDrvAudio->pfnControlIn(pThis->pHostDrvAudio, pHstStrmIn, PDMAUDIOSTREAMCMD_DISABLE);
        pThis->pHostDrvAudio->pfnFiniIn(pThis->pHostDrvAudio, pHstStrmIn);
    }

    if (pThis->pHostDrvAudio->pfnShutdown) // << ==== Access violation
        pThis->pHostDrvAudio->pfnShutdown(pThis->pHostDrvAudio);

    LogFlowFuncLeave();
}

This is because of pThis->pHostDrvAudio == NULL, then trying to dereference this pointer, without a check for validness.

This is after the drvAudioConstruct() failed in PDMDrvHlpAttach():

    /*
     * Attach driver below and query its connector interface.
     */
    PPDMIBASE pDownBase;
    int rc = PDMDrvHlpAttach(pDrvIns, fFlags, &pDownBase);
    if (RT_FAILURE(rc))
    {
        LogRel(("Audio: Failed to attach to driver %p below (flags=0x%x), rc=%Rrc\n",
                pDrvIns, fFlags, rc));
        return rc;
    }

The log piece:

....
00:00:53.733965 PIIX3 ATA: LUN#0: disk, PCHS=4161/16/63, total number of sectors 4194304
00:00:53.734224 DrvBlock: Flushes will be ignored
00:00:53.734231 DrvBlock: Async flushes will be passed to the disk
00:00:53.734637 VD: Opening the disk took 354601 ns
00:00:53.734870 PIIX3 ATA: LUN#1: CD/DVD, total number of sectors 141411, passthrough disabled
00:00:53.734974 PIIX3 ATA: LUN#2: no unit
00:00:53.734982 PIIX3 ATA: LUN#3: no unit
00:00:53.735797 PIIX3 ATA: Ctl#0: finished processing RESET
00:00:53.740468 PIIX3 ATA: Ctl#1: finished processing RESET
00:00:54.061154 Audio: Failed to attach to driver 0560c850 below (flags=0x0), rc=VERR_PDM_CFG_MISSING_DRIVER_NAME

The call stack:

 vmR3CreateU(UVM*, unsigned, int (*)(UVM*, VM*, void*), void*)
 vmR3InitRing3(VM*, UVM*)
 PDMR3Init
 pdmR3DevInit
 hdaConstruct(PDMDEVINS*, int, CFGMNODE*)
 hdaAttach(PDMDEVINS*, unsigned, unsigned)
 pdmR3DevHlp_DriverAttach(PDMDEVINS*, unsigned, PDMIBASE*, PDMIBASE**, char
 pdmR3DrvInstantiate
 pdmR3DrvDestroyChain
 drvAudioDestruct(PDMDRVINS*)

The driver appears to be MMPM2 (not sure if it is fully implemented, so disabled for now, then got the following error in the next ticket #18)

Change History (1)

comment:1 Changed 9 years ago by Valery V. Sedletski

Description: modified (diff)
Note: See TracTickets for help on using tickets.