View Issue Details

IDProjectCategoryView StatusLast Update
0030261RunnerUbuntuPublic2021-08-06 16:39
ReporterDanAssigned ToCoreTech 
PriorityLowSeverityC - GeneralReproducibility100%
Status ResolvedResolutionSuspended 
Platform-OSWindows 10OS VersionPro x64
Product Version2.1.5 
Target VersionFixed in Version 
Summary0030261: Ubuntu: working_directory value can be modified by extensions using chdir()
DescriptionOn Linux, when I change the current directory with the C++ function chdir(), it should only effect my extension's working directory, not the actual game's working directory, because the game is supposed to be sandboxed. Using this function on Mac, my extension suffers no issues because the extension's working directory and the game's working directory remain two different internal variables. The same is also true with the Windows C++ equivalent function SetCurrentDirectory(). This is not so on Linux. While calling chdir() does not change the value of the game's working_directory, (which is always equal to "assets/"), chdir() does in fact change the absolute path that game looks for that "assets" folder.

Once the directory is changed using that function on Linux, the extension can no longer be used in-game, because the SO library can no longer be read, neither can the rest of the included files. This is not an issue on Windows and Mac.

In the sample MP resource, look for the source code concerning the "set_working_directory" function, which uses SetCurrentDirectory() on Windows, and chdir() on Mac and Linux.
Steps To Reproduce1. Start GMS2.
2. Import
3. Run it on Ubuntu
Repro: 100%
Additional Information
Tagslinux, Runner
1.4 Found In
2.x Runtime Found In2.1.5.246
2.x Runtime Verified In



2021-08-06 16:39

Developer   ~0066679

Closing any Ubuntu bugs.