Skip to content

JavaCL.createBestContext() nullpointer, JavaCL.listPlatforms() fatal error, but HardwareReport on your website works?! #13

Open
@ochafik

Description

@ochafik

From @MoeZarella on July 21, 2012 11:36

Hi,

in addition to the copy of my post below:

i'm interested in openCL very much. And as a passionate Java programmer i want to learn more about openCL. So i've checked out your webpage and saw the HardwareReport tool. One click later it works on both my Win7x64 machine and on my MacBook. So i added the latest .jar to a sample Eclipse project and wanted to test the JavaCLTutorial1 class on my Win7 machine. While executing it i get this:
Exception in thread "main" java.lang.NullPointerException
at com.nativelibs4java.opencl.JavaCL.createBestContext(JavaCL.java:333)
at com.nativelibs4java.opencl.JavaCL.createBestContext(JavaCL.java:324)
at samples.Tutorial1.main(Tutorial1.java:30)
getLibrarySymbols has 98 symbols
getLibrarySymbols has 98 symbols

For testing purposes, i've added
System.out.println(JavaCL.listPlatforms());
as my first line on the main method. This results in:
[Lcom.nativelibs4java.opencl.CLPlatform;@44098212

A fatal error has been detected by the Java Runtime Environment:

EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000007fefb0512ed, pid=5440, tid=6976

JRE version: 7.0_02-b13
Java VM: Java HotSpot(TM) 64-Bit Server VM (22.0-b10 mixed mode windows-amd64 compressed oops)
Problematic frame:
C [OpenCL.dll+0x12ed]

Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
...

Since i did not understand why this did not work i've copied the source code from the HardwareReport sample to my machine. Since i could not find the "SetupUtils" class, i had to comment those lines out. This results in an empty window but using the version on your website (jnlp) works.

So my question is: What am i missing? Any help is appreciated since it seems like this project is very interesting!

Thanks in advance,

Moe

Copied from original issue: nativelibs4java/nativelibs4java#329

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions