ossia / libossia

A modern C++, cross-environment distributed object model for creative coding and interaction scoring
https://ossia.io
GNU Lesser General Public License v3.0
204 stars 33 forks source link

[ossia-max] crash with nested parameters and remotes #792

Closed evanmtp closed 1 year ago

evanmtp commented 2 years ago

I've been getting a crash recently involving a patch with a number of models and views (wrapped together as modules, in the old Jamoma style). The models are a bit complex, so I tried to trace the problem by deleting sections, reopening the patch and seeing if it still crashed. I think I've traced it to a couple of parameters in the model that are inside of a subpatcher, as well as the corresponding remotes in the view that are also nested in a subpatcher.

Here's the crash report:

https://gist.github.com/evanmtp/6f58b243404ee3f350732a1d78ca71de

And here are the test files:

test.zip

Steps to reproduce:

  1. Open _start.maxpat .

I tried simplifying _start.maxpat to make debugging easier, e.g. by deleting duplicates of the module as well as all other objects. I noticed a couple of things in this process:

  1. With the current version of _start.maxpat, Max crashes as soon as the patch is opened. When I tried a version of _start.maxpat containing fewer instances of the model, the crash would only happen when I closed the patch.
  2. With the current version of _start.maxpat, macOS tends to produce an error report consistently, whereas with the simplified version, clicking "Report..." wouldn't bring anything up.
  3. With the simplified version, sometimes opening and closing the patcher several times would lead to the crash.
jcelerier commented 2 years ago

Arf I don't have my mac around this week... @avilleret do you have some time for checking this one ?

avilleret commented 2 years ago

I can reproduce it, I'll try to fix it

jcelerier commented 1 year ago

i think i got it, will push soon

jcelerier commented 1 year ago

I think we can close this one :)