Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
marcelo.jannuzzi.3
marcelo.jannuzzi.3's Profile
1
Posts
0
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Expanded view
List view
Private Message
Sketch crashing suddenly when using Minim+OpenGL
[0 Replies]
25-Jun-2013 03:57 PM
Forum:
Core Library Questions
I'm getting an "Invalid memory access" error along with an alert saying that OpenGL crashed when the following processing sketch runs for about 1-2 minutes, how can I fix it?
ERROR MESSAGE:
java(897,0xb1937000) malloc: *** mmap(size=1228800) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
java(897,0xb1937000) malloc: *** mmap(size=1228800) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
java(897,0xb1937000) malloc: *** mmap(size=1228800) failed (error code=12)
*** error: can't allocate region
Invalid memory access of location 0xa00 eip=0x2295c59b
*** set a breakpoint in malloc_error_break to debug
SKETCH:
import ddf.minim.spi.*;
import ddf.minim.signals.*;
import ddf.minim.*;
import ddf.minim.analysis.*;
import ddf.minim.ugens.*;
import ddf.minim.effects.*;
Minim minim;
AudioInput in;
FFT fft;
int w;
PImage fade;
void setup() {
size(640, 480, OPENGL);
frameRate(60);
minim = new Minim(this);
in = minim.getLineIn(Minim.STEREO, 512);
fft = new FFT(in.bufferSize(), in.sampleRate());
fft.logAverages(60, 7);
stroke(236, 240, 241);
w = width/fft.avgSize();
strokeWeight(w);
strokeCap(SQUARE);
background(0);
fade = get(0, 0, width, height);
}
void draw() {
background(0);
tint(255, 255, 255, 250);
image(fade, 0, 0);
noTint();
fft.forward(in.mix);
for(int i = 0; i < fft.avgSize(); i++) {
line((i * w) + (w/ 2), height/2 + fft.getAvg(i) * 3, (i * w) + (w / 2), height/2 - fft.getAvg(i) * 3);
}
fade = get(0, 0, width, height);
}
«Prev
Next »
Moderate user : marcelo.jannuzzi.3
Forum