Weird bug with cage.sdif.ptrack.toroll

Discussions, advice, bug reports and much more about the "cage" environment.
Post Reply
baskind
Posts: 8
Joined: Wed Nov 24, 2021 10:52 am

Weird bug with cage.sdif.ptrack.toroll

Post by baskind » Wed Dec 15, 2021 9:58 pm

Dear all,

As I am debugging a bigger project, I found a strange bug with cage.sdif.ptrack.toroll that I tried to isolate as well as possible. To summarize: for "some" sdif files, cage.sdif.ptrack.toroll outputs a void roll, unless "some other specific" sdif files are being sent to the object before, then cage.sdif.ptrack.toroll seems to work fine for every kind of sdif. It happened to me with several different sdif files, I was not able to find the logic of which information in the sdif creates the problem, and which information in the sdif solves it.

So: to reproduce it,
a/ open the patch below, and try to click on the first message box, which is a sdif-based llll.
=> I would expect cage.sdif.ptrack.toroll to output "roll [ [ 312.35829 [ 9617.30236 199.909299 1 ] ] ]"
=> but it outputs simply "roll []"

b/ then click on the second message box, which is another, slightly more complex sdif-based llll.
=> cage.sdif.ptrack.toroll outputs the correct information corresponding to the second sdif

c/ but then, click again on the first message box: cage.sdif.ptrack.toroll now provides the correct output

d/ another weird thing is that "unlocking" one instance of cage.sdif.ptrack.toroll by sending it the second sdif file allows ALL the instances of cage.sdif.ptrack.toroll to respond correctly to the first sdif file. I suspect the problem to come from the shared table in cage.sdif.ptrack.unpack since the table has a global name "table cage_sdif_ptrack_renumber_tbl", i.e. not specific to the instance with #0- for instance.

Best regards,

Alexis



<pre><code>
----------begin_max5_patcher----------
1142.3oc6XszbhiCD9L7qPwmIJ5okzbb2+Aas2xjJksQjnY.aW1x4wN07eea
IYXBARBahyV6g0T.1sZ0u0W2vOlOKqr4AaeF5KnKQyl8i4ylEIEHLa74YYaJ
dnZcQejsrplMar09rEo071G7Q5zsTV0T66c+kMPMWfIijKGJKWa6cKiKvGo1
V3qt0Uey0c1JexL3RXOHICKWfTlv8ZFlftZbG0Cab0qs9n0P2S3OkBvVyfeK
eaMB2xns1T9syohr.seNed3iEePumMsdOUqBe8Y597oz84Sk6SojX1Wq+r8e
1j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KuC9UbdWcgGT8
S3Qm34nYjSUOvwx2VQxIQSmfhnjIPQPQ5ID6lBMIeeJJUbTz1NVME0RPGvwl
u0jJqVDezUmdLd.MqydmaK+wR7rhN3bhGJYG5h1U1CAmOt0lk1t5AWj24AuC
TY7HYcA.p1Vjbj3I24+b9eK5CRyE
-----------end_max5_patcher-----------
</code></pre>

danieleghisi
Site Admin
Posts: 1349
Joined: Fri Dec 03, 2010 1:25 pm

Re: Weird bug with cage.sdif.ptrack.toroll

Post by danieleghisi » Fri Jan 21, 2022 5:56 pm

Thanks so much for spotting this bug and I'm sorry for the long delay in my answer.
A very sneaky one, indeed. I think I have an hotfix for it, you can find it here:

https://www.bachproject.net/download.ph ... 220121.zip

Can you tell me if by replacing the three abstraction in the zip file everything works properly?

Thanks,
Daniele

baskind
Posts: 8
Joined: Wed Nov 24, 2021 10:52 am

Re: Weird bug with cage.sdif.ptrack.toroll

Post by baskind » Fri Feb 11, 2022 9:08 am

Hi Daniele,

Thanks for working on this. I can confirm on my side that it seems to work well now!

All the best,

Alexis

agustinissidoro
Posts: 2
Joined: Mon Jun 27, 2022 11:52 pm

Re: Weird bug with cage.sdif.ptrack.toroll

Post by agustinissidoro » Tue Jun 28, 2022 12:03 am

I am having the same issue with the .peaks and .chord abstractions. I have replaced the patches from the .zip and work just fine! Would it be possible to fix the bug for the other modules? Thank you very much for your time!

danieleghisi
Site Admin
Posts: 1349
Joined: Fri Dec 03, 2010 1:25 pm

Re: Weird bug with cage.sdif.ptrack.toroll

Post by danieleghisi » Tue Jun 28, 2022 7:33 am

Hello, as far as I can tell, the same issue does not affect .chordseq./.peaks.
So perhaps it's a DIFFERENT one? Can you please post a minimal snippet showing the unwanted behavior? I will look into it.

Post Reply