Processing freezes my PC

I have an IEI panel PC on which I have installed Ubuntu 16.04. On my windows PC I made a linux application for it. After I installed java(latest version) the application runs just fine...untill it freezes up panel PC a few minutes later. And I mean total lockup. Cannot even move the mouse or do anything.

I have no clue whatever the problem can be or how I can fix this. The sketch itself runs fine on the windows PC. I have tried to limit the frequentie of 'void draw' to 50Hz but it has no effect. It just seems that the application is simply not stable on my system. It is the first Linux system I have worked with.

Button F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16;

int Up = 1;
int Right = 2;
int Down = 3;
int Left = 4;

String test = " ";
Button[] arrayList;

void setup()
{
  size(1024, 768);
  background(200);

  arrayList = new Button[30];

  arrayList[0] = new Button(10, 20, 55, "F1"); // X, Y, size, text
  arrayList[1] = new Button(10, 80, 55, "F2");
  arrayList[2] = new Button(10, 140, 55, "F3");
  arrayList[3] = new Button(10, 200, 55, "F4");
  arrayList[4] = new Button(10, 260, 55, "F5");
  arrayList[5] = new Button(10, 320, 55, "F6");
  arrayList[6] = new Button(10, 380, 55, "F7");
  arrayList[7] = new Button(10, 440, 55, "F8");
  arrayList[8] = new Button(10, 500, 55, "F9");
  arrayList[9] = new Button(10, 560, 55, "F10"); 
}

void draw()
{
  for (int i = 0; i < 10; i++) arrayList[i].Paint();
}


         class Button {
          int size;

          int Xmin, Ymin;
          int Xmax, Ymax;

          String string1, string2;

          Button(int Xpos, int Ypos, int size, String text)
          {
            textAlign(CENTER, CENTER);
            this.size = size;

            Xmin = Xpos; 
            Xmax = Xpos + size;

            Ymin = Ypos; 
            Ymax = Ypos + size;

            string1 = text; 
          }

          Button(int Xpos, int Ypos, int size, String text1, String text2)
          {
            textAlign(CENTER, CENTER);
            this.size = size;

            Xmin = Xpos; Xmax = Xpos + size;
            Ymin = Ypos; Ymax = Ypos + size;

            string1 = text1;
            string2 = text2;

            fill(155);
            rect(Xmin, Ymin, size, size);
            fill(0);

            textSize(size / 4);
            text(string1, Xmin + size / 2, Ymin + size / 4);
            text(string2, Xmin + size / 2, Ymax - size / 4);
            fill(0);
          }

          Button(int Xpos, int Ypos, int size, String text, int arrow)
          {

          }

          void Paint()
          {
            int shade = 155;
            if(mousePressed && mouseX > Xmin && mouseX < Xmax && mouseY > Ymin && mouseY < Ymax) shade += 20;

            fill(shade);
            rect(Xmin, Ymin, size, size);
            fill(shade - 50);

            textSize(size / 2);
            text(string1, Xmin + size / 2, Ymax - size / 2);

          }

          int getXmax()
          {
            return Xmax;
          }

          int getXmin()
          {
            return Xmin;
          }

          int getYmax()
          {
            return Ymax;
          }

          int getYmin()
          {
            return Ymin;
          }
        }

Answers

  • edited February 2017

    You sure that the problem is with Processing? Have you tried any other apps, and seen the PC freeze before?

  • I dont recall that the PC crashed before. And the Processing app only runs for a few minutes. But as far as I know it might easily be ubuntu being responisble.

  • Try running some other Java based app for a few minutes and see if it crashes.

  • I dont have any other java app on dat tablet PC, nor can't I think of any. I'll try to install openJDK tomorrow see if that works. But thankfully there is a big chance that we won't be using this specific table PC :)

Sign In or Register to comment.