RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Emulationstation crashed and Cannot allocate memory on pi4

    Scheduled Pinned Locked Moved Help and Support
    crashpi 4es crashed
    66 Posts 10 Posters 4.9k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • BuZzB
      BuZz administrators
      last edited by BuZz

      You can experiment with the cma configuration but my rpi4 is fine without any changes from default in ES.

      Also see

      https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=234348 (although we use fkms)

      256mb is the default btw.

      More info about your set up such as es settings info and config.txt might be useful.

      Changing the ES settings as mentioned by previous reply may help.

      To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

      quicksilverQ 1 Reply Last reply Reply Quote 0
      • quicksilverQ
        quicksilver @BuZz
        last edited by

        @BuZz Thanks for the reply. My current ES settings are: gameslist view is set to "video", I dont use videos but the theme Im using makes use of marquees so I have to set to video in order for them to display. I have tested multiple vram settings from 80mb-200mb and the crashing still occurs. I have tried turning screen saver off but crashing still occurs. Im currently using a customized version of the "nostalgia" theme but im going to switch back to carbon to see if the issue is related to the theme Im using. Config.txt is default settings except forcing 1080p mode.

        1 Reply Last reply Reply Quote 0
        • mituM
          mitu Global Moderator
          last edited by

          Can you post the dmesg output on pastebin.com ? Do you have anything configured on the start/stop runcommand scripts ?

          1 Reply Last reply Reply Quote 0
          • V
            VictimRLSH
            last edited by

            If you set the GPU mem too high, you'll never be able to boot that SD card again on a Pi 4 unless you reinstall an image OR boot the card on a Pi 3B and reset the GPU memory there. I did that to mine when I set it above 512mb.

            System Config: Retropie 4.4 with full desktop, RPi 3B, 256gb SD, 5v 2.1A 5,200 mAH USB battery. EasyMSX controller mounted with Pimoroni Hyperpixel 4 (non touch). Also running 4.6 on a 4gb Pi 4 serving as my primary desktop computer now.

            quicksilverQ 1 Reply Last reply Reply Quote 0
            • quicksilverQ
              quicksilver @VictimRLSH
              last edited by

              @VictimRLSH I don't have gpu mem set at all. Also, the boot partition is accessible from a Windows computer if you need to make edits to your config.txt.

              1 Reply Last reply Reply Quote 0
              • quicksilverQ
                quicksilver
                last edited by

                I cant seem to get it to reliably crash anymore. It has been stable all day though I havent changed anything. Will post a dmesg if it crashes again.

                1 Reply Last reply Reply Quote 0
                • quicksilverQ
                  quicksilver
                  last edited by

                  ES crashed again today (it has done it a few times since my last post but not reliably). It always seems to occur when ES is either loading or when Im launching a game. I was able to get the dmesg output this time.

                  https://pastebin.com/mZecJWQ4

                  1 Reply Last reply Reply Quote 0
                  • mituM
                    mitu Global Moderator
                    last edited by mitu

                    There's no driver errors in the dmesg, so it doesn't look like a kernel driver bug/error. Can you try reproducing with the stock theme or maybe uploading your modified theme somewhere so we can try and see if we get the error ?

                    EDIT: Are you using the 'normal' EmulationStation install or the emulationstation-dev package ?

                    quicksilverQ 1 Reply Last reply Reply Quote 0
                    • quicksilverQ
                      quicksilver @mitu
                      last edited by

                      @mitu I am using the standard/normal emulationstation install. I will switch to carbon for a bit and see what happens. I am using a modified version of the nostalgia theme https://github.com/supersquared/es-theme-nostalgic-neo

                      1 Reply Last reply Reply Quote 0
                      • R
                        rejesterd
                        last edited by rejesterd

                        @quicksilver Seems like it was crashing more often before you changed the vram settings and disabled the screen saver. If that's correct, I would start lowering the vram setting in ES again and see if it reproduces more consistently.

                        Also, have you run emulationstation with the --debug option? That might help clarify what's happening. But it might stop crashing if you just raise vram to 512m (which should be reasonable if you have the 4g model).

                        1 Reply Last reply Reply Quote 0
                        • quicksilverQ
                          quicksilver
                          last edited by quicksilver

                          So I'm thinking the crashing is related to the theme. I installed the same theme on my previously stable pi 3 now it is crashing occasionally. I don't know much about theming so I can't tell what is wrong here. Would someone be able to take a look at the link I posted above and see if anything glaring sticks out? I have also noticed that this theme takes much longer to boot up though I can't figure out why, all of the different art file sizes seem to be roughly the same size as other themes but other themes boot much faster.

                          1 Reply Last reply Reply Quote 0
                          • mituM
                            mitu Global Moderator
                            last edited by

                            I've installed the theme yesterday, after you posted the source, and briefly tested it, but didn't get any crash so far. I've left it active, trying to see if I get a crash.
                            To help debug this, you can run ES through a debugger and get a crash backtrace.

                            • install gdb with sudo apt install gdb
                            • exit EmulationStation and start a SSH session to your PI.
                            • run from the command line (via SSH)
                            gdb -q /opt/retropie/supplementary/emulationstation/emulationstation -ex run
                            

                            this should start ES from the debugger

                            • try and reproduce the crash. When it crashes, you should get a message in the gdb session that it did so. Run from gdb prompt
                            bt full
                            

                            then get the output and post it here.

                            • press q to exit the debugger.
                            quicksilverQ 1 Reply Last reply Reply Quote 0
                            • quicksilverQ
                              quicksilver @mitu
                              last edited by

                              @mitu
                              Here is the output:

                              
                              Thread 2 "emulationstatio" received signal SIGSEGV, Segmentation fault.
                              [Switching to Thread 0xb4e0b160 (LWP 27358)]
                              0x001b58dc in nsvg__initPaint(NSVGcachedPaint*, NSVGpaint*, float) [clone .isra.                                                                                                                     11] [clone .part.12] ()
                              (gdb) bt full
                              #0  0x001b58dc in nsvg__initPaint(NSVGcachedPaint*, NSVGpaint*, float) [clone .i                                                                                                                     sra.11] [clone .part.12] ()
                              No symbol table info available.
                              #1  0x001b58e8 in nsvg__initPaint(NSVGcachedPaint*, NSVGpaint*, float) [clone .i                                                                                                                     sra.11] [clone .part.12] ()
                              No symbol table info available.
                              #2  0x001b58e8 in nsvg__initPaint(NSVGcachedPaint*, NSVGpaint*, float) [clone .i                                                                                                                     sra.11] [clone .part.12] ()
                              No symbol table info available.
                              #3  0x001b58e8 in nsvg__initPaint(NSVGcachedPaint*, NSVGpaint*, float) [clone .i                                                                                                                     sra.11] [clone .part.12] ()
                              No symbol table info available.
                              #4  0x001b58e8 in nsvg__initPaint(NSVGcachedPaint*, NSVGpaint*, float) [clone .i                                                                                                                     sra.11] [clone .part.12] ()
                              No symbol table info available.
                              #5  0x001b58e8 in nsvg__initPaint(NSVGcachedPaint*, NSVGpaint*, float) [clone .i                                                                                                                     sra.11] [clone .part.12] ()
                              No symbol table info available.
                              #6  0x001b58e8 in nsvg__initPaint(NSVGcachedPaint*, NSVGpaint*, float) [clone .i                                                                                                                     sra.11] [clone .part.12] ()
                              No symbol table info available.
                              #7  0x001b58e8 in nsvg__initPaint(NSVGcachedPaint*, NSVGpaint*, float) [clone .i                                                                                                                     sra.11] [clone .part.12] ()
                              --Type <RET> for more, q to quit, c to continue without paging--
                              

                              I didnt get the standard crash message though, so hopefully this is the same issue and not something else.

                              mituM 1 Reply Last reply Reply Quote 0
                              • mituM
                                mitu Global Moderator @quicksilver
                                last edited by

                                @quicksilver Hm, seems we're getting somewhere, but since the output is truncated we don't see the calling site in the EmulationStation code. Do you remember what system was loaded when the crash occured ? I realized I might not have one of the systems from your install and that's why I couldn't - briefly - reproduce the crash.

                                quicksilverQ 1 Reply Last reply Reply Quote 0
                                • quicksilverQ
                                  quicksilver @mitu
                                  last edited by quicksilver

                                  @mitu In this particular instance I think it was PPSSPP, though it has crashed for me on multiple different systems. And the crash isnt reliably reproduced. A crash can sometimes occur on the first game I launch or I might have several crashes in a row or I might launch many games with no crashing.

                                  1 Reply Last reply Reply Quote 0
                                  • mituM
                                    mitu Global Moderator
                                    last edited by

                                    Just for comparison of systems, can your run

                                    find $HOME/RetroPie/roms/ -type d ! -empty -maxdepth 1 
                                    

                                    and post the output on pastebin.com ? Just want to see what's the difference from my system list.

                                    quicksilverQ 1 Reply Last reply Reply Quote 0
                                    • quicksilverQ
                                      quicksilver @mitu
                                      last edited by quicksilver

                                      @mitu https://pastebin.com/Qtub3ju5

                                      I also note that my gameslist view is set to video. I dont have any videos but its the only way for the marquee/wheel art to show up. Not sure if that matters but thought Id point it out.

                                      mituM 1 Reply Last reply Reply Quote 0
                                      • mituM
                                        mitu Global Moderator @quicksilver
                                        last edited by

                                        @quicksilver said in Emulationstation crashed and Cannot allocate memory on pi4:

                                        I also note that my gameslist view is set to video.

                                        I already have this setting. Thanks for the system list, I'll see if it has any impact on my installation.

                                        1 Reply Last reply Reply Quote 1
                                        • quicksilverQ
                                          quicksilver
                                          last edited by quicksilver

                                          I just got it to crash on the carbon theme. I just launched and then exited a PSP game a few times to cause the crash. The only other thing I can think of that would also suddenly make my pi 3 crash as well is that I am using some specific system artwork.xml files with skyscraper. For example, for PSP I have an artwork-psp.xml which corrects the image to the correct aspect ratio for when I generate my gameslist. I have done this for several other systems as well to make the aspect ratios correct for systems that werent 4:3. Could this cause an issue?

                                          <?xml version="1.0" encoding="UTF-8"?>
                                          <!-- This is the default artwork.xml provided by Skyscraper. More examples can be found in '~/.skyscraper'. Be sure to check the full artwork documentation here: https://github.com/muldjord/skyscraper/blob/master/docs/ARTWORK.md -->
                                          <artwork>
                                            <output type="screenshot" width="320" height="180">
                                                </output>
                                            <output type="marquee" resource="wheel"/>
                                          </artwork>
                                          
                                          mituM 1 Reply Last reply Reply Quote 0
                                          • mituM
                                            mitu Global Moderator @quicksilver
                                            last edited by

                                            @quicksilver said in Emulationstation crashed and Cannot allocate memory on pi4:

                                            Could this cause an issue?

                                            I don't think so - the end result is still a png image that EmulationStation loads, artwork.xml is just a set of design instructions for Skyscraper of how to produce that image from the cached artwork, it doesn't influence how EmulationStation loads or displays the resulting image.

                                            quicksilverQ 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

                                            Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.