stonstad
Topic Author
Posts: 54
Joined: 06 Jun 2016, 18:14

Unity Unresponsive

13 Mar 2019, 19:30

About 10% of time when I edit Noesis XAML external to Unity, and then return to Unity I find that Unity is unresponsive. It does not respond to mouse or keyboard interaction and I can't get it back. I have tried waiting long periods of time (5+ minutes) and I have also used a variety of methods (alt-tab, ctrl+d to show desktop, etc) to try to regain focus. Unity repaints but it does not respond to input. The only option I am left with is killing Unity from the task manager and then my XAML changes are recompiled on the next start of Unity. This has happened to me perhaps fifteen times since the behavior first started a few days ago. It happened with 2.2.0b6 and after upgrading, I am seeing it with rc1.

So that I can help file a bug that is actionable... Is there a log file that I should look in to provide more useful telemetry to you for development purposes? I am including a link to my editor_log file (https://bit.ly/2F9DAIl) Other than a XAML compile error I was working to resolve -- I'm not sure that I did anything crazy.

Tags:
 
User avatar
jsantos
Site Admin
Posts: 2347
Joined: 20 Jan 2012, 17:18
Contact:

Re: Unity Unresponsive

13 Mar 2019, 19:48

Yes, please, go to NoesisSettings panel and enable 'Debug Importer'. That should provide extra information that can help us. Thanks!
 
stonstad
Topic Author
Posts: 54
Joined: 06 Jun 2016, 18:14

Re: Unity Unresponsive

13 Mar 2019, 20:47

Done -- I'll report back once it happens.

FYI -- the Noesis XAML importer (and least in debug mode) does not respect the "Script Changes While Playing setting in Unity" setting, which I have set to "Recompile After Finished Playing".

Image

I have this disabled for my Unity project because I have static initializers which are not reentrant (see https://forum.unity.com/threads/static- ... or.615154/). While playback is happening -- if I edit XAML it seems to force recompilation which blows away state in my static initializers and causes quite a few runtime errors in my project. Although I noramly don't edit while playback is underway, maybe these two behaviors are related.
 
stonstad
Topic Author
Posts: 54
Joined: 06 Jun 2016, 18:14

Re: Unity Unresponsive

13 Mar 2019, 21:59

Link: https://bit.ly/2EXgu6r

This is where it stopped. Unity editor process says, "Not Responding" in task manager and CPU is 0%. So when I said input was disabled -- this is incorrect. This is with debug on, and verbose set to normal.
 
stonstad
Topic Author
Posts: 54
Joined: 06 Jun 2016, 18:14

Re: Unity Unresponsive

13 Mar 2019, 22:01

Also of note -- it happens FAR less often with debug on. Assuming that is a true statement (who knows...) it feels like a threading or race issue since it is a) random, and b) less frequent with increasing logging (i.e. longer duration between contentious method invocation...) I don't think this behavior is causing a crash dump.
 
User avatar
jsantos
Site Admin
Posts: 2347
Joined: 20 Jan 2012, 17:18
Contact:

Re: Unity Unresponsive

14 Mar 2019, 00:34

Thanks for the logs! Analyzing the last one you attached:
← Import assets
UnityEngine.DebugLogHandler:Internal_Log()
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:Log(Object)
NoesisPostprocessor:Log(String) (at Assets\NoesisGUI\Plugins\Editor\NoesisPostprocessor.cs:398)
NoesisPostprocessor:ImportAssets(String[], UpdateProgress) (at Assets\NoesisGUI\Plugins\Editor\NoesisPostprocessor.cs:91)
<>c__DisplayClass4_1:<OnPostprocessAllAssets>b__0() (at Assets\NoesisGUI\Plugins\Editor\NoesisPostprocessor.cs:107)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions() (at C:\buildslave\unity\build\Editor\Mono\EditorApplication.cs:200)
 
(Filename: Assets/NoesisGUI/Plugins/Editor/NoesisPostprocessor.cs Line: 398)

<RI> Initialized touch support.

Reloading assemblies for play mode.
Begin MonoManager ReloadAssembly
It seems that Noesis already finished importing everything and that the hang is happening when reloading Mono. If you attach a debugger to Unity when it is locked, can you see in which module is Unity stopped and tell me?
I have this disabled for my Unity project because I have static initializers which are not reentrant (see https://forum.unity.com/threads/static- ... or.615154/). While playback is happening -- if I edit XAML it seems to force recompilation which blows away state in my static initializers and causes quite a few runtime errors in my project. Although I noramly don't edit while playback is underway, maybe these two behaviors are related.
Effectively in the logs it seems that changes are happening while in Play mode. I am not sure how our AssetPostProcessor can change the way scripts are being imported because we only import XAML and Fonts. First time I know about that option, I will investigate about it.

Who is online

Users browsing this forum: No registered users and 2 guests