Skip to content

Conversation

@Houston4444
Copy link

catching a redondant AssertionError in RaySession: Houston4444/RaySession#269, I saw that, for a reason I ignore now, some ports are created and destroyed quickly by KDE Plasma under Wayland. These ports are not audio nor midi, they are of type 'other'. I am ok to find it strange, but I don't think that anything prevent this in JACK (here it is PipeWire).

So, the idea of this PR is to not display the error when a port has other type than _AUDIO or _MIDI, because it is not forbidden by the JACK API.

Another possibility would be to create another class OtherPort (and OwnOtherPort).

@mgeier
Copy link
Member

mgeier commented Nov 21, 2025

Thanks for this PR, and sorry for my late response.

I agree that this is a problem that should be solved, but I'm not sure if catching an AssertionError is the right thing to do.

An assertion happens only when there is a bug, and I see only two ways to proceed: Either the bug should be fixed (and the assert stays), or the assert should be removed (in this case, having the assert was the bug in the first place).

Catching an AssertionError didn't ever cross my mind, it seems wrong.

Creating an OtherPort and OwnOtherPort is an option, but is there something meaningful that could be done with it? What methods would it have?

Another option would probably be to create an UnknownPort (probably without any methods?) that's created whenever the type is unknown. Maybe an OwnUnknownPort is not needed, then.

What do you think about that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants