• Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
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.
  • Q
    quicksilver
    last edited by quicksilver 3 May 2020, 03:58 5 Mar 2020, 03:53

    Pi4 using the official but unsupported retropie image Ver. 4.5.14. and it looks like Im now suddenly having the same issue as reported here: https://retropie.org.uk/forum/topic/24436/drm_ioctl_mode_create_dumb-failed-cannot-allocate-memory?_=1583298279174

    I first started to notice that ES was becoming more unstable and was crashing quite frequently (displaying the standard ES crash message screen) when either launching a game or quitting a game and returning to ES. Although I now have also gotten the "DRM_IOCTL_MODE_CREATE_DUMB failed: Cannot allocate memory" message several times now as well. These issues just started over the last few days and ES had been stable up until that point. The only things I have changed since this issue started are some small modifications to the theme Im using and some changes to the way skyscraper generates gameslists. However these were small changes and nothing out of the ordinary so Im not sure how they could contribute to this issue.

    M S 3 Replies Last reply 5 Mar 2020, 04:37 Reply Quote 0
    • M
      mikeydoom @quicksilver
      last edited by 5 Mar 2020, 04:37

      @quicksilver

      What do you have gpu_mem in config set to?

      I have mine set to 256 and don't have that issue on my rpi4 with 4.5.14

      B 1 Reply Last reply 5 Mar 2020, 04:43 Reply Quote 0
      • M
        mikeydoom @quicksilver
        last edited by 5 Mar 2020, 04:43

        @quicksilver

        Also set the ES VRAM in emulation station settings to 200mb or higher depending on which pi4 you have.

        I have the 4gb model so I set it to 512mb.

        1 Reply Last reply Reply Quote 0
        • B
          BuZz administrators @mikeydoom
          last edited by BuZz 3 May 2020, 04:46 5 Mar 2020, 04:43

          @mikeydoom gpu_mem is not used in the same way by the rpi4. Or at least not by emulation station

          This may be useful:

          https://www.raspberrypi.org/forums/viewtopic.php?t=244531#p1491512

          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

          1 Reply Last reply Reply Quote 0
          • B
            BuZz administrators
            last edited by BuZz 3 May 2020, 04:58 5 Mar 2020, 04:50

            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

            Q 1 Reply Last reply 5 Mar 2020, 20:21 Reply Quote 0
            • Q
              quicksilver @BuZz
              last edited by 5 Mar 2020, 20:21

              @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
              • M
                mitu Global Moderator
                last edited by 5 Mar 2020, 20:48

                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 6 Mar 2020, 06:23

                  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.

                  Q 1 Reply Last reply 6 Mar 2020, 12:08 Reply Quote 0
                  • Q
                    quicksilver @VictimRLSH
                    last edited by 6 Mar 2020, 12:08

                    @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
                    • Q
                      quicksilver
                      last edited by 6 Mar 2020, 22:08

                      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
                      • Q
                        quicksilver
                        last edited by 16 Mar 2020, 14:30

                        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
                        • M
                          mitu Global Moderator
                          last edited by mitu 16 Mar 2020, 14:50

                          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 ?

                          Q 1 Reply Last reply 16 Mar 2020, 15:12 Reply Quote 0
                          • Q
                            quicksilver @mitu
                            last edited by 16 Mar 2020, 15:12

                            @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 16 Mar 2020, 18:17

                              @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
                              • Q
                                quicksilver
                                last edited by quicksilver 17 Mar 2020, 11:22

                                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
                                • M
                                  mitu Global Moderator
                                  last edited by 17 Mar 2020, 12:16

                                  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.
                                  Q 1 Reply Last reply 17 Mar 2020, 13:44 Reply Quote 0
                                  • Q
                                    quicksilver @mitu
                                    last edited by 17 Mar 2020, 13:44

                                    @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.

                                    M 1 Reply Last reply 17 Mar 2020, 14:46 Reply Quote 0
                                    • M
                                      mitu Global Moderator @quicksilver
                                      last edited by 17 Mar 2020, 14:46

                                      @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.

                                      Q 1 Reply Last reply 17 Mar 2020, 15:21 Reply Quote 0
                                      • Q
                                        quicksilver @mitu
                                        last edited by quicksilver 17 Mar 2020, 15:21

                                        @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
                                        • M
                                          mitu Global Moderator
                                          last edited by 17 Mar 2020, 15:27

                                          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.

                                          Q 1 Reply Last reply 17 Mar 2020, 15:35 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.

                                            [[user:consent.lead]]
                                            [[user:consent.not_received]]