DragonBox / u3d

U3d is a cross-platform set of tools to interact with Unity3D from command line.
MIT License
361 stars 33 forks source link

Create a set of logs to test prettifier against #119

Open niezbop opened 7 years ago

niezbop commented 7 years ago

We need to make sure that the rules behave as intended when prettifying logs. For this we need specific logs and make sure that the output produced by the prettifier is as expected.

Premik commented 6 years ago

I'm adding a log snippet where the error message is not caught. There is some weird compilation error but what the prettifier outputs appears like a successful build...

[19:45:05] [COMPILER] Finished compilation for Library/ScriptAssemblies/UnityEditor.StandardEvents.dll
[19:45:05] [GENERAL] [LOG] Build.cs(line 19): Build started. Default build options.
[19:45:05] [GENERAL] [LOG] Build.cs(line 34): Found WORKSPACE set to /tmp/JenkinsWs/build in the system environment.
[19:45:06] [GENERAL] Exiting batchmode successfully now!```

I would expect some errors before the green Exiting batchmode successfully now.

Below is the original log. The strange error line is: Error building Player because scripts have compile errors in the editor But I don't understand why at least this line *** Cancelled 'Build.Player.LinuxStandaloneSupport' in 1 seconds (629 ms) is not matched. I've checked the regexp of this last one and it seems correct to me..

Refreshing native plugins compatible for Editor in 2.59 ms, found 1 plugins.
Refresh: detecting if any assets need to be imported or removed ...
Refresh: elapses 0.013762 seconds (Nothing changed)
Refresh completed in 0.013775 seconds.
- Starting compile Library/ScriptAssemblies/Unity.TextMeshPro.dll
- Starting compile Library/ScriptAssemblies/Unity.PackageManagerUI.Editor.dll
- Starting compile Library/ScriptAssemblies/UnityEditor.StandardEvents.dll
- Finished compile Library/ScriptAssemblies/UnityEditor.StandardEvents.dll
Copying assembly from 'Temp/UnityEditor.StandardEvents.dll' to 'Library/ScriptAssemblies/UnityEditor.StandardEvents.dll' failed

(Filename: Library/ScriptAssemblies/UnityEditor.StandardEvents.dll Line: -1)

Build started. Default build options.
UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:Log(Object)
UiEditor.ExtraBuildOptions:GetDefault() (at Assets/Scripts/Editor/Build.cs:19)
UiEditor.Build:PerformLinuxBuild() (at Assets/Scripts/Editor/Build.cs:51)

(Filename: Assets/Scripts/Editor/Build.cs Line: 19)

Error building Player because scripts have compile errors in the editor

(Filename:  Line: -1)

DisplayProgressbar: 
Failed setting thread niceness (priority) to 0 due to EACCES (errno 13) violation. Lowering niceness (raising priority) requires CAP_SYS_NICE or superuser.

(Filename: /home/builduser/buildslave/unity/build/PlatformDependent/Linux/PlatformThread.cpp Line: 127)

Unloading 15 Unused Serialized files (Serialized files now loaded: 0)
System memory in use before: 80.8 MB.
System memory in use after: 80.9 MB.

Unloading 12 unused Assets to reduce memory usage. Loaded Objects now: 1053.
Total: 4.905000 ms (FindLiveObjects: 0.614000 ms CreateObjectMapping: 0.046000 ms MarkObjects: 4.145000 ms  DeleteObjects: 0.099000 ms)

Load scene 'Temp/__Backupscenes/0.backup' time: 0.027000 ms 
Unloading 0 Unused Serialized files (Serialized files now loaded: 0)
System memory in use before: 80.5 MB.
System memory in use after: 80.6 MB.

Unloading 0 unused Assets to reduce memory usage. Loaded Objects now: 1053.
Total: 4.549000 ms (FindLiveObjects: 0.579000 ms CreateObjectMapping: 0.027000 ms MarkObjects: 3.938000 ms  DeleteObjects: 0.005000 ms)

*** Cancelled 'Build.Player.LinuxStandaloneSupport' in 1 seconds (629 ms)

Batchmode quit successfully invoked - shutting down!
Refresh: detecting if any assets need to be imported or removed ...
Refresh: elapses 0.014025 seconds (Nothing changed)
Refresh completed in 0.014035 seconds.
Refresh: detecting if any assets need to be imported or removed ...
Refresh: elapses 0.014211 seconds (Nothing changed)
Refresh completed in 0.014221 seconds.
Setting up 2 worker threads for Enlighten.
  Thread -> id: 7fc6061db700 -> priority: 1 
  Thread -> id: 7fc6069dc700 -> priority: 1 
[Package Manager] Server::Kill -- Server was shutdown
Cleanup mono
Exiting batchmode successfully now!
niezbop commented 6 years ago

Hey @Premik and thanks for notifying this!

I feel like even though your issue is related to this now, it deserves its own issue. Could you please open it so we can track it properly?

Onto the issue itself, this is indeed some weird behaviour that need to be caught. I'll have a look at it at some point, but this batch will help when we have parsing tests backed by a log set!

By the way, if you ever find a fix for the regex but don't want to wait for the fix to be merged and released, you could take a look at this document which explains a bit better how our prettifier works and how you can override (fairly easily) its default logging rules!

Premik commented 6 years ago

Hi Paul, Thanks for the response. I know I could create my own logging rules and that is also why I didn't open a new ticket. This is not a bug in u3d but just configuration matter. My impression was you are collecting log-snippets here to be able to create more reasonable default rules.

What I meant by weird error was more an Unity bug. Since it says Compilation error but doesn't give any line number or any further details.