-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
ofParameterGroup with sub-groups causes crashes #2674
Comments
the parameter group doesn't behave as ofParameter which always does a shallow copy so you can't create an instance in the stack and pass it to for example another group or a gui, you need to create it in the .h this is probably inconsistent and should behave the same as ofParameter |
Got it. The ability to create them dynamically would be nice as I am trying to create a system where one app is using ofParameter to save it's current state, publishing to an XML file and serving it via an ofxAddon. A second app can connect to it, read the xml file, convert it to ofParameters, build a GUI and use ofParameter OSC sync to control the first app. |
i'm testing this and it's working for me without problem, my first comment was wrong, actually ofParameterGroup does shallow copy the same as ofParameter, i'm checking the history and there's no changes to the file since 8 months ago so not sure what's the problem, can you check again to see if it's still nor working for you? |
… ofPtr to shared_ptr. Closes openframeworks#2674
@arturoc this is breaking ofxGui Problem: Which is using ofAbstractParameter (which is now no longer in the add(..) for ofParameterGroup) |
thanks, it's fixed now, let me know if it's still a problem somewhere else |
Adding a nested ofParameterGroup will cause strangeness(duplicate groups) and crashes with used with an ofBaseSerializer or ofParameterGroup::toString
It is hard to explain without running the code but using traditional pointers yields the expected results. To me this lends itself to something falling out of scope/reference counting with ofPtr
I've narrowed it down to these two examples (also here https://gist.github.com/jvcleave/7366381)
Inside the loop it
mainGroup.toString()
print outOutside the loop
mainGroup.toString()
will crash with the backtraceUsing a traditional pointer allows it to work as expected
This prints
The text was updated successfully, but these errors were encountered: