Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: My poor Sonic runs out of memory - though phisically there is a lot of it  (Read 2201 times)

0 Members and 1 Guest are viewing this topic.

Tigre Pablito

  • Full Member
  • ***
  • Posts: 226
    • View Profile
    • Email
Hello Ladies and Guys from SFML

i m developing my own Sonic game, and my poor hedgehog runs out of memory ... my PC has 2 GB RAM, and my application uses at most 150 MB ... here you can see the program, and how it crashes at Zone 3 Act 1 or 2

https://www.dropbox.com/s/9ikj1kbm53oqpp3/Sonic%20the%20Hedgehog%20by%20Pablito.rar

Really i don t know if this has to do with SFML, or just with C# ... or perhaps with both

However it is, i would apreciate your help very much - if possible - ; otherwise, thanks the same, and sorry if this topic does nt concern to SFML

Respecting to the code that is always requested when posting, i don t know what files, classes, or methods to paste here, because (i understand) the program is an integrated system, then the error could be at any place, note that it is a runtime error, those are the most difficult to detect

i would have no problem to send or upload the entire code, or just the files (3 or 4) where it would be more probable the error is

Actually, the OutOfMemoryException is thrown ALWAYS by the Image() constructor at loading Zone3Act1.jpg, from where I suposse it could be a circumstance of the (SFML) Image class ... i mean, the Exception could have been thrown while assigning:

attribs = new byte[XLIM, YLIM];   // XLIM = 20000, YLIM = 2000

that occurs just before attempting to load the Image

The Images (2) fore and background, are loaded and splitted (as Laurent taught me) into 1000x1000 Texture[,] (local) and them, placed into (class members) Sprite[,] sprite, bksprite

If i should explain myself better, please let me know

Thanks for advance

Pablo

Ixrec

  • Hero Member
  • *****
  • Posts: 1241
    • View Profile
    • Email
Re: My poor Sonic runs out of memory - though phisically there is a lot of it
« Reply #1 on: September 10, 2013, 08:06:42 am »
I definitely don't know enough about C# and memory to answer the question directly, but in case it helps to have an error report from a second source, here's what I get when I run his program:

Quote
Description:
  Stopped working

Files that help describe the problem:
  C:\Users\Ixrec\AppData\Local\Temp\WERD36E.tmp.WERInternalMetadata.xml
  C:\Users\Ixrec\AppData\Local\Temp\WER14E1.tmp.mdmp

The two files it mentions are attached. Forums won't let me attach the crash dump directly (it's too big), so here's a mediafire link to it:
http://www.mediafire.com/download/4bc7d152b4nr7nn/WER5BDF.tmp.mdmp
« Last Edit: September 10, 2013, 08:08:20 am by Ixrec »

Tigre Pablito

  • Full Member
  • ***
  • Posts: 226
    • View Profile
    • Email
Re: My poor Sonic runs out of memory - though phisically there is a lot of it
« Reply #2 on: September 12, 2013, 04:54:18 am »
Thank you, Ixrec ... I ll try to see the file you attached
It has already occured to me the error you mention, at another person s PC, i mean, the same error text 
This is very sophisticated ... Why on some PCs SFML apps work fine and on another ones they don t?
If i remember OK that person s system was Win 8 64 bit ... Could you tell me what is your system?
And may i ask to those Guys and Ladies who may know, what do I have to do to let my SFML apps run on all systems?
And please, if someone knows how to fix the memory issue ... perhaps some C#/SFML expert, I will thank very much ...
Could it be a "memory model" C# problem? Or a SFML.Graphics.Image Class problem? perhaps a phisical error on the image file?
Thank you
 

Ixrec

  • Hero Member
  • *****
  • Posts: 1241
    • View Profile
    • Email
Re: My poor Sonic runs out of memory - though phisically there is a lot of it
« Reply #3 on: September 12, 2013, 06:42:25 am »
I'm using Windows 7 Professional 64-bit.

 

anything