Author Topic: [Solved] Ogg Vorbis crash  (Read 6389 times)

Offline JSiegrist

  • Newbie
  • *
  • Posts: 4
[Solved] Ogg Vorbis crash
« on: July 03, 2009, 04:29:34 am »
Hello,

My system seems to be having some sort of sound error.  In the economic and military tutorials, after a certain amount of time passed (and it may have been the quantity of ships I built in the level, I don't quite know yet), the game fataled to the desktop.  UnhandledErrors.txt is now populated with the following:

7/3/2009 12:38:33 AM
-----------------------------------CurrentDomain_UnhandledException-----------------------------------OggVorbisDecoder.OggVorbisException: There was an interruption in the data. (one of: garbage between pages, loss of sync followed by recapture, or a corrupt page)
   at OggVorbisDecoder.OggVorbisFileStream.Read(Byte[] buffer, Int32 offset, Int32 length)
   at AIWar.GameMusic.TransferBlockToSecondaryBuffer() in C:\vcprojs\AIWar\DX\GameMusic.cs:line 290
   at AIWar.GameMusic.DataTransferActivity() in C:\vcprojs\AIWar\DX\GameMusic.cs:line 226
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()
7/3/2009 1:03:04 AM
-----------------------------------CurrentDomain_UnhandledException-----------------------------------OggVorbisDecoder.OggVorbisException: There was an interruption in the data. (one of: garbage between pages, loss of sync followed by recapture, or a corrupt page)
   at OggVorbisDecoder.OggVorbisFileStream.Read(Byte[] buffer, Int32 offset, Int32 length)
   at AIWar.GameMusic.TransferBlockToSecondaryBuffer() in C:\vcprojs\AIWar\DX\GameMusic.cs:line 290
   at AIWar.GameMusic.DataTransferActivity() in C:\vcprojs\AIWar\DX\GameMusic.cs:line 226
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()

My system specs are the following:
  Intel Core2Quad @ 2.4Ghz
  Gigabyte GA-P35C-DS3R
  3GB DDR2
  NVidia GeForce 7950 GT with driver 6.14.11.8618
  Creative Labs X-Fi XtremeGamer Fatal1ty Pro with driver 6.0.1.1368

I just found out that Creative released a new driver about two weeks ago.  My next step will be to try and confirm the issue still occurs with the new driver in place.  If you have any follow on tests or if you want any other debugging info, either reply back or email me and I'll post a reply here.
« Last Edit: September 25, 2009, 09:44:06 am by Fiskbit »

Offline JSiegrist

  • Newbie
  • *
  • Posts: 4
Re: Ogg Vorbis crash
« Reply #1 on: July 03, 2009, 04:33:01 am »
I forgot to add that I'm running Windows XP 32-bit.

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: Ogg Vorbis crash
« Reply #2 on: July 03, 2009, 09:06:29 am »
Hi there, welcome to the forums!

Looking at this error, it is a very low-level error in the ogg vorbis dlls -- below the game code, and before DirectSound or SlimDX is involved, and actually even before the C# ogg vorbis wrapper.

So, I don't think that this could even be a sound card driver problem, since this is basically an error in decompressing part of an ogg file off the disk as part of the streaming for later playback.  I haven't actually seen this issue before, but it's the OV_HOLE error from ogg vorbis:  http://lists.xiph.org/pipermail/vorbis-dev/2001-February/003221.html

I don't know what is the root cause of that here, if some of your music files from the game are corrupt or if perhaps you have some sort of issues with your hard disk (you might want to run some form of disk check just to be safe, aside from anything to do with AI War).  From the sound of what you are talking about, it sounds like maybe some music files are working okay for you, but not all of them, or perhaps the streams are getting corrupted for unknown reasons after a certain amount of reading from them.

Looking at the link above from xiph.org, it seems that there's not much for me to do with AI War except ignore the error, which should let it avoid the crash but have a small skip in the audio.  If there is a lot of corruption with your music files or the streaming process, I imagine you'll hear a lot of that skipping.  I can't duplicate the problem, so I can't test that it works when there is in fact a skip, but here's a new version that should work for you:  http://www.arcengames.com/share/AIWar1009C.zip

You can apply this like any other prerelease.  Let me know how it goes, if you get a chance, and thanks for your support of the game!
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline JSiegrist

  • Newbie
  • *
  • Posts: 4
Re: Ogg Vorbis crash
« Reply #3 on: July 04, 2009, 01:30:08 am »
Hello,

Thank you for your quick response to my problem.  I went ahead and updated my Creative driver, which I know you said was not likely to be part of the problem.  Also, based on your advise, I went ahead and reinstalled AI War on my machine. (I did not apply your new patch.)  Now, the game seems to be running fine with no more sound glitches.  It seems most likely that something was wrong with the sound files, and the reinstallation seems to have fixed it.

The only other potential problem is that in this reinstall, I applied patches 1.007 followed by 1.008 one at a time instead of letting the automated updater install them both at once. 

It might be beneficial to add in a utility that checksums all of the files in the application distribution and determines if there is any file corruption.

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: Ogg Vorbis crash
« Reply #4 on: July 04, 2009, 08:42:50 am »
Thank you for your quick response to my problem.  I went ahead and updated my Creative driver, which I know you said was not likely to be part of the problem.  Also, based on your advise, I went ahead and reinstalled AI War on my machine. (I did not apply your new patch.)  Now, the game seems to be running fine with no more sound glitches.  It seems most likely that something was wrong with the sound files, and the reinstallation seems to have fixed it.

You bet!  I'm glad that worked for you.  The new version should be robust enough to handle corrupted files, but in this case just fixing the corrupted files fixed the underlying problem, which is great.

The only other potential problem is that in this reinstall, I applied patches 1.007 followed by 1.008 one at a time instead of letting the automated updater install them both at once.

The patching system updates only whole files (not file diffs) in order to avoid this sort of corruption, so I doubt that was it.  You might consider checking your hard disk for bad sectors (not for the sake of AI War, but rather just in case), or scanning for malware.  It's always possible something went wrong in the MSI patching process -- you never know with Microsoft -- but this is the first I've heard of that, so my inclination is to look elsewhere.

It might be beneficial to add in a utility that checksums all of the files in the application distribution and determines if there is any file corruption.

I've added that one to my "maybe" list.  If this becomes a larger, more ongoing problem, then I'll probably do something like that.  Right now, this is the first case out of ten thousand, or something along those lines anyway.

Thanks for your support of AI War!
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline Admiral

  • Hero Member
  • *****
  • Posts: 547
Re: Ogg Vorbis crash
« Reply #5 on: July 05, 2009, 11:10:58 am »
The patching system updates only whole files (not file diffs) in order to avoid this sort of corruption, so I doubt that was it.

I like installing patches from the Zip file best, personally. X puts out an AIWar1000to1008.zip for every release (at least, for recent releases) that I prefer to use.

I also use the Mac "combo" updater which updates every file changed since Mac OS X 10.X.0, without deltas.

Life is good; so far every patching problem I have has been due to bugs that X has put in just to see if I'm paying attention... :)

Cheers!