Closed jjxtra closed 11 years ago
What version of MonoGame are you using? Are you using it from the installer? Or from the 'develop' github branch? Or from the 'develop3d' branch?
Codeplex download of latest version
On Jun 24, 2012, at 1:27 PM, Tom Spilmanreply@reply.github.com wrote:
What version of MonoGame are you using? Are you using it from the installer? Or from the 'develop' github branch? Or from the 'develop3d' branch?
Reply to this email directly or view it on GitHub: https://github.com/mono/MonoGame/issues/552#issuecomment-6535661
So I assume this is 2.5.1 then.
Can you post a stack trace of the exception?
I have a fairly simple project that has a myriad of problems that actually almost used to work about 6 months ago. It is called Math Asteroids and I am happy to send you the whole project if it will help the team fix more issues.
Anyway, here is my audio stack trace along with attached xnb file:
Unhandled Exception: System.DivideByZeroException: Division by zero
at Microsoft.Xna.Framework.Audio.SoundEffect.HandlePacketDecoded
(System.Object sender, MonoTouch.AudioToolbox.PacketReceivedEventArgs e)
[0x000e4] in
/Users/jjxtra/Projects/MonoTest/Games/MonoGame/MonoGame.Framework/MacOS/Audio/SoundEffect.cs:200
at MonoTouch.AudioToolbox.AudioFileStream.OnPacketDecoded (Int32
numberOfBytes, IntPtr inputData,
MonoTouch.AudioToolbox.AudioStreamPacketDescription[] packetDescriptions)
[0x0000d] in
/Developer/MonoTouch/Source/monotouch/src/shared/AudioToolbox/AudioFileStream.cs:191
at MonoTouch.AudioToolbox.AudioFileStream.InPackets (IntPtr clientData,
Int32 numberBytes, Int32 numberPackets, IntPtr inputData, IntPtr
packetDescriptions) [0x0001d] in
/Developer/MonoTouch/Source/monotouch/src/shared/AudioToolbox/AudioFileStream.cs:183
at (wrapper native-to-managed)
MonoTouch.AudioToolbox.AudioFileStream:InPackets
(intptr,int,int,intptr,intptr)
at (wrapper managed-to-native)
MonoTouch.AudioToolbox.AudioFileStream:AudioFileStreamParseBytes
(intptr,int,intptr,uint)
at MonoTouch.AudioToolbox.AudioFileStream.ParseBytes (System.Byte[]
bytes, Boolean discontinuity) [0x00019] in
/Developer/MonoTouch/Source/monotouch/src/shared/AudioToolbox/AudioFileStream.cs:244
at Microsoft.Xna.Framework.Audio.SoundEffect.LoadAudioStream
(System.Byte[] audiodata) [0x0002d] in
/Users/jjxtra/Projects/MonoTest/Games/MonoGame/MonoGame.Framework/MacOS/Audio/SoundEffect.cs:158
at Microsoft.Xna.Framework.Audio.SoundEffect..ctor (System.String name,
System.Byte[] data) [0x0004a] in
/Users/jjxtra/Projects/MonoTest/Games/MonoGame/MonoGame.Framework/MacOS/Audio/SoundEffect.cs:112
at Microsoft.Xna.Framework.Content.SoundEffectReader.Read
(Microsoft.Xna.Framework.Content.ContentReader input,
Microsoft.Xna.Framework.Audio.SoundEffect existingInstance) [0x000f7] in
/Users/jjxtra/Projects/MonoTest/Games/MonoGame/MonoGame.Framework/Content/ContentReaders/SoundEffectReader.cs:140
at
Microsoft.Xna.Framework.Content.ContentTypeReader1[Microsoft.Xna.Framework.Audio.SoundEffect].Read (Microsoft.Xna.Framework.Content.ContentReader input, System.Object existingInstance) [0x00006] in /Users/jjxtra/Projects/MonoTest/Games/MonoGame/MonoGame.Framework/Content/ContentTypeReader.cs:179 at Microsoft.Xna.Framework.Content.ContentReader.ReadObject[SoundEffect] (Microsoft.Xna.Framework.Content.ContentTypeReader typeReader) [0x00000] in /Users/jjxtra/Projects/MonoTest/Games/MonoGame/MonoGame.Framework/Content/ContentReader.cs:232 at Microsoft.Xna.Framework.Content.ContentReader.ReadAsset[SoundEffect] () [0x0007e] in /Users/jjxtra/Projects/MonoTest/Games/MonoGame/MonoGame.Framework/Content/ContentReader.cs:112 at Microsoft.Xna.Framework.Content.ContentManager.ReadAsset[SoundEffect] (System.String assetName, System.Action
1 recordDisposableObject) [0x00545]
in
/Users/jjxtra/Projects/MonoTest/Games/MonoGame/MonoGame.Framework/Content/ContentManager.cs:449
at Microsoft.Xna.Framework.Content.ContentManager.Load[SoundEffect](System.String assetName) [0x0005d] in
/Users/jjxtra/Projects/MonoTest/Games/MonoGame/MonoGame.Framework/Content/ContentManager.cs:177
at XnaGameLibrary.ThreadSafeContentManager.Load[SoundEffect](System.String assetName) [0x0008d] in
/Users/jjxtra/Projects/MonoTest/Games/XnaGameLibrary/ThreadSafeContentManager.cs:113
at MathAsteroids.Content.MathAsteroidsContent..ctor
(MathAsteroids.MathAsteroidsGame game,
Microsoft.Xna.Framework.Content.ContentManager content,
Microsoft.Xna.Framework.Content.ContentManager mediaContent,
IGraphicsDeviceService graphics) [0x00132] in
/Users/jjxtra/Projects/MonoTest/Games/MathAsteroids/Content/MathAsteroidsContent.cs:100
at MathAsteroids.Scenes.Loading.LoadingScene.ContentThread () [0x00021]
in
/Users/jjxtra/Projects/MonoTest/Games/MathAsteroids/Scenes/Loading/LoadingScene.cs:39
at System.Threading.Thread.StartInternal () [0x0001d] in
/Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Threading/Thread.cs:696
[ERROR] FATAL UNHANDLED EXCEPTION: System.DivideByZeroException: Division
by zero
at Microsoft.Xna.Framework.Audio.SoundEffect.HandlePacketDecoded
(System.Object sender, MonoTouch.AudioToolbox.PacketReceivedEventArgs e)
[0x000e4] in
/Users/jjxtra/Projects/MonoTest/Games/MonoGame/MonoGame.Framework/MacOS/Audio/SoundEffect.cs:200
at MonoTouch.AudioToolbox.AudioFileStream.OnPacketDecoded (Int32
numberOfBytes, IntPtr inputData,
MonoTouch.AudioToolbox.AudioStreamPacketDescription[] packetDescriptions)
[0x0000d] in
/Developer/MonoTouch/Source/monotouch/src/shared/AudioToolbox/AudioFileStream.cs:191
at MonoTouch.AudioToolbox.AudioFileStream.InPackets (IntPtr clientData,
Int32 numberBytes, Int32 numberPackets, IntPtr inputData, IntPtr
packetDescriptions) [0x0001d] in
/Developer/MonoTouch/Source/monotouch/src/shared/AudioToolbox/AudioFileStream.cs:183
at (wrapper native-to-managed)
MonoTouch.AudioToolbox.AudioFileStream:InPackets
(intptr,int,int,intptr,intptr)
at (wrapper managed-to-native)
MonoTouch.AudioToolbox.AudioFileStream:AudioFileStreamParseBytes
(intptr,int,intptr,uint)
at MonoTouch.AudioToolbox.AudioFileStream.ParseBytes (System.Byte[]
bytes, Boolean discontinuity) [0x00019] in
/Developer/MonoTouch/Source/monotouch/src/shared/AudioToolbox/AudioFileStream.cs:244
at Microsoft.Xna.Framework.Audio.SoundEffect.LoadAudioStream
(System.Byte[] audiodata) [0x0002d] in
/Users/jjxtra/Projects/MonoTest/Games/MonoGame/MonoGame.Framework/MacOS/Audio/SoundEffect.cs:158
at Microsoft.Xna.Framework.Audio.SoundEffect..ctor (System.String name,
System.Byte[] data) [0x0004a] in
/Users/jjxtra/Projects/MonoTest/Games/MonoGame/MonoGame.Framework/MacOS/Audio/SoundEffect.cs:112
at Microsoft.Xna.Framework.Content.SoundEffectReader.Read
(Microsoft.Xna.Framework.Content.ContentReader input,
Microsoft.Xna.Framework.Audio.SoundEffect existingInstance) [0x000f7] in
/Users/jjxtra/Projects/MonoTest/Games/MonoGame/MonoGame.Framework/Content/ContentReaders/SoundEffectReader.cs:140
at
Microsoft.Xna.Framework.Content.ContentTypeReader1[Microsoft.Xna.Framework.Audio.SoundEffect].Read (Microsoft.Xna.Framework.Content.ContentReader input, System.Object existingInstance) [0x00006] in /Users/jjxtra/Projects/MonoTest/Games/MonoGame/MonoGame.Framework/Content/ContentTypeReader.cs:179 at Microsoft.Xna.Framework.Content.ContentReader.ReadObject[SoundEffect] (Microsoft.Xna.Framework.Content.ContentTypeReader typeReader) [0x00000] in /Users/jjxtra/Projects/MonoTest/Games/MonoGame/MonoGame.Framework/Content/ContentReader.cs:232 at Microsoft.Xna.Framework.Content.ContentReader.ReadAsset[SoundEffect] () [0x0007e] in /Users/jjxtra/Projects/MonoTest/Games/MonoGame/MonoGame.Framework/Content/ContentReader.cs:112 at Microsoft.Xna.Framework.Content.ContentManager.ReadAsset[SoundEffect] (System.String assetName, System.Action
1 recordDisposableObject) [0x00545]
in
/Users/jjxtra/Projects/MonoTest/Games/MonoGame/MonoGame.Framework/Content/ContentManager.cs:449
at Microsoft.Xna.Framework.Content.ContentManager.Load[SoundEffect](System.String assetName) [0x0005d] in
/Users/jjxtra/Projects/MonoTest/Games/MonoGame/MonoGame.Framework/Content/ContentManager.cs:177
at XnaGameLibrary.ThreadSafeContentManager.Load[SoundEffect](System.String assetName) [0x0008d] in
/Users/jjxtra/Projects/MonoTest/Games/XnaGameLibrary/ThreadSafeContentManager.cs:113
at MathAsteroids.Content.MathAsteroidsContent..ctor
(MathAsteroids.MathAsteroidsGame game,
Microsoft.Xna.Framework.Content.ContentManager content,
Microsoft.Xna.Framework.Content.ContentManager mediaContent,
IGraphicsDeviceService graphics) [0x00132] in
/Users/jjxtra/Projects/MonoTest/Games/MathAsteroids/Content/MathAsteroidsContent.cs:100
at MathAsteroids.Scenes.Loading.LoadingScene.ContentThread () [0x00021]
in
/Users/jjxtra/Projects/MonoTest/Games/MathAsteroids/Scenes/Loading/LoadingScene.cs:39
at System.Threading.Thread.StartInternal () [0x0001d] in
/Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Threading/Thread.cs:696
-- Jeff
On Sun, Jun 24, 2012 at 3:58 PM, Tom Spilman < reply@reply.github.com
wrote:
So I assume this is 2.5.1 then.
Can you post a stack trace of the exception?
Reply to this email directly or view it on GitHub: https://github.com/mono/MonoGame/issues/552#issuecomment-6536744
Hmmm not sure how to attach files to issues. Do you need my xnb file?
I think what I see there should be enough for a fix in 2.5.2.
Great. Do you still want my project? It does expose a number of other problems...
This issue is still open on latest develop3d branch but Its not really a code issue but a compression one. If on the XNA project you choose a compression quality different from BEST you'll still get a Division By Zero on iOS device. Interestingly enough, you won't get the issue on the iPhone emulator (most of the times).
Going to close this... i believe it is solved by the content fixes in MonoGame 3.0 in the develop3d branch.
I am unable to load xnb files using SoundEffect on iOS simulator (not sure on device, I don't have a license for mono-touch). I get a divide by zero exception.