Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Resource ID out of range in GetResource: 1048576 (max is 1048575) on Linux

Discussion in 'General Graphics' started by canuszczyk, Oct 23, 2020.

  1. canuszczyk

    canuszczyk

    Joined:
    Aug 8, 2016
    Posts:
    2
    I have a scene that is crashing the application after 3 to 3.5 hours with the above message.

    I've seen other references to the RenderTexture.GetTemporary() causing issues if you don't use ReleaseTemporary. However, I am not using that call at all.

    The fact that it takes hours to fail is not helping. Is there a way to measure the # of resource id's grabbed so far to help shorten this timeframe somewhat?

    I've used the profiler and I don't see anything obvious.

    Anything I might try to locate this?

    Thanks!
     
  2. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,845
  3. canuszczyk

    canuszczyk

    Joined:
    Aug 8, 2016
    Posts:
    2
    Close I suppose. However, the application was not running in the Editor. We found a camera that was using a culling mask layer. However, no objects were assigned to that layer. We deleted the camera and have had no more problems.

    With that said, I do believe that the camera's clear flag was set to Don't Clear.

    Is there anyway to measure when this (whatever "this" is) is occuring?
     
  4. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,845
    We identified a leak in our GL backend and fixed it.
    I don't think there's a way to find out if this is happening from C#.
     
  5. DEEnvironment

    DEEnvironment

    Joined:
    Dec 30, 2018
    Posts:
    436

    Code (CSharp):
    1. Resource ID out of range in GetResource: 1069379 (max is 1048575)
    found in Unity 2019.4.28 standard pipeline
    x64
    windows 10 21H1

    also related

    Code (CSharp):
    1. D3D11: Failed to create render texture primary RTV (error 0x887c0003)
     
  6. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,845
  7. DEEnvironment

    DEEnvironment

    Joined:
    Dec 30, 2018
    Posts:
    436
    found again in Unity 2021.2.08 standard pipeline
    x64
    windows 10 21H2
     
  8. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,845
    Did you report it? :)
     
  9. DEEnvironment

    DEEnvironment

    Joined:
    Dec 30, 2018
    Posts:
    436
    not yet
    i am checking with amplify dev later a i find it when the editor window is opened then zoom out far

    2021.2.8 api URP 12.1.3
     
  10. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,845
    No, I mean the previous one
     
  11. DEEnvironment

    DEEnvironment

    Joined:
    Dec 30, 2018
    Posts:
    436
    sorry i was not able to make a repo to reproduce it
    it was intermittent

    i have since move up to a workflow in 2019.4.31 and not found again
     
  12. TheCelt

    TheCelt

    Joined:
    Feb 27, 2013
    Posts:
    721

    Hi i just started getting this as well and it is related to job system, or burst compiler or the use of native containers etc - basically something DOTS related. Since thats when it started happening for me in version 2021.3.1f1

    I am on windows 10.

    I am disposing all the data - got no warnings that something has not been disposed, the jobs all work correctly too. But if i leave everything idle for a few minutes hundreds of these messages appear in my console log.

    upload_2022-5-3_0-24-7.png

    It only stops once i close the editor and re-open it.

    Whats more strange is its talking about GFX stuff but my project hasn't touched anything to do with graphics, I have only been playing around with jobs and burst.
     
    Last edited: May 3, 2022
  13. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,845
    It would be great if you could submit a bug report.
     
  14. TheCelt

    TheCelt

    Joined:
    Feb 27, 2013
    Posts:
    721
    I have since fixed it, it turns out to be related to Gizmos DrawMesh in my case. Once i commented that line out I never had the bug appear again. Now i just use an actual mesh to display triangulation output.
     
  15. JotaRata

    JotaRata

    Joined:
    Dec 8, 2014
    Posts:
    61
    Same thing with Unity 2021.3 running on Windows 11
     
    lacas8282 likes this.
  16. er0d

    er0d

    Joined:
    Nov 8, 2017
    Posts:
    20
    Hi.
    I got the same problem with Unity 2021.3.0f1.

    After approx 1h the game is running, I got thousands of errors :
    "Resource ID out of range in SetResource: 1048577 (max is 1048575)"

    Nothing relevant in log files.

    In my project, I heavily use ECS/DOTS.
    It's a 2D project with a Graphics.DrawMeshInstanced() call in the update of my rendering ComponentSystem
     
    lacas8282 likes this.
  17. lacas8282

    lacas8282

    Joined:
    Apr 25, 2015
    Posts:
    102
    I got this today, win 11 with unity 2021.3.16f1 a lot of hours developing after
    Got a lot of:

    Resource ID out of range in GetResource: 1050670 (max is 1048575)

    and the scene just blinking (black scene to normal scene)

    after the restart it is good again
     
  18. Mafutta

    Mafutta

    Joined:
    Sep 30, 2014
    Posts:
    45
    Also in Unity 2021.3.21 in a builld game, but random.
     
  19. Oranger97

    Oranger97

    Joined:
    Oct 4, 2021
    Posts:
    1
    Unity 2021.3.27f1 on mac, getting the same error, also occurring after a couple hours of running the game. It also immediately occurs if I exit play mode and reenter play mode.

    I see a couple other people mentioning indirect functions that create meshes so I'll tack on that for my script that seems to cause the error, I was creating a mesh object, creating then setting its lists of vertices, normals, and triangles, then assigning it to a MeshFilter and MeshCollider (in Update, per object). Everything else in the function is vector math and trig.

    My bandaid solution is to minimize calling the function.
     
  20. Bethsheba_Ashe

    Bethsheba_Ashe

    Joined:
    Feb 11, 2022
    Posts:
    13
    Unity 2021.3.29f1 Windows. Using URP. Leave the editor for a few hours to attend to something and come back to find this happening. I'm not running the game, this is just the editor. I don't know what's causing it, or how to fix it. I only have one camera.