Search Unity

Bug Bug #1344355: Maximum allowed thread group count is 65535. (Easy to reproduce)

Discussion in 'High Definition Render Pipeline' started by dgoyette, Mar 19, 2021.

  1. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,196
    This is still an error I'm seeing in production on Mac hardware. It seems like it might only occur at very high resolutions, but I don't have a huge monitor to test this on.

    Below are the specs of the user who experienced this crash. I'm assuming they had a 5k monitor connected. Does HDRP not support resolutions that high on a Mac? Is there some known cause of this I can avoid?

    There was some mention of this in a thread from last October, which suggested that it wasn't fully understood, but that at least a leading cause of the issue was being fixed. What is the current status of these crashes?

    DeviceModel
    Macmini9,1

    DeviceType
    Desktop

    DPI
    186

    GraphicsDeviceName
    Apple M1

    GraphicsDeviceType
    Metal

    GraphicsDeviceVendor
    Apple

    GraphicsDeviceVersion
    Metal

    GraphicsMemorySize
    5461

    InstallerName
    InstallMode
    Unknown

    IsEditor
    False

    IsFullScreen
    True

    OperatingSystem
    Mac OS X 10.16.0

    OperatingSystemFamily
    MacOSX

    Orientation
    Portrait

    Platform
    OSXPlayer

    QualityLevel
    Ultra

    ResolutionWidth
    5120

    ResolutionHeight
    2880

    ResolutionRefreshRate
    60
    SystemMemorySize
    8192

    TargetFrameRate
    -1

    UnityVersion
    2019.4.22f1

    Version
    0.7.1-beta

    Source
    Unity

    IUserReportingPlatform
    UnityUserReportingPlatform

    UserReportingClientVersion
    2.0

    ActiveSceneName
    BootstrapperScene

    MainCameraName
    Main Camera

    MainCameraPosition
    (0.0, 1.0, -10.0)

    MainCameraForward
    (0.0, 0.0, 1.0)

    ContentLength
    36508

    Expires
    06/17/2021 14:09:48
     
  2. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,196
    This is still occurring under HDRP 7.6.0.

    Here are the specs for the system in question this time:

    Code (CSharp):
    1. BuildGUID
    2. 4f40c894ba055457f9eff5f2a1a831a4
    3.  
    4. DeviceModel
    5. iMac15,1
    6.  
    7. DeviceType
    8. Desktop
    9.  
    10. DeviceUniqueIdentifier
    11. B2CDB67E-D131-5958-911F-F4363AAD9688
    12.  
    13. DPI
    14. 217
    15.  
    16. GraphicsDeviceName
    17. AMD Radeon R9 M290X
    18.  
    19. GraphicsDeviceType
    20. Metal
    21.  
    22. GraphicsDeviceVendor
    23. Apple
    24.  
    25. GraphicsDeviceVersion
    26. Metal
    27.  
    28. GraphicsMemorySize
    29. 2048
    30.  
    31. InstallerName
    32. InstallMode
    33. Unknown
    34.  
    35. IsEditor
    36. False
    37.  
    38. IsFullScreen
    39. True
    40.  
    41. OperatingSystem
    42. Mac OS X 10.16.0
    43.  
    44. OperatingSystemFamily
    45. MacOSX
    46.  
    47. Orientation
    48. Portrait
    49.  
    50. Platform
    51. OSXPlayer
    52.  
    53. QualityLevel
    54. Ultra
    55.  
    56. ResolutionWidth
    57. 5120
    58.  
    59. ResolutionHeight
    60. 2880
    61.  
    62. ResolutionRefreshRate
    63. 60
    64.  
    65. SystemLanguage
    66. English
    67.  
    68. SystemMemorySize
    69. 8192
    70.  
    71. TargetFrameRate
    72. -1
    73.  
    74. UnityVersion
    75. 2019.4.22f1
    76.  
    77. Version
    78. 0.7.3-f2-beta-demo
    79.  
    80. Source
    81. Unity
    82.  
    83. IUserReportingPlatform
    84. UnityUserReportingPlatform
    85.  
    86. UserReportingClientVersion
    87. 2.0
    88.  
    89. ActiveSceneName
    90. BootstrapperScene
    91.  
    92. MainCameraName
    93. Main Camera
    94.  
    95. MainCameraPosition
    96. (0.0, 1.0, -10.0)
    97.  
    98. MainCameraForward
    99. (0.0, 0.0, 1.0)
    100.  
    101. ContentLength
    102. 35313
    103.  
    104. Expires
    105. 08/06/2021 04:35:29
    106.  
    107. GeoCountry
    108. US
    Is this a known issue? I don't have the hardware this occurred it, it was reported by Unity's crash reporting.
     
  3. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,196
    I got another crash report today from a user for this same issue. This time, instead of an iMac, it's a MacMini. This is the first time I've seen this occurring on a MacMini.

    Details:

    Metadata
    BuildGUID
    4f40c894ba055457f9eff5f2a1a831a4

    DeviceModel
    Macmini9,1

    DeviceType
    Desktop

    DeviceUniqueIdentifier
    CC71767C-E286-5DDE-B4F1-B163D3B993E5

    DPI
    217

    GraphicsDeviceName
    Apple M1

    GraphicsDeviceType
    Metal

    GraphicsDeviceVendor
    Apple

    GraphicsDeviceVersion
    Metal

    GraphicsMemorySize
    5461

    InstallerName


    InstallMode
    Unknown

    IsEditor
    False

    IsFullScreen
    True

    OperatingSystem
    Mac OS X 10.16.0

    OperatingSystemFamily
    MacOSX

    Orientation
    Portrait

    Platform
    OSXPlayer

    QualityLevel
    Ultra

    ResolutionWidth
    5120

    ResolutionHeight
    2880

    ResolutionRefreshRate
    60

    SystemLanguage
    English

    SystemMemorySize
    8192

    TargetFrameRate
    -1

    UnityVersion
    2019.4.22f1

    Version
    0.7.3-f2-beta-demo

    Source
    Unity

    IUserReportingPlatform
    UnityUserReportingPlatform

    UserReportingClientVersion
    2.0

    ActiveSceneName
    BootstrapperScene

    MainCameraName
    Main Camera

    MainCameraPosition
    (0.0, 1.0, -10.0)

    MainCameraForward
    (0.0, 0.0, 1.0)

    ContentLength
    32269

    Expires
    09/20/2021 13:51:34

    Again, this is a crash that occurs the first frame that game is active.

    I've formally reported this as bug #1344355. However, I'm confident that this bug will never make it past QA, since QA pretty much insists that a repro project be attached to any bug issues before they glance at it. In this case, these are crashes I only see occurring on Mac hardware at 5K resolutions. I can't try to reproduce this since I don't have a 5K display to test on.

    @SebLagarde , is this already a known issue, so I can stop worrying about it? Is it based on some known configuration I can change?
     
  4. francescoc_unity

    francescoc_unity

    Unity Technologies

    Joined:
    Sep 19, 2018
    Posts:
    193
  5. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,196
    I wouldn't have expected that setting the resolution higher than the display's max resolution was even an option. But that's interesting, and I'll try it out.

    I'm on 7.6 now, so we'll see if that helps.

    I also added some code to my game, for now, that caps resolution at somewhere between 4 and 5k, just to avoid having people stumble upon this. But since I don't have a 5K Mac display, I don't know if/when I'll be able to confirm if that actually matters.
     
  6. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,196
    I received another crash report on this today, on a build running HDRP 7.6.0. So, whatever changes were recently made to address the '65535' issue still have some failure modes.

    In my previous post I mentioned I added some code to hopefully avoid this error, by forcing a resolution change at startup if the resolution was higher than ~4K. Unfortunately, that doesn't work. This error occurs on frame 0 of the first scene I load. The first scene is empty, aside from a canvas with a single black image in it. With the error occurring on frame 0, it crashes before any of my own code even runs, which means my resolution change code doesn't run before the crash.
     
  7. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,196
    I reported this as bug #1344355, and it's very simple to reproduce. Basically, create a brand new HDRP project. Go to the Game View, and create a new Resolution preset at 5120x2880 resolution. Now create a new scene, and open it. You should start seeing the error in the console:

    "Thread group count is above the maximum allowed limit. Maximum allowed thread group count is 65535."

    From here, you can enter and exit play mode to see the error repeated several times each time you do this.

    This just seems to be an issue with HDRP now behaving properly at very high screen resolutions. The huge problem with this is that Macs often default to 5K resolution, so Mac users can easily get this error to occur before anything can even be done to attempt to lower the screen resolution.

    It's worth noting that I've tried the same thing on 2021.2 Beta, and the error does not occur. But it's very easy to reproduce under the latest version of 2019.4 LTS.
     
  8. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,196