Skip to content

Instantly share code, notes, and snippets.

@ArcticLight
Created February 18, 2015 02:32
Show Gist options
  • Save ArcticLight/885d994389cb0b7c8759 to your computer and use it in GitHub Desktop.
Save ArcticLight/885d994389cb0b7c8759 to your computer and use it in GitHub Desktop.
Wat the segfault
int lastS;
float munge;
void setup() {
size(300,300);
lastS = second();
munge = 0;
}
void draw() {
munge += TWO_PI/60./60.;
if(lastS != second()) {
munge = 0;
lastS = second();
}
background(0);
pushMatrix();
translate(width/2,height/2);
ellipseMode(CENTER);
stroke(255);
fill(0);
ellipse(0,0,25,25);
float much = (second()/60.) * TWO_PI + munge;
rotate(much);
translate(0,-50);
rotate(-much);
ellipse(0,0,25,25);
fill(255);
textAlign(CENTER,CENTER);
text(second(), 0,-2);
much = (minute()/60.) * TWO_PI + (TWO_PI/second()/60.);
rotate(much);
translate(0,-20);
rotate(-much);
fill(0);
ellipse(0,0,15,15);
fill(255);
textAlign(CENTER,CENTER);
text(minute(), 0,-2);
popMatrix();
}
@hawkw
Copy link

hawkw commented Feb 18, 2015

On, Procelling also reports the following message:


#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGBUS (0xa) at pc=0x00007f9daf0153d0, pid=15041, tid=60939
#
# JRE version: Java(TM) SE Runtime Environment (7.0_55-b13) (build 1.7.0_55-b13)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (24.55-b03 mixed mode bsd-amd64 compressed oops)
# Problematic frame:
# C  0x00007f9daf0153d0
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /Users/hawk/hs_err_pid15041.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.
#

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