android / tuningfork

Android Performance Tuner is a library to help developers measure frame rendering time across different devices and game stages. This plugin will help developers integrate Android Performance Tuner into their game.
https://developer.android.com/games/sdk/performance-tuner/unity
Other
54 stars 30 forks source link

ReleaseAllScriptCaches error when launching Unity #23

Open fouman75 opened 2 years ago

fouman75 commented 2 years ago

Hi,

Plugin version 1.5 Unity version 2020.3.20

Within our main project, when launching Unity, the console shows the following error: ReleaseAllScriptCaches did not release all script caches!

Here is the relevant part of Editor.log:

Application.AssetDatabase Initial Script Refresh Start
Registering precompiled user dll's ...
Registered in 0.027311 seconds.
AssetDatabase: script compilation time: 0.070671s
Begin MonoManager ReloadAssembly
ReleaseAllScriptCaches did not release all script caches!
Remaining caches:
Native extension for LinuxStandalone target not found
Native extension for WindowsStandalone target not found
Native extension for iOS target not found
Native extension for Android target not found
Refreshing native plugins compatible for Editor in 224.66 ms, found 12 plugins.
Preloading 0 native plugins for Editor in 0.00 ms.
Refresh completed in 0.000001 seconds.
Refresh completed in 0.000000 seconds.
Refreshing native plugins compatible for Editor in 10.73 ms, found 12 plugins.
Mono: successfully reloaded assembly
Refresh completed in 0.000001 seconds.
Android Performance Tuner RefreshAssetsCompleted
UnityEngine.StackTraceUtility:ExtractStackTrace ()
UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
UnityEngine.Logger:Log (UnityEngine.LogType,object)
UnityEngine.Debug:Log (object)
Google.Android.PerformanceTuner.Editor.Initializer:RefreshAssetsCompleted () (at Library/PackageCache/com.google.android.performancetuner@1460780ffff9-1651255749193/Editor/Scripts/Initializer.cs:166)

(Filename: Library/PackageCache/com.google.android.performancetuner@1460780ffff9-1651255749193/Editor/Scripts/Initializer.cs Line: 166)

I can't reproduce the problem in an empty project. I can confirm that when I completely remove the AndroidPerformanceTuner plugin from the project, the error disappears. Also note that on subsequent script auto refresh within Unity, there is no such error in the console, the tuner generates properly.

Android Performance Tuner Initializer
UnityEngine.Debug:Log (object)
Google.Android.PerformanceTuner.Editor.Initializer:Init () (at Library/PackageCache/com.google.android.performancetuner@1460780ffff9-1651255749193/Editor/Scripts/Initializer.cs:113)
Google.Android.PerformanceTuner.Editor.Initializer:.cctor () (at Library/PackageCache/com.google.android.performancetuner@1460780ffff9-1651255749193/Editor/Scripts/Initializer.cs:108)
UnityEditor.AssetPostprocessingInternal:GetMeshProcessorsHashString ()

Android Performance Tuner RefreshAssetsCompleted
UnityEngine.Debug:Log (object)
Google.Android.PerformanceTuner.Editor.Initializer:RefreshAssetsCompleted () (at Library/PackageCache/com.google.android.performancetuner@1460780ffff9-1651255749193/Editor/Scripts/Initializer.cs:166)

As far as we can tell, the error doesn't seem to affect our project other than the plugin doesn't work after Unity starts (plugin setup window is completely empty with a big yellow warning icon top left, no text whatsoever). But after script refresh, setup window is fixed.

Our project is managed with Perforce so I had to mark all the files under /AndroidPerformanceTuner_gen to writable since the plugin regenerates or touches most of the files and we had tons of access denied errors. Not sure how that helps other than I'm wondering if there could be some permissions I missed that only affects Unity' start.

Would anyone have any insights on what could be causing this problem?

I'm also wondering if there is any ETA on the next release as I was checking some of the other issues (like #18) and would be interested in getting those fixes.

Thanks!

toxikman commented 2 years ago

We're having this same issue as well. We don't use Performance but use Subversion and I don't think any of those APT_gen folder files are read-only for us. We're also interested in getting an update that fixes this and #18 thanks!

eristella commented 2 years ago

Hello, thanks for reporting the issue! I'm currently investigating it and will get back to you asap :) As for the next APT release, we're planning on having one by the end of June.

Cheers, Erica