Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flucoma/flucoma-max#368 hacky fix #25

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

fearn-e
Copy link
Member

@fearn-e fearn-e commented Aug 4, 2023

flucoma/flucoma-max#368

It does fix the issue, but it's also very brute force, as using clear() clears out everything in the object. A better solution might be to remove the specific layer that has disappeared and everything associated with it to try and preserve information in other layers.

There may also be further edge cases where this bug may appear, but I have checked all the functions where I believe it might arise and called checkalllayers() from where necessary.

Currently the error messsage it spits out doesn't tell you which buffer disappeared, as the name of it is already gone by the time the check is done: jsui: fluid.waveform~: buffer "[object Object]" no longer exists. Might be worth implementing something to remember buffers so that the error is more useful to the user.

@jamesb93

@jamesb93 jamesb93 added the bug Something isn't working label Aug 4, 2023
@jamesb93
Copy link
Member

jamesb93 commented Aug 4, 2023

Thanks for the PR. Your changes mitigate the issue, however, from a quick test it seems that you can still put fluid.waveform~ into a broken state by changing the buffer name and continuing to use the object.

<pre><code>
----------begin_max5_patcher----------
776.3ocwVtsbaBCDF9Z7SgFtpcFWFwYSeB56PSlLxvhibAIORBGmlI4Yu5.3
fSrmPhcZtwLZ8JI9+z+thGl44ujuCj9neh9Mxy6gYdd1Pl.d8i87aI6JaHRa
Z9k71Vfo7m69OErSYimDfjfBo3HBiqtEDnkc00fXHwZNSUSJASxg8wnU1oxW
t9GgQiSTR+qMwHb.tOLqqkxZ.kb7BnCx6TCQwiVAFo0tB9+BZ1BJZIYX82PT
k2RYqtQ.kJmxCyM6CJbg8QRRn4QTV.FcsYNONal4m4SjPL3NshdEfb33IzNz
RQm7VPFPn0CY4Tg59Mf6MxutgSzPVOMBakO55iPLr+zQSzoEeVVjUt3BKCBy
sih9fhuEjRxJ3Up+NxVnlKZQ6NojOpJSOpHiNpHCOsHKxbGvVo5Ns+vR7TU.
wKCP2QnJTC8O.JDqqGJ4rJ4bTcSGsJX.AOgJa.hPdEKtreFCkLOOIcnJj9ej
JhPIQxMjVs9Wg.gfKP8TVZJ2zSDomhj2rm5MTldU5XpwrZr0Iz+8WUcr5l3X
KVwt5lLqCxD6xx0.jRbuo6hxPf8NIxJBkg91AD46SrcyhuxtMNpkGcIZ1bJn
EEfDf40puMrwobkOYylFPdk+DoT9WHk5aKEF63Sd1mBlBCPlFr5hHpsXR20s
ZuCahTJ6q2KE65nUfOKH8l8tc1m2WC7nKSCbKO6qYJJNq92Gd+7VhXOwq3fj
pN4M2q4rUZ86dd+Yd8cb9E856vrjfTS4xm7028L384AJtjdfXmdwQmkPWK6n
SPD0zFXu83EWiGrdOFFetV7b4pPOSEHtQuDKafwE5S3L+MAQTVt4HOCmEjlk
hwKBwwKRxSwIluzQ2WHKun.GoGGmtHM8.LYEn86DdwG+a2MS7CYmj2IJGvS+
2kgv6wTEH02MSTTNaTNFTfN0wyT2nh+WaTzGaibjT2YbKHj8Ya2CseaMWXFV
L2NjxbCsd.eArkNjuKBQnOmU5C4NgyusKKw2MUdEHXZCqwVLynN8VZ8xFuo9
aCcBwZ4m83r+AjYtZ0K
-----------end_max5_patcher-----------
</code></pre>

image

It seems that after you perform stage 2 of this patch, it will forever remain broken. I don't have lots of time right now to look into this but you've gotten very far already figuring out how to mitigate the bug from breaking the object entirely. Can you look a bit deeper into how errors are reported if the user does destroy the original buffer reference?

@tremblap
Copy link
Member

Is there a way to write a PR as 'in progress and needs work' ? This is a work in progress I think and it would be great to have a place where such discussions could happen?

@fearn-e fearn-e marked this pull request as draft August 13, 2023 15:48
@fearn-e
Copy link
Member Author

fearn-e commented Aug 13, 2023

@tremblap thanks for the reminder, I've now set it to draft as the issue is a bit bigger in scope than I thought and I can't explore it further at the moment.

The last thing I attempted was calling the checkalllayers() function from the refresher function, however this broke the object further (not helpful).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants