libossia
libossia copied to clipboard
[ossia-max] hang when closing and reopening patcher
Found this one while testing in relation to #792 . Sometimes when closing and reopening a patcher with ossia objects, Max hangs indefinitely. Force quitting leads to a report with a ton of lines like this:
11 ossia::max_binding::register_children_in_patcher_recursively(object*, ossia::max_binding::object_base*) + 761 (libossia-max.dylib + 5710345) [0x133f5d209] 1-11
Example report here:
https://gist.github.com/evanmtp/e214f13f71b84803936258af986abb20
Test files: hangtest.zip
Steps to reproduce:
- Open _hangtest.maxpat
- Close _hangtest.maxpat
- Repeat 1 and 2 until Max hangs (usually 5-10 times is sufficient)
I confirm I can reproduce this hang.
according to report, it loops indefinitely in register_children_in_patcher_recursively
I'm wondering about the code there : what would you think about:
1/ Making a list of all the subpatchers in a std::vector 2/ applying the operations on that vector in a for-loop ?
Would that break the algorithm too much ?
I think it is worth refactoring this algo again in light of what we've learned since