|
-
May 24th, 2013, 01:24 AM
#1
Thread Starter
New Member
Visual Basic 2010: System.OutOfMemory error? How do I resolve this?
I get this error System.OutOfMemory
What's the solution?
I have about 10 forms in one project, And I just attached one song using the resource method, then memories done?
Should I add more memory? How do I add more?
Thanks in Advance
-
May 24th, 2013, 02:57 AM
#2
Re: Visual Basic 2010: System.OutOfMemory error? How do I resolve this?
How big is your music file? How are you using it?
-
May 24th, 2013, 08:50 AM
#3
Re: Visual Basic 2010: System.OutOfMemory error? How do I resolve this?
Also, when and where are you getting the Exception?
-
May 24th, 2013, 12:59 PM
#4
Re: Visual Basic 2010: System.OutOfMemory error? How do I resolve this?
Another important question is how are you playing the audio? Are you using My.Computer.Audio.Play, XNA, DirectX, etc.? I would also suggest reading an article by TechGnome, here.
-
May 24th, 2013, 11:55 PM
#5
Thread Starter
New Member
Re: Visual Basic 2010: System.OutOfMemory error? How do I resolve this?
When it was in .mp3 format it was about 7MB, but when I converted to .wav it became about 30+MB, I felt that was something awkward..
I'm using it in the .wav format, and putting it in resources and using the My.Computer.Audio.Play method...
-
May 24th, 2013, 11:58 PM
#6
Thread Starter
New Member
Re: Visual Basic 2010: System.OutOfMemory error? How do I resolve this?
I'm getting the Exception when I Debug the program and Run it...
Also, when I "build" it "fails"
-
May 25th, 2013, 12:03 AM
#7
Thread Starter
New Member
Re: Visual Basic 2010: System.OutOfMemory error? How do I resolve this?
jmcilhinney: The files about 5MB when in the .MP3 format, but when I convert using a tool, it's about 36MB, That's awkward...
I'm Using it in .wav format. Using the resource method, My.Computer.Audio.Play
formlesstree4: I'm getting the Exception when I click "Start" the program and Run it...
Also, when I "build" it "fails"
dday9: Sorry for the less info, and Yes, I'm using the My.computer.Audio.Play(My.Resources."Mysong", AudioPlayModeBackground)
-
May 25th, 2013, 09:25 AM
#8
Re: Visual Basic 2010: System.OutOfMemory error? How do I resolve this?
My.computer.Audio.Play(My.Resources."Mysong", AudioPlayModeBackground)
Lose the quotation marks!
As the 6-dimensional mathematics professor said to the brain surgeon, "It ain't Rocket Science!"
Reviews: "dunfiddlin likes his DataTables" - jmcilhinney
Please be aware that whilst I will read private messages (one day!) I am unlikely to reply to anything that does not contain offers of cash, fame or marriage!
-
May 25th, 2013, 10:17 AM
#9
Thread Starter
New Member
Re: Visual Basic 2010: System.OutOfMemory error? How do I resolve this?
 Originally Posted by dunfiddlin
Lose the quotation marks!
Yeah, I know that, I just put it so that you wouldn't get confused!
-
May 25th, 2013, 12:33 PM
#10
Re: Visual Basic 2010: System.OutOfMemory error? How do I resolve this?
How does it behave if you delete your present wav file from resources and use a different one -- preferably a wav file you are certain will play? The reason I ask is that OutOfMemory exceptions sometimes occur when a file is not in the expected format -- nothing to do with system memory.
BB
-
May 25th, 2013, 12:46 PM
#11
Thread Starter
New Member
Re: Visual Basic 2010: System.OutOfMemory error? How do I resolve this?
 Originally Posted by boops boops
How does it behave if you delete your present wav file from resources and use a different one -- preferably a wav file you are certain will play? The reason I ask is that OutOfMemory exceptions sometimes occur when a file is not in the expected format -- nothing to do with system memory.
BB
If I delete the present wav file, then it's like all the changes I make for E.g adding buttons, adding new forms, adding pictures etc. will not happen, It will be the same way, I saved with the wav file , It;s like the Design Time Changes don't happen during Run time....
These wav files are like 35MB+
Any way which you can add mp3 file as a resource?
That way it would have been better, but don't think it's possible? :/
-
May 25th, 2013, 04:17 PM
#12
Re: Visual Basic 2010: System.OutOfMemory error? How do I resolve this?
 Originally Posted by Amith7798
If I delete the present wav file, then it's like all the changes I make for E.g adding buttons, adding new forms, adding pictures etc. will not happen, It will be the same way, I saved with the wav file , It;s like the Design Time Changes don't happen during Run time....
These wav files are like 35MB+
Actually you don't need to delete the 35MB wav file, just add a new wav file to resources. Take some wav file that is obviously ok, like ding.wav from the system files. In your code, change the name of the resource to My.Resources.Ding (or whatever) and see if it works. If it does, there is nothing wrong with your code but something wrong with the original file.
Any way which you can add mp3 file as a resource?
That way it would have been better, but don't think it's possible? :/
As far as I know an mp3 file has to be on disk so you can play with Windows Media Player, bass.dll etc. But someone else may know better.
BB
-
May 25th, 2013, 05:18 PM
#13
Re: Visual Basic 2010: System.OutOfMemory error? How do I resolve this?
#Off VB topic#
Care to send over the mp3 7mb?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|