Im trying to record a depth map to an .oni file with OpenNI using the java wrapper. This is my current code:
Context context = new Context();
DepthGenerator depth = DepthGenerator.create(context);
Recorder recorder = Recorder.create(context, null); //null gives .oni.
recorder.addNodeToRecording(depth);
context.startGeneratingAll();
while(true){
context.waitAnyUpdateAll();
recorder.Record();
}
When Im running it, this error is produced:
A fatal error has been detected by the Java Runtime Environment:
EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000000005b7bd579, pid=8048, tid=6784
JRE version: 7.0-b147
Java VM: Java HotSpot(TM) 64-Bit Server VM (21.0-b17 mixed mode windows-amd64 compressed oops)
Problematic frame:
V [jvm.dll+0xed579]
Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
An error report file with more information is saved as:
If you would like to submit a bug report, please visit:
http://bugreport.sun.com/bugreport/crash.jsp
Anyone have any ideas?
I figured it out.
Recorder recorder = Recorder.create(context, "oni");
I needed to specify the file format. Passing in a null value was not the best idea obviously.