djkhz / monoxna

Automatically exported from code.google.com/p/monoxna
Other
0 stars 0 forks source link

Texture loading errors #29

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Testure loading do not work correctly.

First problem I encounted was Index out of range exception in
ContentManager.Load<T>(...) in line:
T asset = contentReader.ReadObject<T>(assetReaders[index-1]);
index variable value was 0
I changed it to:
T asset = contentReader.ReadObject<T>(assetReaders[0]);
as assetReader has only one element when loading my .xnb files

Now i have following exception:

Unhandled Exception: System.OverflowException: Number overflow.
  at (wrapper managed-to-native)
System.Object:__icall_wrapper_mono_array_new_specific (intptr,int)
  at Microsoft.Xna.Framework.Graphics.Texture2D.FromFile
(Microsoft.Xna.Framework.Graphics.GraphicsDevice graphicsDevice,
System.IO.Stream textureStream, Int32 numberBytes,
TextureCreationParameters creationParameters) [0x00000] 
  at Microsoft.Xna.Framework.Content.Texture2DReader.Read
(Microsoft.Xna.Framework.Content.ContentReader input,
Microsoft.Xna.Framework.Graphics.Texture2D existingInstance) [0x00000] 
  at
Microsoft.Xna.Framework.Content.ContentTypeReader`1[Microsoft.Xna.Framework.Grap
hics.Texture2D].Read
(Microsoft.Xna.Framework.Content.ContentReader input, System.Object
existingInstance) [0x00000] 
  at Microsoft.Xna.Framework.Content.ContentReader.ReadObject[Texture2D]
(Microsoft.Xna.Framework.Content.ContentTypeReader typeReader) [0x00000] 
  at Microsoft.Xna.Framework.Content.ContentManager.Load[Texture2D]
(System.String assetName) [0x00000] 

My .xnb files were generated by XNA Game Studio 3.0.
I use Ubuntu 9.04 amd64.

I have added following Tao.Sdl.dll.config:

<configuration>
    <dllmap dll="SDL.dll" target="libSDL-1.2.so.0" />
    <dllmap dll="SDL_image.dll" target="libSDL_image-1.2.so.0">
</configuration>

But I'm not sure if it's correct.

Original issue reported on code.google.com by w.kowa...@gmail.com on 3 May 2009 at 9:04

GoogleCodeExporter commented 9 years ago
The current status of Mono.Xna is unknown. So it is possible that you are doing
everything "correct". I'll try to replicate your error, but it would help if you
could send me the program you are trying to run. Is it possible to attach it 
here?

Original comment by lav...@gmail.com on 5 May 2009 at 1:54

GoogleCodeExporter commented 9 years ago
I will post some code soon. I did some more research on this, and it seem this 
error
is specific to texture file I have used. With other files I get different error.

Original comment by w.kowa...@gmail.com on 7 May 2009 at 1:19

GoogleCodeExporter commented 9 years ago
Here is example code.
It loads 2 textures: fieldbg and blue. First one cause error (Number Overflow) 
other
dosn't.

To run it in monoxna I had to path one thing: add constructor to 
GraphicDevice.cs
which dosn't take CreateOptions parameter.

Original comment by w.kowa...@gmail.com on 9 May 2009 at 4:15

Attachments:

GoogleCodeExporter commented 9 years ago
Thank you for reporting this Bug. I will look into it and fix it as fast as I 
can.

Original comment by timpam...@gmail.com on 12 Jul 2009 at 4:16

GoogleCodeExporter commented 9 years ago
Great. Let me know if you need any additional informations.

Original comment by w.kowa...@gmail.com on 17 Jul 2009 at 4:48

GoogleCodeExporter commented 9 years ago
The indexOutofRange Error is already solved.
But there is still a bug left.

Original comment by timpam...@gmail.com on 17 Jul 2009 at 5:14

GoogleCodeExporter commented 9 years ago
Fixed In SVN r154.

Original comment by timpam...@gmail.com on 18 Jul 2009 at 5:15

GoogleCodeExporter commented 9 years ago
Thanks.

Original comment by w.kowa...@gmail.com on 24 Jul 2009 at 4:16