mediaplayer crash in Windows 2000

Please support our VB.NET advertiser: $4.95 a Month - ASP.NET Web Hosting – Click Here!
Reply

Join Date: May 2006
Posts: 4
Reputation: crim1969 is an unknown quantity at this point 
Solved Threads: 0
crim1969 crim1969 is offline Offline
Newbie Poster

mediaplayer crash in Windows 2000

 
0
  #1
Apr 21st, 2007
I wrote a VB6 application for automatic or manual playing of mp3 files from a play list. This application can run forever in Windows 98, but crashes after around 128 songs in Windows 2000. I decided to replicate the basic routine that causes the crash in VB2005 on my Windows 2000 machine. Sure enough, it does the same thing. Using axmediaplayer, I load a song for playing. When played, a timer is enabled which repeatly loads and plays the same song at approximately 1 second intervals. I did this so I can quickly get to the 128 song limit which causes the crash. Here is the Timer routine:
  1.  
  2. Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
  3. AxMediaPlayer1.Stop()
  4. AxMediaPlayer1.FileName = OpenFileDialog1.FileName
  5. AxMediaPlayer1.Play()
  6. lblTimesPlayed.Text = lblTimesPlayed.Text + 1
  7. End Sub
At song 128 I get an "AccessViolationException was unhandled. Attempted to read or write protected memory. This is often an indication that other memory is corrupt." I figure this has something to do with an overflow, but cannot figure out what the media player is counting or why, nor can I find out how to clear it. I have found numerous references to this error in similar code (crashes after periodic accesses) but no answers. If anyone has found a work-around, please let me know!
Thanks in advance,
Crim1969
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 5,264
Reputation: iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold 
Solved Threads: 376
Featured Poster
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Posting Expert

Re: mediaplayer crash in Windows 2000

 
0
  #2
Apr 21st, 2007
does the same thing happen on winxp? or vista?
*Voted best profile in the world*
Reply With Quote Quick reply to this message  
Join Date: May 2006
Posts: 4
Reputation: crim1969 is an unknown quantity at this point 
Solved Threads: 0
crim1969 crim1969 is offline Offline
Newbie Poster

Re: mediaplayer crash in Windows 2000

 
0
  #3
Apr 23rd, 2007
I do not know how this behaves in XP or Vista. I will have to borrow an XP machine to test it; I do not know anyone who has Vista yet. I noticed that as each song is loaded, the number of handles increase in the Processes Window.
Reply With Quote Quick reply to this message  
Join Date: May 2006
Posts: 4
Reputation: crim1969 is an unknown quantity at this point 
Solved Threads: 0
crim1969 crim1969 is offline Offline
Newbie Poster

Re: mediaplayer crash in Windows 2000

 
0
  #4
Dec 13th, 2007
Update: I finally got a chance to try this routine in XP. Runs flawlessly. This strengthens my theory that this is a Win 2000 bug. I would think this would be a common snag with a work-around out there somewhere.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the VB.NET Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC