HeliosVirtualCockpit / Helios

Helios Distribution
https://github.com/HeliosVirtualCockpit/Helios/wiki
GNU General Public License v3.0
207 stars 35 forks source link

Editor generates empty driver files from some interfaces #803

Closed usagiyon closed 9 months ago

usagiyon commented 10 months ago

Helios 1.6.6060.0003

Helios Editor generates empty driver files to C:\\Saved Games\DCS.openbeta\Scripts\Helios\Drivers, but only from certain interfaces.

Example, create new profile and insert interface. With interface like F-5E, AJS37, Mig-25 or Mi-24P, only the empty Driver file will be generated. When selecting something other, like KA-50BS3 or P-47D, everything works fine.

This is with original interface files.

Screenshot 2024-02-01 154856

Screenshot 2024-02-01 001738

First I thought that this could be just issue with somehow corrupted interface files, but it does not seem to be case. I did some digging with freshly compiled debug version of Editor and it seems that file write call in DCSExportConfiguration.cs gets proper content of driver file but it results just an empty file:

                File.WriteAllText(
                    location.ExportModulePath(moduleInfo.ModuleLocation, baseName),
                    _exportModuleText);

There's no errors, nothing. content of text to be written looks valid so where it goes?

EDIT: I reverted to previous version, 1.6.6050.0001 and it works fine, so there's something with latest version that breaks some interfaces.

usagiyon commented 10 months ago

Found the reason. When trying to create SoftInterface, it will remove content of freshly wrote driver file:

Screenshot 2024-02-01 165254

BlueFinBima commented 9 months ago

@usagiyon Thanks for raising this, and good sleuthing. The new code to enable SoftInterface impersonation introduced this problem. I'll ship a HotFix to fix this.

BlueFinBima commented 9 months ago

@specialistward & @usagiyon HotFix 1.6.6061.1 has just been released to address this problem.