R2Northstar / NorthstarLauncher

Launcher used to modify Titanfall 2 to allow mods to be loaded
MIT License
279 stars 127 forks source link

Fix engine error crash caused by language detection hooks #699

Closed wolf109909 closed 4 months ago

wolf109909 commented 4 months ago

During my debugging around user's game constantly crashes on startup with file corruption detected, I found this code which does not satisfy the guarding logic and need further detection to guard against files named general_stream_xxx.mstr. After applying this code change in my NorthstarCN fork, the crashes are resolved.

The initial debugging procedures:

  1. Console logs Origin detected language "stream", but we do not have audio for it installed, falling back to the next option
  2. Games crashes with engine error: file corruption detected.
  3. Found problematic code, applied the code change.
  4. The problem is fixed without modifying the environment.
GeckoEidechse commented 4 months ago

(Skipping testing cause the change is simple boolean logic and @wolf109909 mentioned they tested it (albeit on NorthstarCN so I might do this as a small patch release just to double check in prod)

wolf109909 commented 4 months ago

lol that's ancient!

wolf109909 commented 4 months ago

I'd say that this won't be noticed simply because english is before stream xD

p0358 commented 4 months ago

This is really weird though, because output of that function should not be used for where that log line is created, it sounds like both the user had a modified installation and NorthstarCN somehow modified the original code logic... like it should use game's original function where it logged "stream" I think