Download

Changed line endings (LF -> CRLF) for runtime dependency

Hi,

I am developing a third party plugin which makes use of a config file. I’ve added it as a runtime dependency in my .Build.cs file. By doing so it is succesfully copied to the UE4Game/MyProject… folder on my android device. On further inspection i noticed that the config.ini file had been modified since it is 6 bytes larger on the android device than it was on my PC. Turns out the line endings have been changed from LF to CRLF. This causes my app to crash due to what i assume is the thirdparty library expecting LF line endings. I believe this is to be the case since the error is fixed if I manually copy the config file with LF line endings to the same location.

I guess I will have to do some manual manipulation after the fact to get LF line endings back. It seems a bit wierd and was a real headache to debug, especially since the third party library I’m using didn’t really provide meaningful error messages.

Have anyone else encountered anything similar? Could it be intentional that UE modifies files like this?

I fixed this on my end by rewriting the file with LF line endings before handing it over to the third party library and it now works as expected. Leaving this here in case someone else runs into this issue.