[directmusic] Re: DX9 DM Shutdown crash

  • From: "Dugan Porter" <duganp@xxxxxxxxxxxxxxxxxxxxx>
  • To: <directmusic@xxxxxxxxxxxxx>
  • Date: Wed, 12 Mar 2003 22:31:20 -0800

Aaron, you might want to ensure that you have released all your
DirectMusic objects before any of your DLLs start to unload.  Since you
are apparently using the debug version of dmusic (all the DLLs have a
"d" added to their name), you can also enable debug spew in the DirectX
control panel applet and see if you get any messages like "DMusic:
ASSERT(g_cComponent !=3D 0) failed" when you close down.  This should =
give
you an indication of which objects you are leaking, if any.

Hope that helps,
Dugan Porter - Audio API Dev Lead
This posting is provided "as is" with no warranties, and confers no
rights


-----Original Message-----
From: Aaron R Leiby [mailto:aleiby@xxxxxxxxxxxxx]=20
Sent: Wednesday, March 12, 2003 3:53 PM
To: directmusic@xxxxxxxxxxxxx
Subject: [directmusic] DX9 DM Shutdown crash



When we shut down our game, if the current level is using direct music,
direct music will get shut down near the end of the game's exit
sequence. This often causes a crash in the dmusicd.dll thread.  What
seems to be happening is that while that thread is sleeping, dmusicd.dll
gets unloaded, so when it wakes up it gets an access violation (this is
just from looking at the call stack for the thread before and after the
crash).  This doesn't happen in DX8.  It also doesn't happen if we shut
down direct music mid-game (which we do all the time since only some
levels use direct music).

Any ideas what can be done to avoid this?

We're using the CMusicManager wrapper class, and passing NULL for the
HWND for Initialization.  Could that have anything to do with it?  Any
idea why this isn't a problem in DX8.1?

Thanks.


Aaron




Other related posts: