uDesktopDuplication
uDesktopDuplication copied to clipboard
Unity editor Crash
Greetings,
first of all thank very much you for sharing uDesktopDuplication. I cannot manage to use this asset. Whenever I hit play on Unity, the editor freezes and after a while crashes. I have Windows 8.1, Intel i7 6800, geforce 980 and I have tried on Unity 5.5.0f3 and 5.4.3f1.
Also, after the first crash Unity 5.5 decreased all the editor fonts (very strange behaviour).
Many thanks in advance.
Thanks for the reporting. Could you give me uDesktopDuplication.log? It is output in the same directory as Assets directory.
Hi Hecomi, Thanks for the Package. I crashed in editor almost every time i ended playmode. attatched if my uDesktopDuplication log and error log. uDesktopDuplication.log error.log
I have encountered a similar issue on Windows 8.1 with a GTX 1080 in Unity 2018.1.1f1. Hitting play in the editor with any of the example scenes causes Unity to freeze. I have to close and reopen it. I also encounter this freezing issue in player builds of another application.
In an attempt to track down the issue, I have tried out older versions. With v1.4.2 it still works. With the commit f6ce875463fe6da3c8e15510dc1fdac2fd3f0700 right afterwards it still works. Starting with 741e2c0bc1b792c19ce707f692358e84dcdc65c6 I encounter these freezes.
Here is my uDesktopDuplication.log file:
[uDD::Log][2018-11-24 18:07:48] Start
[uDD::Log][2018-11-24 18:07:48] Monitor::Initialize() => OK.
[uDD::Log][2018-11-24 18:07:48] ID : 0
[uDD::Log][2018-11-24 18:07:48] Size : (1920, 1080)
[uDD::Log][2018-11-24 18:07:48] DPI : (91, 91)
[uDD::Log][2018-11-24 18:07:48] Rot : Landscape
[uDD::Log][2018-11-24 18:07:54] Stop
There is no error.log.
Thanks for providing very helpful information! I'll check the commit 741e2c0bc1b792c19ce707f692358e84dcdc65c6.
I was not able to generate the freeze in my environment..., so if possible, could you try the debug like below in your environment?
- Download the repository (https://github.com/hecomi/uDesktopDuplication/archive/master.zip).
- Unzip it.
- Open the project by Unity.
- Open
uDesktopDuplication/Plugins/uDesktopDuplication.sln
by Visual Studio. - Open the "Attach to Process" window in VS (Fig. 1)
- Find Unity which opens the project (Fig. 2)
- Press "Attach" button
- Press the run (▶) button in Unity.
If No. 8 causes a breakpoint, please tell me the line number of it. Otherwise, please press the pause button in VS to pause the process manually, and let me know the line where the freeze occurs.
Fig. 1
Fig. 2
Thank you very much for the detailed instructions!
I followed them step by step. However, the debugger did not stop at a breakpoint or exception and pausing did not give any useful results. Depending on when I pressed pause, it would be in the Mono garbage collector or ntdll.dll
. Here are some example call stacks.
It seems execution does not completely freeze. The Unity window remains completely unresponsive, although the mouse cursor still changes when right clicking in the scene view. 'Profiler' and 'Stats' do not update.
One thing that might help is that I got a lot of output in Visual Studio's 'Output' window. While Unity appears frozen, the final assertion failure message keeps repeating.
I also tried building the DLL myself and copying it and the pdb file to the assets directory. The output looked pretty much the same.
In comparison, when pressing play in an empty scene, everything works as expected and there is no further output in the debugger after what is line 38 in the gist:
Load scene 'Temp/__Backupscenes/0.backup' time: 0.362400 ms
Another thing I have noticed is that Update() keeps getting called. Apparently Unity is still running, it just becomes unable to update the screen or process user input other than closing the window.
Thank you very much for the detailed report. They are very helpful but I've not been able to find any solution yet..., so I'll create a new unitypackage that includes debug version of DLL with various log outputs.
I released v1.5.7 a few minutes ago which outputs debug logs. Could you run the debug version (uDesktopDuplication-v1.5.7-debug.unitypackage
) in your environment and give me uDekstopDuplication.log
when you have a time?
Thank you for keeping up trying to solve this strange issue! I've run the debug build now. Since the log got very long, I cut out the middle, but kept the first few seconds and last second before closing Unity.
https://gist.github.com/emilianavt/cfaaa0380301b2ab387e293b1c52753f
The main odd thing I see is that it apparently detected a second graphics card with a dummy driver.
Thanks for providing the log!
Microsoft Basic Render Driver
is detected also in my environment. So I think this is not related to this bug.
The C++ side seemed to work without any error..., and some lines like Monitor::Render
said that some APIs were successfully called from the Unity side. So I'm now thinking it's the best way to run the same steps as https://github.com/hecomi/uDesktopDuplication/commit/f6ce875463fe6da3c8e15510dc1fdac2fd3f0700 and check the difference between the current code and it. I'll prepare a version that includes this so please give me more time to do it.