Search Issue Tracker

Fixed in 2018.3.X

Fixed in 2019.1.X

Votes

37

Found in

2018.3.0b7

2018.3.0f2

Issue ID

1110007

Regression

Yes

Editor throws "GetGfxDevice() should only be called from main thread" errors and eventually crashes when in Play Mode

Graphics - General

-

How to reproduce:
1. Open attached project "Breeze"
2. Enter Play Mode
3. Play the game for 2minutes
------------
Observe errors "GetGfxDevice() should only be called from main thread" spammed in the Console
-OR-
Observe the crash following the errors

Reproduced with: 2018.3.0b7, 2018.3.1f1, 2019.1.0a13
Does not reproduce with: 2018.3.0b6

Note: For 2019.1 Entering Play Mode is not needed to receive same error in Console

========== OUTPUTTING STACK TRACE ==================

0x000000014034D99D (Unity) SharedObject<SharedMeshData,1,SharedObjectDeleteReleaseOp<SharedMeshData> >::Release
0x0000000142203ADA (Unity) GfxDeviceWorker::RunCommand
0x000000014220B2CB (Unity) GfxDeviceWorker::RunExt
0x000000014220B3C4 (Unity) GfxDeviceWorker::RunGfxDeviceWorker
0x0000000140A6F094 (Unity) Thread::RunThreadWrapper
0x00007FFE0B3A1FE4 (KERNEL32) BaseThreadInitThunk
0x00007FFE0DF2CB81 (ntdll) RtlUserThreadStart

========== END OF STACKTRACE ===========

--------------------------------------
Update: fixed in 2019.2.0a6, 2019.1.0b5 and 2018.3.8f1

Comments (44)

  1. rrazcueta

    Jan 28, 2019 03:44

    If this was resolved in Unity2018.30b6 but broken in subsequent versions... how do we get notified if this gets resolved in the latest version of Unity?

  2. Farage

    Jan 25, 2019 14:51

    have the same issue

  3. AlexPryde

    Jan 25, 2019 11:51

    in 2018.3.2f1 i've got this error

  4. Gdwillis

    Jan 24, 2019 04:16

    I am using Unity 2018.3.0f2 and this bug is happening for me as well and the problem is also the "Cast Shadow" property in Sprite Renderer being set to on (which can only be seen in Debug Mode btw). This thread describes an easy way to reproduce this error:

    https://forum.unity.com/threads/case-1110540-getgfxdevice-should-only-be-called-from-main-thread.600064/

    My solution was to disable shadows in Project Settings/Quality since I have too many sprites and I am not sure which one's have cast shadows turned on. This solution works for me since I do not need shadows in my project. However, I can see this being a problem for those who do need to use shadows and I hope Unity fixes this issue soon.

  5. Gdwillis

    Jan 24, 2019 04:14

    I am using Unity 2018.3.0f2 and this bug is happening for me as well and the problem is also the "Cast Shadow" property in Sprite Renderer being set to on (which can only be seen in Debug Mode btw). This thread describes an easy way to reproduce this error:

    https://forum.unity.com/threads/case-1110540-getgfxdevice-should-only-be-called-from-main-thread.600064/

    My solution was to disable shadows in Project Settings/Quality since I have too many sprites and I am not sure which one's have cast shadows turned on. This solution works for me since I do not need shadows in my project. However, I can see this being a problem for those who do need to use shadows and I hope Unity fixes this issue soon.

  6. ctronc

    Jan 23, 2019 11:13

    Still happening on 2018.3.2f1, started as soon as I added a directional light and shadow casting.

  7. Guideborn

    Jan 23, 2019 05:45

    Can confirm this is being caused by sprites casting shadows. Can reproduce this constantly.

  8. Guideborn

    Jan 23, 2019 05:45

    Can confirm this is being caused by sprites casting shadows. Can reproduce this constantly.

  9. rrazcueta

    Jan 20, 2019 03:15

    I got this error again with Unity 2017.4.18f1 as well

  10. rrazcueta

    Jan 20, 2019 03:13

    I got this error again with Unity 2017.4.18f1 as well

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.