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

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!

Hi!
I think you can track this issue: Unity Issue Tracker - Crash on `anonymous namespace'::TryNamingFBOFromAttachments after leaving the editor idle for a few hours

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?

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

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

D3D11: Failed to create render texture primary RTV (error 0x887c0003)

@DEEnvironment please report this, it’s a different bug.

found again in Unity 2021.2.08 standard pipeline
x64
windows 10 21H2

Did you report it? :slight_smile:

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

No, I mean the previous one

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

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.

8096672--1047863--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.

It would be great if you could submit a bug report.

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.

Same thing with Unity 2021.3 running on Windows 11

1 Like

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

1 Like

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

Also in Unity 2021.3.21 in a builld game, but random.

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.

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.