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. TheBeardPhantom

    Jan 07, 2019 14:10

    It has something to do with lighting. I’ve only had one project of mine have this issue.

  2. Novithian

    Jan 07, 2019 03:55

    To add on, this also happened on 2019.1.0a13.

    Found some more info as to where it happened:

    GetGfxDevice() should only be called from main thread

    (Filename: C:\buildslave\unity\build\Runtime/GfxDevice/GfxDevice.cpp Line: 145)

  3. Novithian

    Jan 07, 2019 03:54

    To add on, this also happened on 2019.1.0a13.

    Found some more info as to where it happened:

    GetGfxDevice() should only be called from main thread

    (Filename: C:\buildslave\unity\build\Runtime/GfxDevice/GfxDevice.cpp Line: 145)

  4. Novithian

    Jan 07, 2019 02:44

    Having the same exact issue on 2018.30b12. About half the time it happens outside of Play. The amount of times it crashes a day is way out of hand at this point..

    It's a Access Violation (0xc0000005), and here is my Stack Trace (Same as above):

    Stack Trace:
    0x000000014034D4DD (Unity) SharedObject<SharedMeshData,1,SharedObjectDeleteReleaseOp<SharedMeshData> >::Release
    0x00000001422009BA (Unity) GfxDeviceWorker::RunCommand
    0x00000001421F276D (Unity) GfxDeviceWorker::CallImmediate
    0x0000000142206440 (Unity) GfxDeviceWorker::RunCommand
    0x00000001422081AB (Unity) GfxDeviceWorker::RunExt
    0x00000001422082A4 (Unity) GfxDeviceWorker::RunGfxDeviceWorker
    0x0000000140A6E9B4 (Unity) Thread::RunThreadWrapper
    0x00007FFF9D243034 (KERNEL32) BaseThreadInitThunk
    0x00007FFF9D393691 (ntdll) RtlUserThreadStart

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.