Workaround for CrRendererMain crashes host - DeckCheatz/wemod-launcher GitHub Wiki
Help Page: WeMod CrRendererMain process consumes all of the memory and crashes the host system
Problem
For some people it can happen that a lot of CrRendererMain processes are being executed by WeMod, each consuming over 500MB of memory, until the memory is full. This can cause Steam or even system crashes.
Steps to Reproduce the Issue
** Tested with Linux Mint 22 and Steam via flatpak
- Start the game
- WeMod starts normally
- Lots of CrRendererMain processes spawn, each consuming over 500mb of memory
- Sometimes it stabilizes shortly before consuming all memory, sometimes the whole system freezes and only a hard reboot helps
Expected Result
WeMod should not consume all the memory.
Workaround
If you should run into this problem, you can simply run the following script before you launch the game:
#!/bin/bash
initial_renderer_pid=""
while true; do
echo "START ($(date))"
if [ -z ${initial_renderer_pid} ](/DeckCheatz/wemod-launcher/wiki/--z-${initial_renderer_pid}-);then
initial_renderer_pid=$(pgrep -af "renderer" | grep "WeMod.exe" | awk '{print $1}' | head -n1)
if [ -n ${initial_renderer_pid} ](/DeckCheatz/wemod-launcher/wiki/--n-${initial_renderer_pid}-);then
echo "++ Found initial_renderer_pid: ${initial_renderer_pid} ..."
else
echo "++ No initial_renderer_pid yet ..."
fi
echo "END ($(date))" && sleep 1 && continue
else
for pid in $(pgrep -af "renderer" | grep "WeMod.exe" | awk '{print $1}' | grep -v "${initial_renderer_pid}");do
echo "++ Killing ${pid}..." && kill -9 ${pid} && sleep 1
done
fi
echo "++ Keeping initial_renderer_pid: ${initial_renderer_pid} ..."
echo "END ($(date))" && sleep 2
done
It runs in an endless loop and kills all CrRendererMain processes, except of the initial one. The CrBrowserMain and at least one CrRendererMain process are needed. Otherwise WeMod will crash.
So far this script has worked great for me personally. It did not affect the Game or WeMod functionality and solved the issue.