Ideas

twobnt-ea's avatar
twobnt-ea
Rising Novice
1 month ago

Social Menu and UI Tiles broken due to custom TMP/TEMP environment variables

Please check my old case #231253935 and

 

Description:

 

I have identified a reproducible bug where the Social Menu and UI tiles fail to load if the Windows environment variables %TMP% and %TEMP% are pointed to a drive/folder other than the default %USERPROFILE%\AppData\Local\Temp.

 

Steps to Reproduce: 

 

Change Windows environment variables TMP and TEMP to a custom path (e.g., D:\Temp\).

 

Reboot the system.

 

Launch Battlefield.

 

Result: Social Menu and UI tiles are missing/broken.

 

Reset variables to %USERPROFILE%\AppData\Local\Temp, reboot, and the issue is resolved.

 

 

 

Technical Analysis:

 

The issue seems to be caused by inconsistent pathing within the software. It appears that one part of the application writes data using the %TMP% variable, while another part (likely the UI/Social module) attempts to access that same data using a hardcoded path like %LOCALAPPDATA%\temp. If a user has moved their temp folder, these two paths no longer point to the same location, causing the UI to fail.

 

Requested Fix:

 

Please ensure consistent handling of environment variables within your programming. The application should always use the system-defined %TMP% and %TEMP% variables instead of assuming the default local AppData path.

 

 

 

 

 

 

Long TEXT

 

So, after a really long search and by pure chance, I found the bug causing the Social Menu and tiles not to work for me.

 

For various reasons, and long before installing BF6, I had changed my environment variables TMP and TEMP. Instead of pointing to "%USERPROFILE%\AppData\Local\Temp", they pointed to my second drive (also a fast M.2 SSD) at "d:\Temp\_twobnt\sys_temp\".

 

I naturally checked the access rights and adjusted them to match the original path when I set this up over two years ago. The entire system and almost all programs that use these variables worked perfectly, storing their temporary files in that custom directory.

 

I didn't delete the original path, knowing that some programs derive the path to "%USERPROFILE%\AppData\Local\Temp" differently than via environment variables. As I said, these settings always worked very well. BUT, BF6 cannot handle this shift of environment variables within the menu tiles and the Social Menu. In BF2042, it was only the menu tiles that weren't displayed (this bug appeared in BF2042 via an update about 2–3 weeks after the release of BF6).

 

By resetting to the default values:

setx TEMP "%USERPROFILE%\AppData\Local\Temp"

setx TMP "%USERPROFILE%\AppData\Local\Temp"

and rebooting, all errors are gone and BF works excellently.

 

If I switch it back to the custom path, the errors return immediately after a reboot—it is 100% reproducible.

 

Yes, I had seen the hints regarding environment variables. However, I only checked if both existed and pointed to a directory with the correct permissions—which they did. Who on earth would expect it not to work?

 

I suspect the following error on EA's side: One part of the EA/BF software downloads the necessary content via "%TMP%\Battlefield™ 6", while another part of the program tries to access it via "%LOCALAPPDATA%\temp\Battlefield™ 6" (or vice versa).

 

This can only work if you use the default values for both environment variables. Otherwise, they point to different directories.

 

I will communicate this solution directly to EA so they can investigate.

 

I hope this helps others!

 

"Please fix the inconsistent handling of environment variables in the source code."

No CommentsBe the first to comment

Featured Places

Node avatar for Battlefield 6 Bug Reports

Battlefield 6 Bug Reports

Report bugs and see what the Battlefield 6 community is saying on this forum.Latest Activity: 2 months ago
9,573 Posts