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

SIGBUS Crash occurred when stream search with special MXF(SONY F55RAW) #450

Closed
KengoSawa2 opened this issue Nov 5, 2018 · 6 comments
Closed

Comments

@KengoSawa2
Copy link
Contributor

Hello.

I love PyAV. Thank you for a wonderful library:)

I found a problem.
If you open a special MXF with PyAV, SIGBUS will occur.

As far as I've seen, it seems that some function becomes an infinite loop and destroys the stack frame.
The problem data and reproduction code, Mac crash report data are summarized below.
https://lespa.firestorage.jp/download/f80da205bc2e84ae0cb6e17f2025db6684484c9c

I am glad that this problem is solved.
(I am making software to search all folders and create a shotlist)
Thank you.

Environment:
PyAV 6.0.0
macOS 10.11.6
ffmpeg 4.0.2
Python3.4

@jlaine
Copy link
Collaborator

jlaine commented Nov 6, 2018

Could you please provide a sample file and some code to help reproduce?

@KengoSawa2
Copy link
Contributor Author

Thank you reply:)

sample mxf file and reproduce code is below.

https://drive.google.com/file/d/1dbSUDwtBQnhug1B7XpaAq-gNPDUHPfuS/view?usp=sharing

@jlaine
Copy link
Collaborator

jlaine commented Nov 7, 2018

OK I'm also getting a crash, I'll try digging into it.

The file seems to be an odd one in anycase, ffprobe also gives me plenty of warnings.

@jlaine
Copy link
Collaborator

jlaine commented Nov 7, 2018

@mikeboers the problem seems to be due to the Stream.__getattr__ magic : if the stream contains an unknown codec, self.codec_context does not exist, and so calling something as basic as stream.type leads to an infinite loop:

  • __getattr__('type')
  • __getattr__('codec_context')
  • __getattr__('codec_context')
    ...

@KengoSawa2 the crash definitely needs to be fixed, however as the video codec doesn't seem to be supported by ffmpeg I don't think you'll be able to do anything useful with it.

@jlaine
Copy link
Collaborator

jlaine commented Nov 7, 2018

@mikeboers I have a fix for the crash, but I'd like to lock it down with a unit test. Does the FATE suite contain examples of unsupported codecs?

@jlaine jlaine closed this as completed in 74cedc7 Nov 7, 2018
@mikeboers
Copy link
Member

@jlaine I've never found one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants