New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Array print issue #4825

Closed
kjwamlex opened this Issue Jan 11, 2017 · 7 comments

Comments

Projects
None yet
5 participants
@kjwamlex

kjwamlex commented Jan 11, 2017

When Processing tries to print out 200 elements in 3 arrays, Processing itself freezes and must force quit the application. macOS 10.12.2

@gohai

This comment has been minimized.

Show comment
Hide comment
@gohai

gohai Jan 11, 2017

Contributor

Can you share your sketch with us, or at least the relevant parts?

Contributor

gohai commented Jan 11, 2017

Can you share your sketch with us, or at least the relevant parts?

@Lord-of-the-Galaxy

This comment has been minimized.

Show comment
Hide comment
@Lord-of-the-Galaxy

Lord-of-the-Galaxy Feb 16, 2017

Too much print/println also tends to kill processing sketches. Perhaps it's the same problem?

This, for example, crashes for me:

void setup(){
  size(100, 100);
}

void draw(){
  for(int i = 0; i < 10000; i++){
    for(int a = 0; a < 10000; a++){
      print(i + " " + a);
    }
    println();
  }
}

Lord-of-the-Galaxy commented Feb 16, 2017

Too much print/println also tends to kill processing sketches. Perhaps it's the same problem?

This, for example, crashes for me:

void setup(){
  size(100, 100);
}

void draw(){
  for(int i = 0; i < 10000; i++){
    for(int a = 0; a < 10000; a++){
      print(i + " " + a);
    }
    println();
  }
}
@kritixilithos

This comment has been minimized.

Show comment
Hide comment
@kritixilithos

kritixilithos Feb 16, 2017

@Lord-of-the-Galaxy print statements generally slow the program down, especially in loops. Now you are calling over 100,000,000 print statements every fraction of a second (because of the draw() statement). What did you expect?

kritixilithos commented Feb 16, 2017

@Lord-of-the-Galaxy print statements generally slow the program down, especially in loops. Now you are calling over 100,000,000 print statements every fraction of a second (because of the draw() statement). What did you expect?

@Lord-of-the-Galaxy

This comment has been minimized.

Show comment
Hide comment
@Lord-of-the-Galaxy

Lord-of-the-Galaxy Feb 16, 2017

@kritixilithos I know why Processing crashes with many print statements and I'm not expecting anyone to be able to allow Processing (in fact, Java itself (it would be System.out.print there)) to have thousands of print statements. I was only wondering if this current issue may be related to the fact that too many print statements crash Java/Processing.

Lord-of-the-Galaxy commented Feb 16, 2017

@kritixilithos I know why Processing crashes with many print statements and I'm not expecting anyone to be able to allow Processing (in fact, Java itself (it would be System.out.print there)) to have thousands of print statements. I was only wondering if this current issue may be related to the fact that too many print statements crash Java/Processing.

@kritixilithos

This comment has been minimized.

Show comment
Hide comment
@kritixilithos

kritixilithos Feb 16, 2017

@Lord-of-the-Galaxy I'm guessing it's because they are high level languages. I tried this with C, and it started printing tons of stuff without crashing or freezing for some time (but later I ^Ced it because it was spamming my Terminal).

kritixilithos commented Feb 16, 2017

@Lord-of-the-Galaxy I'm guessing it's because they are high level languages. I tried this with C, and it started printing tons of stuff without crashing or freezing for some time (but later I ^Ced it because it was spamming my Terminal).

@Lord-of-the-Galaxy

This comment has been minimized.

Show comment
Hide comment
@Lord-of-the-Galaxy

Lord-of-the-Galaxy Feb 17, 2017

@kritixilithos You're probably right. But we still don't know if the printArray problem occurs because of it.

Lord-of-the-Galaxy commented Feb 17, 2017

@kritixilithos You're probably right. But we still don't know if the printArray problem occurs because of it.

bergvel1 added a commit to delftswa2017/processing that referenced this issue Mar 8, 2017

bergvel1 added a commit to delftswa2017/processing that referenced this issue Mar 8, 2017

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry May 3, 2017

Member

Taking a look into this one… close to a fix.

Member

benfry commented May 3, 2017

Taking a look into this one… close to a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment