Spine draw order error: Assertion failed: size <= Capacity() (DEF-2702) (SOLVED)

#1

Greetings, lately i’ve encountered an interesting error:
Assertion failed: size <= Capacity(), file C:\buildbot\slave\builds\engine-win32-master\build\tmp\dynamo_home\sdk\include\dmsdk/dlib/array.h, line 437

If the error occurs right after saving the game localy, then after loading the game it pops up again and the game continues to crash until i delete my save. During the crash i’m creating an object with a spine models, adding some gui nodes and extra table values. However i’ve failed to pin point an exact moment the error occurs, sometimes it happens before creating everything and saving the file, sometimes after creating everything. My only guess is that i’m exceding some kind of table capacity. Anyone know a reason why this could be happening?

Tried replicating the crash on Android but couldnt. I guess this is an editor issue?

1 Like

#2

You have stumbled onto an engine bug for sure. You are indeed running out of resources, but the engine should let you know what is going on in a better message than that assert. You could inspect the web profiler to see if any counter is unreasonably high (a common mistake is to forget to delete everything you create through factories). Another thing you can try is spawning whatever your game is spawning, but more, to trigger the assert without saving/loading involved, and then remove one type of thing at a time to see when the assert stops firing.

4 Likes

#3

Thanks for the advice. Managed to track down the crash to certain animations of one spine model. It’s strange since the model was working fine a while ago. I guess i’ll have to look for specific things in the animation which could be causing this.

2 Likes

#4

Great, thanks, that should be enough info for us to track it down and fix it better.

1 Like

#5

Greetings, apparently, using Draw Order in spine was the cause for the crash. After removing Draw Order everything seems to work fine. I’m attaching the sprites for the model and 2 json files(one crashing and one working) in case you guys want to have a look at it.
one_with_nature.zip (724.4 KB)

4 Likes

#6

Thanks a lot, we really appreciate that!

1 Like

#7

Hi Rytis!

Found the issue, working on a fix, thanks for reporting! :slight_smile:

Updated thread title and added the issue id: DEF-2702

5 Likes

#8

Solved in Defold 1.2.104.

1 Like

#9

I’ve just got this error again. Seems random :expressionless:

Assertion failed: size <= Capacity(), file C:\buildbot\slave\builds\engine-win32-64-master\build\tmp\dynamo_home\sdk\include\dmsdk/dlib/array.h, line 437

0 Likes

#10

Did you get a crash dump you can share?

0 Likes

#11

No crash dump that I can find. The message appears in the console window.

0 Likes

#12

It should say in the console that it wrote to a crash log.

0 Likes

#13

It doesn’t. Just the assert:

0 Likes

#14

Do you know what you changed that triggered the engine to crash? I’m guessing it might not be a spine related thing this time.

The size <= Capacity() assert check can come from many different places in the engine so it would be nice to have a repro case. :+1:

1 Like

#15

I’m not using spine in my game. The error happens at random - simply re-running the game usually results in everything working normally. Will try to get a small example case project for you.

2 Likes