Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

No output_log since 5.4?

Discussion in 'Editor & General Support' started by TJHeuvel-net, Aug 1, 2016.

  1. TJHeuvel-net

    TJHeuvel-net

    Joined:
    Jul 31, 2012
    Posts:
    838
    Hi,

    I was wondering if anyone else is having this problem. Ever since upgrading to 5.4 our standalone windows builds dont create an output_log.txt. The strange thing is that it doesnt happen on a teammates machine, with the same build.

    I doublechecked and the folder is not readonly, and i have plenty of disk space. There is one other report like this, but its using the reverted forum so i cant reply there.
     
  2. Alan-Liu

    Alan-Liu

    Joined:
    Jan 23, 2014
    Posts:
    390
    It's in C:/users/UserName/AppData/LocalLow/CompanyName/ProductName on my computer.
     
    CJ_Smith and IgorAherne like this.
  3. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    Not sure this is relevant, but i think there's a new feature that you can set whatever log level the game client generates (this is controlled from the player settings). Maybe, on your machine the logger is set to not output anything? (just a guess)
     
  4. TJHeuvel-net

    TJHeuvel-net

    Joined:
    Jul 31, 2012
    Posts:
    838
    Thanks, my log is indeed there. There is no mention of this in the changelogs nor in the documentation.
     
  5. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,875
    It's probably related to Low Integrity Mode (https://msdn.microsoft.com/en-us/library/bb625960.aspx). If your app is running in low integrity mode, the application will write to

    Registry

    Low-integrity processes can write to and create subkeys under HKEY_CURRENT_USER\Software\AppDataLow

    File system

    Low-integrity processes can write and create subfolders under %USER PROFILE%\AppData\LocalLow.


    Sorry for the missing docs, will fix that.
     
  6. TJHeuvel-net

    TJHeuvel-net

    Joined:
    Jul 31, 2012
    Posts:
    838
    I've submitted a bug report about this, they said it was indeed a bug. Can you confirm, or is this intended?

    Is there any way to know for certain? We often ask our users to attach a log file with a bugreport.
     
  7. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,875
    Can you paste the case number here?
     
  8. TJHeuvel-net

    TJHeuvel-net

    Joined:
    Jul 31, 2012
    Posts:
    838
    #818601

    Thank you for the quick response!
     
  9. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,875
    Well, the log says that your process is running in low integrity level, that's why it puts the log in that path....

    Can you do this - download https://technet.microsoft.com/en-us/sysinternals/processexplorer.aspx

    Right click on Company Name, and select Integrity Level, launch your player, and see what Integrity it contains, or better yet copy-paste the screenshot.
     
  10. TJHeuvel-net

    TJHeuvel-net

    Joined:
    Jul 31, 2012
    Posts:
    838
    http://i.imgur.com/lAyx74C.jpg

    Sorry for the overload of information, but isnt that the weirdest. On the right you see our game running, and process explorer says its on High. On the left you see Verdun_Data which shows no output_log, i could find it it in Appdata/LocalLow/CompanyName. In the log it does say its in low integrity.

    Its a Development build, perhaps that matters?
     
  11. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,875
    So yes, the bug is real... usually the applications will run in Medium integrity level, they inherit this from explorer, but as you saw your explorer is running in High integrity level, not sure why, maybe because UAC is disabled or you're running in true administrator mode, it's a bit unsafe, because that means all your programs (even downloaded from internet) are running with administrative privileges.

    In any case, our code incorrectly assumes that High integrity level is Low integrity level, the bug doesn't occur if application is running in Medium integrity level.

    I'll fix this, sorry for the inconvience
     
  12. TJHeuvel-net

    TJHeuvel-net

    Joined:
    Jul 31, 2012
    Posts:
    838
    Thanks a ton! I do have UAC disabled, and i am an administrator. I like to live dangerously.
     
    IgorAherne and Ony like this.
  13. K9B3

    K9B3

    Joined:
    Jan 20, 2014
    Posts:
    2
    I have the same thing going on. This additionally effects the registry entry for the player prefs which are now in Software/AppDataLow/Software.
     
  14. xCrochaNx

    xCrochaNx

    Joined:
    Jun 20, 2013
    Posts:
    3
    Please correct me if I am wrong, Unity will assume that it is running in Low Integrity mode in case that Explorer process is not running in Medium Integrity mode and will behave as if it is in Low Integrity?

    This issue is found in Unity 5.4.0x? Was it fixed in 5.4.1 ?

    Thank you.
     
  15. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,875
    In case above, explorer was running in High integrity mode. I checked the bug, it seems it will be fixed in 5.4.1p1
     
  16. xCrochaNx

    xCrochaNx

    Joined:
    Jun 20, 2013
    Posts:
    3
    Thank you for your reply.

    Is there an ETA on the 5.4.1p1 update?
     
  17. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,875
  18. KyleHatch85

    KyleHatch85

    Joined:
    Dec 13, 2011
    Posts:
    99
    So it seems it was fixed in https://unity3d.com/unity/whats-new/unity-5.4.2

    WindowsStandalone: Application launched with high integrity level will no longer act as low integrity application. (818601)

    just in case anyone came across this (Like i) and was wondering if it actually got fixed.
     
  19. BlackPete

    BlackPete

    Joined:
    Nov 16, 2016
    Posts:
    970
    Just ran into this issue with 5.5.0f3. Standalone build. No log file in either the data next to the .exe, or in the locallow folders. "Use player log" is checked.

    If I run from the editor, then the log file appears in the data folder.

    Does the standalone build need to have the "Developer" flag set as well for logging to be active?
     
  20. BlackPete

    BlackPete

    Joined:
    Nov 16, 2016
    Posts:
    970
    Actually, if I run the app in admin mode, then the log file appears in the data folder.

    Unity really needs to add a check to see if it has permissions to write to the data folder, and if not, fall back to the LocalLow folder instead.
     
    rubenmueller likes this.
  21. rubenmueller

    rubenmueller

    Joined:
    Oct 15, 2015
    Posts:
    6
    That would be great!
    I need to put my application in a msi-installer build, and the client installs it on its c-drive under programs and there the user has no change/write permissions per default.
     
  22. ray1fr

    ray1fr

    Joined:
    Mar 8, 2013
    Posts:
    6
    Hi, I'm facing the same issue today with Unity 2017.1.1f1, the output_log.txt files of my standalone (exe) game are written in my C:/users/UserName/AppData/LocalLow/CompanyName/ProductName folder instead of simply being written to the *_Data folder of the game, I can't clearly understang why, even after reading this whole post...

    The "use player log" is correctly checked in my player settings, and I definitely have all the permissions I need to write in the _Data folder.

    I'm administrator on my PC, but I don't think I'm running explorer in High integrity mode (at least not on purpose), as Tomas1856 suggested... Even in that case, does it mean that all all players who have administrator rights may face the same issue ?
    We plan to reslease our game for a whole company, so I fear our players may have a hard time finding this log file in case they face an issue :(

    Any help/suggestion would be appreciated...
     
  23. BlackPete

    BlackPete

    Joined:
    Nov 16, 2016
    Posts:
    970
    I think they recently changed to save all output_log.txt in Application.persistentPath, which seems to always point at that LocalLow folder.

    Which makes sense except...

    When Unity crashes, it copies the wrong output_log.txt file into the crash folder :(

    I've filed a bug report on this, but I've yet to see a response on it.
     
  24. ray1fr

    ray1fr

    Joined:
    Mar 8, 2013
    Posts:
    6
    Thank you BlackPete, your answer is almost consistant with the newest documentation saying the player log files should now be found in C:\Users\username\AppData\Local\CompanyName\ProductName\output_log.txt
    and not any more in the game _Data folder as the previous documentation (Unity 5) used to say.
    (I say "almost", because il my case, I get these log files in C:\Users\username\AppData\LocalLow\CompanyName\ProductName\output_log.txt , but that's a detail)

    This is however quite a serious issue for us, as those log file are now very hard to retrieve for end users (because this path varies for each player, and AppData is a hidden folder by default) :(

    Can someone from Unity confirm this is now the normal behaviour, and there is no way to revert it back to using the game _Data folder instaed ?

    Thanks in advance !
     
  25. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,875
  26. BlackPete

    BlackPete

    Joined:
    Nov 16, 2016
    Posts:
    970
    That means creating a launcher app to invoke the Unity-built .exe with that argument, though.

    It would be nice to add that as an argument in Player Settings, where if left blank, use the existing behaviour (whatever that is...)

    Oh, and also make sure that if Unity crashes and creates a crash folder, copy the correct log file. :)
     
  27. ray1fr

    ray1fr

    Joined:
    Mar 8, 2013
    Posts:
    6
    Thank you Tomas1856 for this workaround, but, as BlackPete said it would mean creating an external bat/cmd/vbs/other... app to call the .exe game, which I find a bit messy...

    I know have some regrets upgrating from Unity 5 to Unity 2017; as Unity 5's behaviour on this subject was more straightforward :(

    As BlackPete said, a new argument in the Player Settings would be a great addition; I've asked for this feature in feedback.unity3d.com.
    EDIT: In case people here want to support my suggestion, please vote on this feature:
    https://feedback.unity3d.com/suggestions/chose-player-logfil-output-log-dot-txt-folder
     
    Last edited: Oct 24, 2017
  28. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,875
    I'll forward the feedback to Windows team.

    Cheers!
     
  29. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,589
    The documentation is also missing where the .log is located on Windows 10. It mentions only XP/Vista and Windows 7.

    Here is where it's located on Windows 10.