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

libmpv: mpv_render_context_create crashes if failed to get opengl function pointer #6507

Closed
lhc70000 opened this issue Feb 19, 2019 · 1 comment

Comments

@lhc70000
Copy link
Contributor

mpv version and platform

mpv 0.29.1
macOS 10.14.3

Reproduction steps

When using the render.h API, call mpv_render_context_create when OpenGL is unavailable or not ready. It can be reproduced by simply returning NULL in the function provided for get_proc_address.

#6249 and #6379 might be related.

Expected behavior

mpv_render_context_create should return the error code if cannot get the OpenGL entry point.

Actual behavior

mpv_render_context_create crashes (EXC_BAD_ACCESS) at:

ctx->renderer->fns->destroy(ctx->renderer);

Seems that the resource is freed twice (the first time at

ctx->renderer->fns->destroy(ctx->renderer);
), if err returned by ctx->renderer->fns->init is less than zero.

Log file

N/A

Sample files

N/A

wnoun added a commit to wnoun/mpv that referenced this issue Mar 7, 2019
@wnoun
Copy link
Contributor

wnoun commented Mar 7, 2019

See #6540

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

2 participants