Crash on running VCMI with non-admin rights


I found out I have issues on running VCMI without root rights on Linux (equivalent to a non-admin user on Windows). I was close to accepting it, but other people do not have this odd behavior. Some console output:

[email protected]:~$ vcmiclient
Creating console and logfile: 10000
Not entire config/settings.txt parsed!
Loading settings: 760000
VCMI 0.82b (client)
New screen flags: 2147483648
        Initializing screen: 180000
        Initializing video: 10000
        Initializing minors: 0
        Loading default system settings: 50000
        Initializing sound: 250000
Initializing screen and sound handling: 300000
Loading .lod files: 920000
        General text handler: 680000
        Hero handler: 140000
        Artifact handler: 100000
        Creature handler: 650000
        Town handler: 260000
        Object handler: 100000
        Def information handler: 610000
        Building handler: 110000
        Spell handler: 150000
Initializing VCMI_Lib: 3770000
Screen handler: 0
Loading and transforming heroes' flags: 2000000
        Main graphics: 4220000
Initializing game graphics: 0
Message handler: 60000
Initialization of VCMI (together): 9310000
Cannot open interprocess memory: Permission denied
Permission denied
terminate called after throwing an instance of 'boost::interprocess::interprocess_exception'
  what():  Permission denied

I guess it’s normal to not be able to access other processes without superuser rights, but why do others succeed on running with a restricted user? Any suggestion?


The processes are not “accessing” each other, they are exchanging information. [Client waits until server indicates it’s ready.]

I don’t know how boost::interprocess is implemented on your platform but on Windows it creates special file with shared memory. If on your machine things work similar, it may happened that shared memory file was created by client running with root privileges and file remains a property of root.

Try looking in /dev/shm for vcmi_memory file (it was there on some Linux).

It’s a bit scary with what precision you address and solve issues, dude! :open_mouth:

Well, next time someone asks, just say:

# sudo rm -f /dev/shm/vcmi_memory

Thanks! :mrgreen: