Jassertfalse at line 255 in traction_SelectionManager.cpp

I am hitting the jassertfalse at line 255 in traction_SelectionManager.cpp on develop branch, and I can’t figure out why.

I’m simply selecting clips or tracks in the following manner;

	if (event.mods.isLeftButtonDown())
	{
		if (editViewState.selectionManager.isSelected(clipPtr.get()))
			editViewState.selectionManager.deselect(clipPtr.get());
		else
			editViewState.selectionManager.select(clipPtr.get(), true);

		repaint();
	}

As soon as I click on a clip, the jassertfalse fires.

And, of course, everything works fine in release mode.

Where can I look to resolve this?

Is asserting because you haven’t provided a SelectableClass for the the class that is being selected.

If you don’t want to use SelectableClasss, we should detect that and then not assert. I’ll look into it and see what’s going wrong.

I’m having the same issue. How would I provide a SelectableClass? I’m just giving pointer to tracktion_engine::Clip to select.

If you take a look at tracktion_SelectableClass.h you’ll see the interface you need to create for each type of class you want to be able to select.

Once you have a subclass implemented for each type of Selectable you want to select, you can register it globally with the macro DECLARE_SELECTABLE_CLASS. E.g.

class WaveAudioClipSelectableClass : public SelectableClass
{
public:
    // Implement the methods you need
};

DECLARE_SELECTABLE_CLASS (WaveAudioClip)

But as @G-Mon says, I think we just need to avoid the assertion in your case?

Yes, can we have it ignore the need for SelectableClass if the implementation does not use them?

Thank you.

1 Like