JavaCL.createBestContext() nullpointer, JavaCL.listPlatforms() fatal error, but HardwareReport on your website works?!
Opened this issue · 2 comments
From @MoeZarella on July 21, 2012 11:36
Hi,
in addition to the copy of my post below:
- I use already https://code.google.com/p/javacl/downloads/detail?name=javacl-1.0-20120625-shaded.jar
- I use Amd app sdk runtime 10.0.938.1 (<- is this the information you wanted to have?)
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
Hi @MoeZarella ,
Thanks for your report!
I'm actively investigating what's going on on Win64 right now (crash seems to be caused by recent "optimizations"), but in the meanwhile I would encourage you to try the latest release version: 1.0.0-RC2 (available from the downloads here https://code.google.com/p/javacl/downloads/detail?name=javacl-1.0.0-RC2-shaded.jar )
Cheers
From @MoeZarella on July 21, 2012 21:53
Hi Olivier,
Thanks for your investigation!
I've just tested the RC2 and it works now. So i hope this helps you a bit to find the bug.
Cheers