views:

51

answers:

1

I have a VB.NET application that crashes on a client's computer with a BSOD error... KERNEL_DATA_INPAGE_ERROR.

This error occurs at a point where my program does two things:

  • Locks the computer
  • Plays a sound in BackgroundLoop mode

For locking the work station, I am just using this:

<DllImport("user32")> _
Public Shared Sub LockWorkStation()
End Sub

For playing the sound, I am doing this:

My.Computer.Audio.Play(My.Resources.ResourceManager.GetStream("somesound"), AudioPlayMode.BackgroundLoop)

Now, this sound loops until the user logs back in. My software detects the session state switch and stops playing the sound. Sometimes when I log back in, the sound card plays garbage data for a split second, instead of the rest of the audio buffer. I get the impression that this has something to do with session switching.

Could my client be having an issue where there is memory corruption occurring at the point of locking the computer?

I apologize for the vagueness of this post... I am not sure where to begin as I cannot reproduce the problem myself.

Edit: If the sound is left to play on its own, even without locking the computer, eventually the computer will lock up and then bluescreen. Playing the sound while locking at the same causes it to happen sooner.

Edit #2: So I've seen it fail now. The sound loop starts playing correctly but quickly switches to looping of garbage data. It's as if it is just reading a random location in memory and looping that. Very strange behavior!

Solved!: It was hardware all along afterall. Apparently this particular model of laptop has a problem where the speaker is installed right on top of the hard drive. When playing sounds loudly, it creates all sorts of problems.

+4  A: 

A blue screen is almost certainly related to defective hardware or drivers. Softwarewise, there's really not much you can do about this apart from putting together a workaround.

You can perform a memory dump and try to determine what specifically went wrong, or with some clever debugging see where it bombs out in order to try to avoid it.

Otherwise, you're probably talking about doing some maintenance work on the machine in question.

Paul Lammertsma
That's what I've always said, but sadly, my software is the only thing crashing this machine. The other problem is... I've tried all of these functions separately in another program, and it doesn't crash. This lead me to believe bad RAM, but it is like clockwork on this program. I do thank you for your suggestions! You have confirmed what I've been thinking.
Brad
Wow. Weird. Now I'm beginning to hesitate. I can't imagine that bad RAM would cause it to die each and every time. To me, it seems like a driver problem, but I'm not familiar with BSOD codes. Nevertheless, [Technet states](http://technet.microsoft.com/en-us/library/cc957628.aspx): "This Stop message is usually caused by a bad block (sector) in a paging file, a virus, a disk controller error, or failing RAM."
Paul Lammertsma