From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FlICj-0001bp-LU for qemu-devel@nongnu.org; Wed, 31 May 2006 00:21:09 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FlICh-0001b7-Ja for qemu-devel@nongnu.org; Wed, 31 May 2006 00:21:09 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FlICh-0001b2-F6 for qemu-devel@nongnu.org; Wed, 31 May 2006 00:21:07 -0400 Received: from [211.5.2.81] (helo=nm01omta01d.dion.ne.jp) by monty-python.gnu.org with smtp (Exim 4.52) id 1FlIId-0001EU-Kf for qemu-devel@nongnu.org; Wed, 31 May 2006 00:27:15 -0400 Message-ID: <000901c68469$a8e12e00$0464a8c0@athlon> From: "Kazu" References: Subject: Re: [Qemu-devel] qemu dsound and crash Date: Wed, 31 May 2006 13:21:16 +0900 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org ZIGLIO, Frediano wrote: >I analyzed the dsound problem (using Windows dsound audio driver cause >crash when closing console window cf "Qemu impressions"). The problem is >very complicated. Is seems that for some reasons dsound dll is unloaded >before msvcrt (which hold atexit and exit function) so dsound free >memory then msvcrt calls at exit callbacks which try to access freed >structure... The problem occur on Windows XP and I got error using Qemu >downloaded at http://www.h7.dion.ne.jp/~qemu-win/ and compiling 0.8.1 >from sources. dsound.dll is loaded calling CoCreateInstance in >audio/dsoundaudio.c (line 975) however is very strange this dll free >cause even dsound.dll depends on msvcrt.dll. Perhaps a workaround can be >to call SetConsoleCtrlHandler on main and calling exit by our own... I >noted that for some reason qemu.exe seems to load msvcrt.dll two >times... Thanks for your info. I wondered what caused the problem. It seems that optimization also have effect on the problem. Regards, Kazu