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

Crashes if given an OTIOZ #79

Closed
jminor opened this issue Oct 24, 2024 · 6 comments
Closed

Crashes if given an OTIOZ #79

jminor opened this issue Oct 24, 2024 · 6 comments
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@jminor
Copy link
Member

jminor commented Oct 24, 2024

If you launch raven with an OTIOZ, it crashes.

(base) ~⭐ raven ALab_OTIO/ALab_mk020_final_edit.mxf.relinked.otioz
LOG: Error loading "ALab_OTIO/ALab_mk020_final_edit.mxf.relinked.otioz": JSON parse error: JSON parse error on input string: Invalid value. (line 1, column 0)
2024-10-24 10:11:05.292 raven[2185:9649528] +[IMKClient subclass]: chose IMKClient_Legacy
2024-10-24 10:11:05.292 raven[2185:9649528] +[IMKInputSession subclass]: chose IMKInputSession_Legacy
zsh: segmentation fault  raven ALab_OTIO/ALab_mk020_final_edit.mxf.relinked.otioz
@jminor jminor added bug Something isn't working help wanted Extra attention is needed good first issue Good for newcomers labels Oct 24, 2024
@jminor
Copy link
Member Author

jminor commented Oct 24, 2024

At bare minimum, it should report a better error message and exit without crashing. Of course, it would be even better, if it could read the OTIO inside the OTIOZ.

@ThomasWilshaw
Copy link
Contributor

I know the OTIO Python API can open OTIOZ files but am I right in thinking the cpp API can't? Is that something that needs to be added there or would you rather it was implemented in Raven?

@jminor
Copy link
Member Author

jminor commented Nov 8, 2024

There was some recent discussion on this topic here: https://academysoftwarefdn.slack.com/archives/CMQ9J4BQC/p1729878665473649

It would be great if the core OTIO C++ SDK had support for OTIOZ, but it currently doesn't. Maybe we could implement this in Raven just to see what minimal API is needed, and then port that into the OTIO core? From the Slack thread linked above, it seems like there are several candidates for which ZIP archive library to use.

@ThomasWilshaw
Copy link
Contributor

Thanks for the link, as you say there seems to be various options. Given OCIO uses minizip-ng that would seem a sensible place to start? I suppose Raven would only want to extract the OTIO file and avoid having to extract the entire archive, whereas OTIO itself would maybe want two finctions, extract_otio_from_otioz and unzip_otioz?

Some possibly useful links for reference:

OCIO zip implementation
minizip-ng extract single file example

@jminor
Copy link
Member Author

jminor commented Nov 10, 2024

You're right that Raven only needs to read the content.otio from the OTIOZ, not the media. Ideally it would read it directly into memory without needing to write anything to disk.

Here's a first attempt: #85

@ThomasWilshaw I'd love a code review and/or testing of that PR if you've got the time.

@jminor
Copy link
Member Author

jminor commented Nov 18, 2024

Fixed in #85

@jminor jminor closed this as completed Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants