Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Offline MarkSide  
#1 Posted : Tuesday, February 14, 2012 1:01:00 AM(UTC)
MarkSide

Joined: 2/12/2012(UTC)
Posts: 9

In all the sample games that support sound, every so often the game will freeze for anywhere from a fraction of a second to a little over one second.

This can be noticed most easily in the BreakoutGame sample. While playing, every so often the game will freeze; if you have task manager running at this time, you can quick take a peek and see that the process is taking up 100% of one core (12% CPU on my quad-core/hyperthreading system). After that cpu-utilization value drops back down to 0, the game resumes.

Commenting out line #177 (sound.Play();) in BreakoutGame.cs causes the problem to go away - no more freezing, and cpu utilization stays around 0-1% for the duration of the game.

Not sure if this is a problem with my specific machine or not. If there is anything I can do to generate additional debug-information please let me know.

Thanks,

--- Mark ---

Wanna join the discussion?! Login to your forum accountregister a new account. Or Connect via Facebook Twitter Google

Offline Benjamin  
#2 Posted : Tuesday, February 14, 2012 9:12:08 AM(UTC)
Benjamin

Medals: Admin

Joined: 8/20/2011(UTC)
Posts: 1,421
Location: Hannover

Thanks: 18 times
Was thanked: 97 time(s) in 92 post(s)
Thanks for the bug report. I have entered it into our bug database. We have not noticed such behavior (probably a Windows only issue anyway), but we will check it out. Do you have a slower PC or can you maybe check with the Resource Monitor of the Task Manager in Windows whats going on (file access, network, etc.?) when the freezing is happening.
Offline MarkSide  
#3 Posted : Thursday, February 16, 2012 5:29:55 AM(UTC)
MarkSide

Joined: 2/12/2012(UTC)
Posts: 9

Dug a little deeper into this today.

Nothing extraordinary noted using Task Manager / Resource Monitor, but Process Explorer did show one particular thread sucking up all the CPU time when the problem occurred. Unfortunately, this thread's start address was clr.dll!GetMetaDataInternalInterfaceFromPublic+0x1e505; the process has 5 threads with that same start address.

I was able to get a few stack traces during times that the problem occurred:

stack 1:
dsound.dll+0x4613
dsound.dll+0x4556
dsound.dll+0x620f
dsound.dll+0x62e7
adi_oal.dll!alDistanceModel+0xb7c7

stack 2:
wow64cpu.dll!TurboDispatchJumpAddressEnd+0x6c0
wow64cpu.dll!TurboDispatchJumpAddressEnd+0x676
wow64.dll!Wow64SystemServiceEx+0x1ce
wow64.dll!Wow64LdrpInitialize+0x429
ntdll.dll!RtlIsDosDeviceName_U+0x24c87
ntdll.dll!LdrInitializeThunk+0xe
ntdll.dll!ZwReleaseMutant+0x15
dsound.dll+0x28cd
adi_oal.dll!alDistanceModel+0xb7c7

stack 3:
wow64cpu.dll!TurboDispatchJumpAddressEnd+0x6c0
wow64cpu.dll!TurboDispatchJumpAddressEnd+0x676
wow64.dll!Wow64SystemServiceEx+0x1ce
wow64.dll!Wow64LdrpInitialize+0x429
ntdll.dll!RtlIsDosDeviceName_U+0x24c87
ntdll.dll!LdrInitializeThunk+0xe
ntdll.dll!ZwReleaseMutant+0x15
dsound.dll+0x28cd
adi_oal.dll!alDistanceModel+0xb7c7

stack 4:
dsound.dll+0x4613
dsound.dll+0x4556
dsound.dll+0x620f
dsound.dll+0x62e7
adi_oal.dll!alDistanceModel+0xb7c7

stack 5:
dsound.dll+0x54a0
dsound.dll+0x5437
dsound.dll+0x55ea
dsound.dll+0x5f4e
dsound.dll+0x59b5
dsound.dll+0x508d
adi_oal.dll!alDistanceModel+0xb7d6

I obviously haven't set up this machine to hit the Microsoft Symbol Server. Not even sure if they provide better symbols for dsound.dll or not, I can try again if you think that would be helpful.

My machine is relatively beefy - quad-core Intel Core i7 920 with 6GB RAM, Asus P6T Deluxe V2 motherboard with onboard "ADI AD2000B" audio chip. Maybe the audio controller on this motherboard - and/or my audio drivers - are causing this problem? Never noticed it before during any games, music/video playing, etc. . . . but who knows.

--- Mark ---

Edited by user Thursday, February 16, 2012 5:30:27 AM(UTC)  | Reason: Not specified

Offline Benjamin  
#4 Posted : Thursday, February 16, 2012 11:27:56 AM(UTC)
Benjamin

Medals: Admin

Joined: 8/20/2011(UTC)
Posts: 1,421
Location: Hannover

Thanks: 18 times
Was thanked: 97 time(s) in 92 post(s)
I would first investigate the GetMetaDataInternalInterfaceFromPublic issue, you probably need to find out via WinDbg and/or Reflection. Even better you should use the Ants Profiler to see whats happening at the time of the hick-up.

Additional tips:
http://msdn.microsoft.co...indows/hardware/gg463009
http://www.reflector.net/
http://community.sharpde...-assembly-inspector.aspx
http://www.red-gate.com/...ts-performance-profiler/
http://blogs.msdn.com/b/...lab-4-high-cpu-hang.aspx

As for solutions I could only find different people having problems with GetMetaDataInternalInterfaceFromPublic, but no general solution. For example this guy had a similar problem in IIS, but there is no solution available:
http://stackoverflow.com...nterfacefrompublic0x935c

Do you by any chance use ReSharpers code inspection/code analysis feature or have you enabled to download symbols for assembly references? Maybe this check takes a long time on your machine? We had some slowdowns with that feature as well, but only annoying on slower PCs.

The stack traces you have posted are all native code and the engine does not do any native code. I suggest you update OpenAL and your OpenGL graphics driver, maybe it is just a driver bug? Sounds strange that the native DirectX Sound library is being used for your OpenAL sound playback, but that could be normal if there are no other drivers.
http://connect.creativel...oads/Forms/AllItems.aspx (download oalinst).
http://www.nvidia.com (for nvidia drivers, might help because they might have a better dsound.dll)
http://www.catalyst.com (for ati drivers, might help because they might have a better dsound.dll)
+ Whatever sound driver you have
To be sure update your DirectX to the latest version as well! Also start and checkout the result of: dxdiag

I hope that helps. If you find out more, there might be more specific info available. It obviously does not make much sense to poke in all directions ^^
Offline MarkSide  
#5 Posted : Saturday, February 18, 2012 6:38:36 PM(UTC)
MarkSide

Joined: 2/12/2012(UTC)
Posts: 9

Okay, found the problem: the SoundMax software that came with my motherboard driver package installed that adi_oal.dll. Apparently that DLL can cause some issues; renaming it to prevent it from being loaded completely resolved the problem.

Sorry for the red herring!

--- Mark ---
Offline Benjamin  
#6 Posted : Monday, February 20, 2012 3:51:01 PM(UTC)
Benjamin

Medals: Admin

Joined: 8/20/2011(UTC)
Posts: 1,421
Location: Hannover

Thanks: 18 times
Was thanked: 97 time(s) in 92 post(s)
Good to know it was a driver problem. Hopefully others can find this thread if they run into the same kind of trouble with OpenAL ..
Rss Feed  Atom Feed
Users browsing this topic
OceanSpiders 2.0
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2020, Yet Another Forum.NET
This page was generated in 0.083 seconds.