Processing error*

edited July 2014 in Kinect

hey guys i am running a processing 1.5.1 and sketching this code

    import SimpleOpenNI.*;
    import processing.serial.*;

    SimpleOpenNI kinect;
    Serial myPort;

    PVector handVec = new PVector();
    PVector mapHandVec = new PVector();
    color handPointCol = color(255, 0, 0);

void setup() {

  kinect = new SimpleOpenNI(this);

  // enable mirror
  kinect.setMirror(true);

  // enable depthMap generation, hands and gestures
  kinect.enableDepth();
  kinect.enableGesture();
  kinect.enableHands();

  // add focus gesture to initialise tracking
  kinect.addGesture("Wave");

  size(kinect.depthWidth(), kinect.depthHeight());

  String portName = Serial.list()[0]; // This gets the first port on your computer.
  myPort = new Serial(this, portName, 9600);
}

void draw() {

  kinect.update();

  kinect.convertRealWorldToProjective(handVec,mapHandVec);

  // draw depthImageMap
  image(kinect.depthImage(), 0, 0);

  strokeWeight(10);
  stroke(handPointCol);
  point(mapHandVec.x, mapHandVec.y);

  // Send a marker to indicate the beginning of the communication
  myPort.write('S');
  // Send the value of the mouse's x-position
  myPort.write(int(255*mapHandVec.x/width));
  // Send the value of the mouse's y-position
  myPort.write(int(255*mapHandVec.y/height));

}

void onCreateHands(int handId, PVector pos, float time)
{
  println("onCreateHands - handId: " + handId + ", pos: " + pos + ", time:" + time);
  handVec = pos;
  handPointCol = color(0, 255, 0);
}

void onUpdateHands(int handId, PVector pos, float time)
{
  println("onUpdateHandsCb - handId: " + handId + ", pos: " + pos + ", time:" + time);
  handVec = pos;
}
void onRecognizeGesture(String strGesture, PVector idPosition, PVector endPosition)
{
  println("onRecognizeGesture - strGesture: " + strGesture + ", idPosition: " + idPosition + ", endPosition:" + endPosition);

  kinect.removeGesture(strGesture); 
  kinect.startTrackingHands(endPosition);
}

the error i get is

Display 0 does not exist, using the default display instead.
SimpleOpenNI Version 0.27
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000007fef56d3fcc, pid=6628, tid=6908
#
# JRE version: Java(TM) SE Runtime Environment (8.0_11-b12) (build 1.8.0_11-b12)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.11-b03 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# C  [OpenNI64.dll+0x13fcc]
#
# 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:
# C:\processing-1.5.1\hs_err_pid6628.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.sun.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

help, anyone?

Tagged:

Answers

  • Answer ✓

    Problematic frame: C [OpenNI64.dll+0x13fcc]
    JRE version: Java(TM) SE Runtime Environment (8.0_11-b12) (build 1.8.0_11-b12)
    Java VM: Java HotSpot(TM) 64-Bit Server VM

    Perhaps you should use an older Java version? (~~)

  • Answer ✓

    Or use a newer processing version...

Sign In or Register to comment.