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

CLUserEvent fail to register callback with NPE #29

Open
swarr opened this issue Jun 14, 2015 · 0 comments
Open

CLUserEvent fail to register callback with NPE #29

swarr opened this issue Jun 14, 2015 · 0 comments

Comments

@swarr
Copy link

swarr commented Jun 14, 2015

Commit: f6df1fb
File: Core/src/main/velocity/com/nativelibs4java/opencl/CLEvent.java
line 92: queue.getContext().getPlatform().requireMinVersionValue("clSetEventCallback", 1.1);

This line breaks callbacks for CLUserEvent - it's queue is null, thus NPE is thrown. Possible soultion - create new field CLContext field in CLEvent, create new constructor with CLContext instead of CLQueue; use it if queue is null, but context is available like in case of CLUserEvent; don't forget to init context in constructor with queue in parameters; and finally fix this line by using context but not queue.

Another possible solution - revert changes in this file.

@swarr swarr changed the title CLUserEvent could fail to register callback with NPE CLUserEvent fail to register callback with NPE Jun 14, 2015
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

1 participant