I'm running the lates build of TeXstudio on Ubuntu 19.04 and I've run into the bug two times now. The files are on a USB-stick (FAT32). I'm switching quite a lot between pc's (windows/linux), but this only happens on this linux system.
(Sometimes) when I close the program, I get asked to save all: I choose yes. The program crashes. The file it was writing to now only contains the newly written parts of the text and all other parts are overwritten/gone. Windows can't even read the file now and markes it as corrupted (would you like to repair your USB-stick?).
have you unmounted the filesystem of the stick, before removing it from the computer?