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

opengl_varying crashes with Failed to free device buffer #559

Closed
abestephensg opened this issue Nov 20, 2014 · 1 comment
Closed

opengl_varying crashes with Failed to free device buffer #559

abestephensg opened this issue Nov 20, 2014 · 1 comment
Assignees

Comments

@abestephensg
Copy link
Contributor

In master and glsl-varyingattrib:

Each test case in opengl_varying passes but the test crashes on exit. If the tests cases are run individually, the error does not occur.

$ HL_JIT_TARGET=host-opengl opengl_varying
'+fma +f16c' is not a recognized feature for this target (ignoring feature)
'+fma +f16c' is not a recognized feature for this target (ignoring feature)
'+fma +f16c' is not a recognized feature for this target (ignoring feature)
'+fma +f16c' is not a recognized feature for this target (ignoring feature)
'+fma +f16c' is not a recognized feature for this target (ignoring feature)
'+fma +f16c' is not a recognized feature for this target (ignoring feature)
Success!
Error:
Failed to free device buffer
#2 0x0000000101de0e7b in raise at /Users/abstephens/llvm-trunk/lib/Support/Unix/Signals.inc:518
#3 0x0000000101de0f32 in abort at /Users/abstephens/llvm-trunk/lib/Support/Unix/Signals.inc:535
#4 0x00000001001d44df in Halide::Internal::ErrorReport::explode() at /Users/abstephens/Halide-master/src/Error.cpp:67
#5 0x000000010000891c in Halide::Internal::ErrorReport::~ErrorReport() at /Users/abstephens/Halide-master/build-xcode/include/Halide.h:791
#6 0x00000001000088e5 in Halide::Internal::ErrorReport::~ErrorReport() at /Users/abstephens/Halide-master/build-xcode/include/Halide.h:785
#7 0x00000001000751aa in void Halide::Internal::destroyHalide::Internal::BufferContents(Halide::Internal::BufferContents const*) at /Users/abstephens/Halide-master/src/Buffer.cpp:112
#8 0x0000000100007d76 in Halide::Internal::IntrusivePtrHalide::Internal::BufferContents::decref(Halide::Internal::BufferContents*) at /Users/abstephens/Halide-master/build-xcode/include/Halide.h:1143
#9 0x0000000100007d04 in Halide::Internal::IntrusivePtrHalide::Internal::BufferContents::~IntrusivePtr() at /Users/abstephens/Halide-master/build-xcode/include/Halide.h:1152
#10 0x0000000100007ce5 in Halide::Internal::IntrusivePtrHalide::Internal::BufferContents::~IntrusivePtr() at /Users/abstephens/Halide-master/build-xcode/include/Halide.h:1151
#11 0x0000000100007cc5 in Halide::Buffer::~Buffer() at /Users/abstephens/Halide-master/build-xcode/include/Halide.h:1214
#12 0x0000000100007ca5 in Halide::Buffer::~Buffer() at /Users/abstephens/Halide-master/build-xcode/include/Halide.h:1214
#13 0x000000010000ec15 in Halide::ImageBase::~ImageBase() at /Users/abstephens/Halide-master/build-xcode/include/Halide.h:8011
#14 0x000000010000ebf5 in Halide::Image::~Image() at /Users/abstephens/Halide-master/build-xcode/include/Halide.h:8151
#15 0x0000000100007375 in Halide::Image::~Image() at /Users/abstephens/Halide-master/build-xcode/include/Halide.h:8151
#16 0x0000000100004982 in main at /Users/abstephens/Halide-master/test/opengl/varying.cpp:176
#17 0x00007fff863475fd in start ()

@abestephensg
Copy link
Contributor Author

It appears that the runtime calls halide_opengl_create_context for each Func realization, and then obtains texture number "1" in each context. When the program terminates, the appropriate context is not made current before each call to glDeleteTextures.

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