#22 Out of memory! (2gb not enough?)

v0.7.x
open
CJP
5
2008-06-09
2008-05-11
No

I'm running FreeBSD 6-STABLE and I've just installed ultimatestunts (from ports).
My PC has 2GB RAM but when I start ustunts I get an "Out of memory!" message.
If you want I can provide the output of ktrace (it's about 60mb, 11mb compressed).

This is the complete message:

$ ustunts
Welcome to ultimatestunts version 0.7.4
Using configuration file /home/ale/.ultimatestunts/ultimatestunts.conf
DataDir is "/usr/local/share/ultimatestunts/"
SaveDir is "/home/ale/.ultimatestunts/saveddata/"
Enabling localisation
Locale LC_MESSAGES is set to "en_US.ISO8859-1"
Package ultimatestunts, directory /usr/local/share/ultimatestunts/lang
bindtextdomain returns /usr/local/share/ultimatestunts/lang
bind_textdomain_codeset returns ISO-8859-1
textdomain returns ultimatestunts
---Window system
Display variable: "window:800x600"
Setting resolution to 800x600:24...
...Now working at 800x600:32
Found 0 joysticks
Display variable: "window:800x600"
...Now working at 800x600:32
---GUI
Loading font from misc/iso8859-1.rgba
Loading file misc/iso8859-1.rgba
sizex = "512"
sizey = "512"
smooth = "true"
wth = "10.000000"
hth = "20.000000"
Loading file misc/menubackground.rgb
sizex = "4096"
sizey = "4096"
---Sound system
fcntl: Device not configured
Loading file music/pronobozo-ReInvent.ogg
---World data
---World data
---Renderer
Loading lensflare distance 1.000 size 0.200 file environment/lensflare/lensflare0.jpg
Loading file environment/lensflare/lensflare0.jpg
Out of memory!

Discussion

  • Anonymous - 2008-05-11
    • priority: 5 --> 9
     
  • Anonymous - 2008-05-11
    • priority: 9 --> 5
     
  • CJP

    CJP - 2008-06-09

    Logged In: YES
    user_id=595430
    Originator: NO

    No, of course it is not supposed to be out of memory on a machine like that. I develop Ultimate Stunts on a 256MB machine!

    I've never seen this line before:
    fcntl: Device not configured

    Maybe the problem is related to the sound subsystem? In that case, ustuntstrackedit should still work, as it does not use sound, and isn't even linked to the sound libraries (either OpenAL or FMOD).

    As for the trace: you can try to attach the file to this tracker item, or otherwise you can place it online somewhere and post its URL here.

     
  • CJP

    CJP - 2008-06-09
    • assigned_to: nobody --> cornware-cjp
     
  • Nobody/Anonymous

    I have same problem. Output of ustunts:

    ..................
    ---GUI
    Loading font from misc/iso8859-1.rgba
    Loading file misc/iso8859-1.rgba
    sizex = "512"
    sizey = "512"
    smooth = "true"
    wth = "10.000000"
    hth = "20.000000"
    Loading file misc/menubackground.rgb
    sizex = "4096"
    sizey = "4096"
    ---Sound system
    Loading file music/pronobozo-ReInvent.ogg
    An OpenAL error occurred before loading music/pronobozo-ReInvent.ogg:
    Invalid Value
    ---World data
    ---World data
    ---Renderer
    Loading lensflare distance 1.000 size 0.200 file environment/lensflare/lensflare0.jpg
    Loading file environment/lensflare/lensflare0.jpg
    Out of memory!

     
  • CJP

    CJP - 2011-01-11

    2GB should be more than enough, assuming of course that the rest of your system doesn't eat 1.99 GB ;)

    'Out of memory!' probably is a response to a failed request for memory ('malloc'). This can be caused by a lack of memory, but it is possible that there is another cause, e.g. if the memory management of the application somehow becomes confused.

    I've searched for the literal text 'Out of memory!' in the Ultimate Stunts source code, and interestingly, it only appears in code that is related to .rgb image files. Your crash occurs while loading a .jpg image file. This made me think: maybe your Ultimate Stunts somehow uses the .rgb image loader for loading .jpg files. Of course that goes wrong, because .jpg files have a different format than .rgb files (though crashing like this is a bit rude).

    I can also imagine how this situation occurred: Ultimate Stunts can be compiled with or without the SDL_Image library. If compiled with SDL_Image, it will use SDL_Image for all image loading operations. Without SDL_Image, it will use its internal .rgb loading functions for loading images, so in that case it only really supports the .rgb file format(*).

    I think your ports version of Ultimate Stunts is guilty of the problem: it should either have SDL_Image as a dependency, or it should patch the data files of Ultimate Stunts in such a way that all image files are converted to the .rgb format. Ports packages contain source code, don't they? I think you can solve the problem for yourself by first installing SDL_Image, and then re-compiling Ultimate Stunts (including the ./configure step, which allows Ultimate Stunts to detect the presence of SDL_Image).

    (*) the .rgba format, with a transparency layer, is also supported.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks