Skip to content

CLUserEvent fail to register callback with NPE #29

Description

@swarr

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions