> For the sake of this discussion, we only need to do three things:

[...snip...] removing lots of *symptom* investigation [...snip...]

You never get to the root cause here, which is removal of connections without 
undo recording in the first place.

> which we can summarize as the input/outputs of **Bus-1** are disconnected in 
> `bse_container_uncross_undoable` [1], due to this `bse_bus_disconnect` [2] 
> fails and finally the undo step is not recorded in `BusImpl::disconnect_bus` 
> [3]. The patch that I've proposed fixes this by ignoring the error code 
> Error::SOURCE_NO_SUCH_CONNECTION in [3]. Note that this doesn't irgnore all 
> possible errors, just specialcase the case that there was no connection.
> 
> > * Why should an undo step be recorded for restoring a connection that 
> > doesn't exist in the first place?
> 
> Because the connection did exist, but was removed in [1].

No, you're just looking at one possible way and one possible time to call a 
function, a connection did not *necessarily* exist previously, and only if it 
did would it be valid to record an undo step.

> > * Also, with your code, calling disconnect_bus() repeatedly will record 
> > more and more undo steps, for a connection that's not existing and could 
> > have been restored at most only once anyway.
> 
> Honestly, I don't know the answer to this. Maybe the fix should go somewhere 
> else, or if we want to keep this, we could add state to the bus that 
> indicates whether the bus is connected or not (independantly of whether or 
> not the channels are connected).

Thanks for tracing this down, a clear problem understanding is part of what's 
needed for a fix. As for the actual patch, we must make sure to only record 
undo steps when appropriate though like described earlier.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/tim-janik/beast/pull/82#issuecomment-434403855
_______________________________________________
beast mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/beast

Reply via email to