MegaGlest Forum
MegaGlest => Bug reports => Closed bug reports => Topic started by: tomreyn on 21 June 2013, 11:46:47
-
When the filesystem where MG tries to create a savegame has run full, MG will run into a segmentation fault. It would be nicer to handle this situation gracefully (display a message box).
Ideally the same should happen for other file output operations (logfiles) where it doesn't impact performance (I assume it does not since it should be sufficient to handle the error when it occurs, i.e. there should be no need to check whether the next packet will writable before it is actually written).
Update:
To ease testing, this should also be reproducible when pointing --data-dir or UserData_Root to a location which is readable but not writable, such as a small filesystem created on a partitioned (e.g. using GNU parted + partprobe) USB key using, e.g.:
sudo mkfs.ext4 -L MegaGlest /dev/DEVICENAME
sudo mount -o users /dev/DEVICENAME /mnt/
# now copy files to /mnt/ as needed, then make it read-only ro prepare for testing
mount --remount,ro /mnt/
Or, possibly even easier, use a loop device (https://en.wikipedia.org/wiki/Loop_device), see the example in losetup(8) (no need for encryption, though).
-
I think we're asking too much here. The expectation is that there is somewhere to write for megaglest. There are many scenarios like once we have written to a file and the disk fills after we are able to create the file, etc.. etc..
To check for all possible cases of failure is simply too much. However, if there is a value we could add a setting to force NO WRITES to any file (But you lose some features like changing anything or saving anything).
Thanks