Removing asset that have a tag seems to fail?

This do not work for me! Will get a crash. The asset as a tag on it. In my case it’s a json with tag config. Loaded or unloaded, it does not make a difference.

var assetToRemove = app.assets.get(assetId);


remove: function (tag, item) {
			if (!this._index[tag])
			if (this._key) {
				if (!this._index[tag].keys[item[this._key]])
			`var ind = this._index[tag].indexOf(item);` ///crash here
			if (ind === -1)
			this._index[tag].list.splice(ind, 1);
			if (this._key)
				delete this._index[tag].keys[item[this._key]];
			if (this._index[tag].list.length === 0)
				delete this._index[tag];

Aha, I think I’ve stumbled on this bug a couple of years ago :smiley:

Thought it was fixed if we are talking about that same issue. Is it easy to provide a sample project that reproduces the issue? You can submit an issue about it in the engine repo.

In the meantime, removing that asset prior of removing the asset does it work for you?


Just tried it and trying to remove the tag before seems to crash as well. Will investigate. It crash on tags,remove()

I’ve submitted a bug report here:

Nevermind, it was fixed in this PR

It should go out with the next engine release early next week.