PDA

View Full Version : Linux crash problems? Here is a Fix (MAYBE)


onemyndseye
10-07-2008, 11:19 AM
Hey guys... I had frequent crashes under Linux for some time and this little launcher script solved my problems:

create the following script in your RO game directory (probably ~/regnum)

rolauncher.sh

#!/bin/bash

## Set variables
## Set this to the full path of your regnum install
GAME_DIR=/home/onemyndseye/regnum


## Attempt to make sure no other regnum process is running
#
killall -9 game
killall -9 rolauncher




### Setup the env and start laucher
cd "$GAME_DIR"
export MALLOC_CHECK_=1
./rolauncher


# Now that the launcher has exited and the game has been run
# Switch env settings and renice the games binary
# Reniceing the games binary is optional though it does improve
# performance

export MALLOC_CHECK_=0
sudo renice -15 $(pidof game)






If you do not wish to use renice to improve game performance then comment out that section... if you do, make the following changes to your sudoers file

edit the file: /etc/sudoers
and add this line replacing "onemyndseye" with YOUR username


onemyndseye ALL=(ALL) NOPASSWD: /usr/bin/renice



Now start the game using this simple script instead of running ./rolauncher directly... You make also edit any menu or desktop shortcuts to point to this script instead of the launcher bianary. This loader script GREATLY reduced my crashes and boosted my FPS by a good 12-20... your mileage my vary.

Have fun and happy hunting,
-onemyndseye

Syrtis Hunter lvl50: Elusis

(Cross posted here for correctness...sorry mods)
**** Edit for Froste's suggestions

Froste
10-07-2008, 01:27 PM
Here's a couple of shellscripting tips that I've learned over the years, doing sort of what you've done:

pidof -- a nice program, pidof processname will produce the pid numbers for all processes that share the same name (certain programs spawn several processes, like xmms spawns 4), so pidof xmms, would yield all 4 pids of xmms, this is best coupled with the back tick ( ` ), anything enclosed in backticks will be executed, and the output passed on to the preceding comment, so the command

kill `pidof xmms`

would kill all 4 xmms processes, but there is an even easier way (:

The command killall works the same as kill, but with process names instead of pids, so killall xmms, would be equivalent to kill `pidof xmms`, and thus to use it in your regnum script, killall game, and you'll kill regnum's process, regardless of which pid number it has.

Even if `pidof game` is made obsolete by killall, it is still useful later in your script when it's time to renice -15 `pidof game`

onemyndseye
10-07-2008, 02:20 PM
Yeah... lol I just have a funny was of doing things lol

Good tips though :) I will edit the post since your way is much more streamline... I have however observed funny instances where ay ' killall -9 game ' would not kill a process that the system proc table reports as '/usr/bin/game' instead of simply 'game'. But that is rare happening that lead me to gather info that way I do.... although not foolproof in itself :)


I bet you are on the Debian forums..??.. I recognize your signature :)

Thanks again,
-onemyndseye

Froste
10-08-2008, 08:18 AM
I was yes, my regular nick is Grifter, I use Froste for fantasy games -- I disagreed with Jeroen over avatar policies, and left when I felt he was railroading the userbase for his own personal preferences.

Comp
10-12-2008, 07:06 PM
Fixed my issue....I couldn't even get into the game was crashing as soon as I came into world...

KARMA 4 U

onemyndseye
10-13-2008, 12:16 PM
Great to hear it help! :)

Happy hunting :)

ralmartehernandez
12-15-2008, 09:55 PM
hola perdon por este inconveniente kailer pero mi cuenta en syrtis me la an robado y mi personaje es un tirador,brujo,caballero y mi tirador es alto y a mi me jakearon mi cuenta y uiero saber si me mandarias un mensaje por mi msn a ver si me le canbiarian la clave.

mi msn es ral_m@hotmail.com

por favor ya e enviado 4 mensajes y solo me respondieron 1 pero el problema de mi cuenta es como si no existiera para entrar

ArcticWolf
12-15-2008, 10:44 PM
What about using "killall game"? It works for me.

Evola
12-17-2008, 01:14 AM
Good script, but renice value has to be selected manually. Renice -15 caused sound lags on one of my computers.