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

Stackoverflow error due to ordering of voice parameters #17

Open
NaniHo opened this issue Jul 5, 2023 · 8 comments
Open

Stackoverflow error due to ordering of voice parameters #17

NaniHo opened this issue Jul 5, 2023 · 8 comments
Assignees

Comments

@NaniHo
Copy link

NaniHo commented Jul 5, 2023

When I try to build a c++ application with the exported rnbo patcher, it throws a stackoverflow exception because it tries to sort the list of parameters. In my rnbo patcher there are 2 subpatchers, one with 37 voices, one with 48 voices and 37 input channels. Each subpatcher has 8 parameters (@exposevoiceparams 1 and @voicecontrol user). But RNBO sees many more parameters than what I expose. Upon inspection, I found that each of these 37 voices has 303 parameters, and each of the 48 voices has 391 parameters, making a total of about 30000 parameters. During the following quick sort recursion the stack overflow happens. If I reduce the number of voices from 37 to 1 and from 48 to 3 and the number of input channels to 1, the error no longer occurs.

@x37v
Copy link
Contributor

x37v commented Jul 5, 2023

@NaniHo hey, can you share your patch?

@NaniHo
Copy link
Author

NaniHo commented Jul 5, 2023 via email

@x37v
Copy link
Contributor

x37v commented Jul 5, 2023

Hi Alex, I sent it a few days ago for the previous issue. You'll find it attached. Best Nani Gesendet: Mittwoch, 05. Juli 2023 um 16:22 Uhr Von: "Alex Norman" @.> An: "Cycling74/rnbo.example.juce" @.> Cc: "NaniHo" @.>, "Mention" @.> Betreff: Re: [Cycling74/rnbo.example.juce] Stackoverflow error due to ordering of voice parameters (Issue #17) @NaniHo hey, can you share your patch? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

I don't see it in the isssue #14
I also don't see it here.. maybe the email approach doesn't work for attachments?

you could post it into this issue after "copy compressed" from max when you select the [rnbo~] box you're using to export.

@x37v x37v self-assigned this Jul 5, 2023
@NaniHo
Copy link
Author

NaniHo commented Jul 5, 2023 via email

@x37v
Copy link
Contributor

x37v commented Jul 5, 2023

... Sorry I wanted to transmit the data just to the support and not make them public. I send an email to the support.

ahh okay, @jinpavg (also named alex) just shared it with me, i'll look into this today

@x37v
Copy link
Contributor

x37v commented Jul 6, 2023

Upon inspection, I found that each of these 37 voices has 303 parameters, and each of the 48 voices has 391 parameters, making a total of 29979 parameters.

@NaniHo where did you find these numbers? the 303 and 391 ? when I export your patch as c++ I get 700 total parameters.. that doesn't mean there isn't still an issue, I'm just curious where your 29979 comes from

@NaniHo
Copy link
Author

NaniHo commented Jul 7, 2023

in the method listquicksort there are 29576 elements in arr resp. listindices. The question arrises where this high number of elements to be sorted comes from and why this sorting happens. I added screenshots where the numbers 303 and 391 occure.

params_303 params_391 30kParams

@x37v
Copy link
Contributor

x37v commented Jul 12, 2023

Hey @NaniHo
I am able to reproduce this crash, unfortunately it isn't a quick/easy fix, it is in the generated code itself

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

No branches or pull requests

2 participants