AlexHarker / FrameLib

A library for arbitrary-rate arbitrary-size frame processing
BSD 3-Clause "New" or "Revised" License
74 stars 9 forks source link

Insta crash when exporting a Max for Live device (fl.window) #52

Closed rconstanzo closed 4 years ago

rconstanzo commented 4 years ago

When I try to create a Max for Live device using Framelib I get an insta/hard crash after hitting 'Export Max for Live Device' in Max. This is 100% repeatable with my system using a current build (by @jamesb93).

Attached is the Max project that's causing the problem along with two crash reports.

project.zip

fl.window crash 2.txt fl.window crash.txt

rconstanzo commented 4 years ago

The device that does get built appears to work (still testing it). I did get this error in the Max console though:

method __fl.resolve_context called on invalid object

edit: also saw this in the console:

zgetfn (__fl.resolve_context): corrupt object

AlexHarker commented 4 years ago

Oh - this is a very exciting one, although given that you have some build that I didn't make can you find out which branch was built?

rconstanzo commented 4 years ago

@jamesb93 ?

I imagine it wasn't some bleeding edge one. He did mention some coefficients thing, but that that was further down the pipe.

AlexHarker commented 4 years ago

It's definitely not the master branch, because none of this happens on master - this is related to the code that figures out realtime/non-realtime and in this case I suspect that max might make a copy and then delete it so that when I defer execution of a function it no longer exists - there's hopefully a way to detect this happening and then not call the code that crashes, because it's being called on an object that doesn't exist or is corrupted (probably because it's been deleted).

jamesb93 commented 4 years ago

Sorry it was build from 05b2f60903646c7b560c5b4426436d2e9897a0ea on my master branch.

AlexHarker commented 4 years ago

This is fixed in a75fc897b4b588d31a06db6942598be8e11982c6, but there is an underlying issue covered in the post above. The network performs fine If outside of a poly~, but gets out of sync and crashes inside a poly~, likely due to incorrect audio object ordering.

rconstanzo commented 4 years ago

Still getting crashes with this on the latest build (confirmed it's the new version because fl.timemean~ has three inputs (as per @jamesb93 ). This is using the same exact patch/project linked above.

Granted, it is a spicy build from James, but attached is a crash report.

M4L crash.zip

jamesb93 commented 4 years ago

Well its entirely possible that https://github.com/AlexHarker/FrameLib/issues/66 fixed it. I'll update you to that commit.

rconstanzo commented 4 years ago

Just tested with that build and not getting a crash on build, but I do get this error again: zgetfn (__fl.resolve_context): corrupt object

The .amxd that gets built does appear to work (on my computer at least), but I do get this message (in white text) when I load the device: Graph Updated - realtime 1

AlexHarker commented 4 years ago

@rconstanzo - please do not report on builds that have not come from me. The branch James is compiling things is in progress, and I would rather provide you with a build where I know where things are at.

AlexHarker commented 4 years ago

@jamesb93 / @rconstanzo - the message that Rod is seeing "Graph Updated" is not possible on the latest in the branch (it was an old debugging message), so either Rod has two version present and Max isn't always getting the right one, or @jamesb93's build is merged incorrectly. The former is probably more likely.

I will try to provide a build to test the corrupt object problem when I can.

jamesb93 commented 4 years ago

That was my feeling. On the build I provided Rod I don't get this message.

rconstanzo commented 4 years ago

I am building a reputation for having a bunch of versions of stuff at the same time...

rconstanzo commented 3 years ago

Just tested with that build and not getting a crash on build, but I do get this error again: zgetfn (__fl.resolve_context): corrupt object

The .amxd that gets built does appear to work (on my computer at least), but I do get this message (in white text) when I load the device: Graph Updated - realtime 1

So testing with the latest version and although I get no crashes, I still get these exact errors.

On trying to freeze the M4L device I get:

Unable to add unsynced.fl.interval~! freeze complete

And then I get yellow text for this: method __fl.resolve_context called on invalid object

And when opening the device itself in a Max patch, still get: Graph Updated - realtime 1

This is on OSX 10.14.6 / Max 8.1.8

AlexHarker commented 3 years ago

I'm afraid you are not on the right version - that message is not in the source code anywhere now (Graph updated). You need to clear out old versions of objects from M4L projects and anywhere else they might be.

AlexHarker commented 3 years ago

Looks like this was resolved in #75