Search Issue Tracker

Fixed in 2018.3

Fixed in 2019.1

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 (43)

  1. D00447eed1657548f2ec1b58dd40ca16?d=mm

    Farage

    Jan 25, 2019 14:51

    have the same issue

  2. 63f587f1c9c4c41cabc56f919edb920e?d=mm

    AlexPryde

    Jan 25, 2019 11:51

    in 2018.3.2f1 i've got this error

  3. F64d63d2163ab8060047add8b867dfbf?d=mm

    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.

  4. F64d63d2163ab8060047add8b867dfbf?d=mm

    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.

  5. Cdf77520e470eeeeba7c38a45e8bd0c6?d=mm

    ctronc

    Jan 23, 2019 11:13

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

  6. E440e76dfa89d73163e55140b328cab4?d=mm

    Guideborn

    Jan 23, 2019 05:45

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

  7. E440e76dfa89d73163e55140b328cab4?d=mm

    Guideborn

    Jan 23, 2019 05:45

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

  8. C1adff0f832dacc30d1fbc9dc838e276?d=mm

    rrazcueta

    Jan 20, 2019 03:15

    I got this error again with Unity 2017.4.18f1 as well

  9. C1adff0f832dacc30d1fbc9dc838e276?d=mm

    rrazcueta

    Jan 20, 2019 03:13

    I got this error again with Unity 2017.4.18f1 as well

  10. C1adff0f832dacc30d1fbc9dc838e276?d=mm

    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.