Crash: Setting texture on GUI node (SOLVED)

#1

I am dynamically creating GUI nodes and setting their texture when I create them. If I set a texture that has been set previously (either in a manually created node, or a dynamically created one), the build crashes with the following error message:

Assertion failed: i < m_Count, file d:\a\defold\defold\engine\gamesys\build\default\proto\texture_set_ddf.h, line 128

However, the “steps to reproduce” I’ve listed above aren’t quite the full picture. For example, I wish to show a list of icons representing available actions. So I loop through a list of these and dynamically spawn nodes. That works fine (meaning I am setting a texture multiple times on different nodes). It even works when I delete these nodes and re-create them later. The problem arises when I try to create a different type of node - one showing which actions are in progress. Then, it crashes. We’re still talking box nodes with no meaningful difference to the first type.

It’s not an issue with the logic for the second type of node, because if I stop setting the texture of the first type, then the second type of node gets a texture with no issue.

I’d be happy to share my project if that helps.

0 Likes

#2

Yes, please share a small project where the crash can be reproduced. As part of our 2020 roadmap we’re on a mission to reduce engine crashes and we’d love to fix this!

0 Likes

#3

I have invited you to the repo.

To reproduce the issue: Click any character, then click on any of the action icons that pop up. The build should crash.

To stop the issue happening: Comment out line 338 in characters/character_menu.gui_script (or line 256 and 257).

0 Likes

#4

Yes, I’m able to reproduce it. We will look into it.

0 Likes

#5

This was solved in 1.2.169

2 Likes