Emulationstation crashed and Cannot allocate memory on pi4
-
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
-
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.
-
@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
-
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.
-
@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.
-
Can you post the
dmesg
output on pastebin.com ? Do you have anything configured on the start/stop runcommand scripts ? -
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.
-
@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.
-
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.
-
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.
-
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 ? -
@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
-
@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).
-
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.
-
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
withsudo 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 fromgdb
prompt
bt full
then get the output and post it here.
- press
q
to exit the debugger.
- install
-
@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.
-
@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.
-
@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.
-
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.
-
@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.
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.