WASM module unable to enumerate local package files from ".\"

Version: 1.1.10.0

Frequency: Consistently

Severity: Blocker

Context: WASM module in a standard airport package containing a single airport. The module and entire package was compiled for FS2020 with v0.24.3 SDK.

Bug description:
According to the SDK, WASM modules can use “\work” folder for read-write operations and read-only "." folder for accessing local package contents (with some exceptions for encrypted packages). This works as expected in FS2020, but appears broken in FS2024 when trying to enumerate folder contents:

  1. Seemingly random files from other packages are returned for "." folder.
  2. Files from own local package remain unlisted.

Repro steps:

Sample code for WASM module:

DIR *dir = opendir(".\\");
struct dirent *entry = nullptr;

if(dir){
    while((entry = readdir(dir)) != nullptr){
        printf("%s\n", entry->d_name);
    }
    closedir(dir);
}

Output in dev console:

None of the listed files actually belong to the package with the WASM module that executed the code snippet.

2 Likes

Do you think my issue sounds related? WASM cannot handle file I/O outside of work correctly (cannot test if work is read properly) in MSFS 2024

@noolaero

This issue should be fixed with next week’s patch.

Best regards,

Eric / Asobo

@noolaero

Apologies but actually the bug won’t be fixed in next week’s update - while double checking your issue I realised that the change list I thought would have fixed it did not address it in the end…
The right fix has since been found but I believe it has come too late to be included in the mid-December patch. :frowning:

I will keep you posted as soon as I know more.

Best regards,

Eric / Asobo

Hello @noolaero

Sim Update 1 / SDK 1.2.2 has a fix for this problem.
Please check you now have the expected behavior in flighting version 1.3.7.0.

Regards,
Sylvain