hmm … I downloaded the demo patch you posted earlier in the thread (built with previous tcArpGen version) and it came up fine for me with the current tcArpGen version. No issues other than the rules file not being loaded because the path to our user folders are different
Are you able to create/save/restore new patches with the updated tcArpgen?
The quick answer is “apparently, yes”. I created one with Meander providing the Poly Ext Scale, and tcArpGen is picking up the scale fine. I don’t have tcArpGen generating an arp, etc. as I have not set everything up with polyphonic v/oct and gate from Meander. I will do that, but I am going to create some revisions from this patch so that if it crashes, I have a good restore point to go back to.
I’m not sure of your level of experience developing for VCV Rack, so please forgive me if you know all of this.
For Meander, I learned the hard way how necessary it it to code pre-emptively so that compatability issue crashes are not introduced as new features are added (and sometimes removed).
My key points are:
Always initialize all variables so that crashes will not happen on uninitialized variable usage.
in json todata and fromdata, make sure to handle missing tags gracefully. Check for null pointers before use.
Be very careful in adding and deleting parameter and port ID’s
in my iterative test patch, Rack crashes as soon as I connect a v/oct or Gate cable to tcArpGen V/OCT or Gate Poly In, regardless of where the cable is coming from. Have you changed the port IDs on either of these. perhaps? This happens regardless of which mode the poly scale input is in.
I took Meander out of the patch, just in case, but results are the same.
No, those port IDs have not changed. The only change related to ports and port IDs is the addition of the Note Order port that was added to the end of the inputs array so as not o disturb the other port numbers.
Curious to know if starting up a new project with only tcArpGen loaded (or very few modules loaded) and then connecting tcArpgen outputs to tcArpgen inputs shows the same crashing. If that works does it still crash when connecting the outputs from some other module to tcArpgen inputs?
I created a bare-bones patch with tcArpGen. When output is connected to input, the crash happens. Nothing is noted in the log. I created a bare-bare-bones patch and it crashes when output connected to input.
The only time I experienced a crash with cable attachments in Meander was when I changed up my code to detect cable attachments and detachments. Turns out I was accessing something associated with the cable before it was in the logical connected (or complete?) state. That was a CableWidget->isComplete() success before doing anything else on the cable.
Yes, similar. There is the possibility that those crashes were related to that well known and reputable sequencer that could crash when sequenced backwards and was an out of range or uninitialized array index issue.
I was able to reproduce the crash here a few times using a solo tcArpGen with its output connected to its input. It does not happen every time though so this feels like an uninitialized variable or stray pointer type of problem or possibly the port not fully ready race condition you mentioned.
I’m back to working with my existing tcArpGen patches, which now load and do not crash, but, it appears to me that there is a problem in the tcArpGen implementation of “Poly Ext Scale”.
In this patch, Meander is sending an A Aeolian (Am) Poly Ext Scale to tcArpGen which is set to Poly Ext Scale. This should be the scale “ABCDEFG” but tcArpGen is displaying “C#DEF#G#AB” and sounds bad as Meander and tcArpGen are playing from different scales.
Edit: Likewise, the Aaron Static ScaleCV Am scale shows incorrectly in tcArpGen with it set to “SortV/Oct”. Strangely, tcArpGen is displaying the same scale as in the image above when the Am scale is sent from ScaleCV, “C#DEF#G#AB”.
The ‘----’ in the upper right corner of tcArpGen and the red LED below it indicate that no rules file is loaded. Use the context menu (right-click > L-System Rules File) to load one of the provided rules files and you should then be getting some output from it.
Maybe tcArpGen should have a default rule set so that it at least does something when initially loaded … hmmm