# Can someone tell me what is KB error and of course with solution (memory issue)

**URL:** https://discourse.processing.org/t/can-someone-tell-me-what-is-kb-error-and-of-course-with-solution-memory-issue/26554
**Category:** Libraries
**Created:** [December 28, 2020, 12:32pm UTC](https://discourse.processing.org/t/can-someone-tell-me-what-is-kb-error-and-of-course-with-solution-memory-issue/26554 "2020-12-28T12:32:08Z")
**Posts on this page:** 18
**Page:** 1

<div class="post-metadata">

### Author: ![clay21](https://avatars.discourse-cdn.com/v4/letter/c/e8c25b/32.png) [@clay21](https://discourse.processing.org/u/clay21)
#### Post date: [December 28, 2020, 12:32pm UTC](https://discourse.processing.org/t/can-someone-tell-me-what-is-kb-error-and-of-course-with-solution-memory-issue/26554/1 "2020-12-28T12:32:08Z")

</div>

Hello i got like kb error i guess im not giving enough ram for java and i dont know how can i give more can someone tell me how 🙂 Thank you Already

---

<div class="post-metadata">

### Author: ![CodeMasterX](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/codemasterx/32/2942_2.png) [@CodeMasterX](https://discourse.processing.org/u/CodeMasterX)
#### Post date: [December 28, 2020, 12:33pm UTC](https://discourse.processing.org/t/can-someone-tell-me-what-is-kb-error-and-of-course-with-solution-memory-issue/26554/2 "2020-12-28T12:33:18Z")

</div>

Would you mind sharing the code? It is far easier to find the issue that way

---

<div class="post-metadata">

### Author: ![CodeMasterX](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/codemasterx/32/2942_2.png) [@CodeMasterX](https://discourse.processing.org/u/CodeMasterX)
#### Post date: [December 28, 2020, 12:40pm UTC](https://discourse.processing.org/t/can-someone-tell-me-what-is-kb-error-and-of-course-with-solution-memory-issue/26554/3 "2020-12-28T12:40:51Z")

</div>

I checked about it (KB error in java) and found that it is mostly issues with functions. There was a case where a kb error was reported due to an unsupported function and another where date() (time and date functions) were unresponsive. Again to fix it I recommend posting your code here

---

<div class="post-metadata">

### Author: ![clay21](https://avatars.discourse-cdn.com/v4/letter/c/e8c25b/32.png) [@clay21](https://discourse.processing.org/u/clay21)
#### Post date: [December 28, 2020, 12:44pm UTC](https://discourse.processing.org/t/can-someone-tell-me-what-is-kb-error-and-of-course-with-solution-memory-issue/26554/6 "2020-12-28T12:44:50Z")

</div>

I have 2 video in this code both are 45 second

---

<div class="post-metadata">

### Author: ![clay21](https://avatars.discourse-cdn.com/v4/letter/c/e8c25b/32.png) [@clay21](https://discourse.processing.org/u/clay21)
#### Post date: [December 28, 2020, 12:48pm UTC](https://discourse.processing.org/t/can-someone-tell-me-what-is-kb-error-and-of-course-with-solution-memory-issue/26554/7 "2020-12-28T12:48:14Z")

</div>

i cant share my code cuz of this website i dont know

---

<div class="post-metadata">

### Author: ![CodeMasterX](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/codemasterx/32/2942_2.png) [@CodeMasterX](https://discourse.processing.org/u/CodeMasterX)
#### Post date: [December 28, 2020, 12:50pm UTC](https://discourse.processing.org/t/can-someone-tell-me-what-is-kb-error-and-of-course-with-solution-memory-issue/26554/8 "2020-12-28T12:50:29Z")

</div>

Did you import video libraries? The library preloaded does not support video / sound. Try finding a processing/java library you like

---

<div class="post-metadata">

### Author: ![clay21](https://avatars.discourse-cdn.com/v4/letter/c/e8c25b/32.png) [@clay21](https://discourse.processing.org/u/clay21)
#### Post date: [December 28, 2020, 12:53pm UTC](https://discourse.processing.org/t/can-someone-tell-me-what-is-kb-error-and-of-course-with-solution-memory-issue/26554/9 "2020-12-28T12:53:42Z")

</div>

import processing.video.\*; i add that but i dont think the problem about my code  
its like about ram and givinig more memory

---

<div class="post-metadata">

### Author: ![CodeMasterX](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/codemasterx/32/2942_2.png) [@CodeMasterX](https://discourse.processing.org/u/CodeMasterX)
#### Post date: [December 28, 2020, 12:58pm UTC](https://discourse.processing.org/t/can-someone-tell-me-what-is-kb-error-and-of-course-with-solution-memory-issue/26554/10 "2020-12-28T12:58:17Z")

</div>

Programs aren’t limited by ram. They would just run slower. Can you access the video files? Did you reference them correctly? (“name.dataType” (like “holidays\_15\_6\_2020.mp4”))

unless you have \<200mb ram I don’t think that should be a problem. Btw you can change the RAM accessible in the preferences.

---

<div class="post-metadata">

### Author: ![clay21](https://avatars.discourse-cdn.com/v4/letter/c/e8c25b/32.png) [@clay21](https://discourse.processing.org/u/clay21)
#### Post date: [December 28, 2020, 1:10pm UTC](https://discourse.processing.org/t/can-someone-tell-me-what-is-kb-error-and-of-course-with-solution-memory-issue/26554/11 "2020-12-28T13:10:05Z")

</div>

my friend, you are very knowledgeable i will try to share my code again

---

<div class="post-metadata">

### Author: ![clay21](https://avatars.discourse-cdn.com/v4/letter/c/e8c25b/32.png) [@clay21](https://discourse.processing.org/u/clay21)
#### Post date: [December 28, 2020, 1:10pm UTC](https://discourse.processing.org/t/can-someone-tell-me-what-is-kb-error-and-of-course-with-solution-memory-issue/26554/12 "2020-12-28T13:10:38Z")

</div>

import processing.video.\*;

int puan=0;  
int timer;  
int page=0;  
boolean pressed=false;

Movie mov;  
PImage foto1;

void setup(){

size(860,640);  
page+=1;  
pressed=true;  
background(0);  
mov = new Movie(this, “movie1.mp4”);  
mov.loop();  
mov.volume(0);  
foto1=loadImage(“data/foto1.jpg”);

}

void movieEvent(Movie movie) {

mov.read();

}

void draw(){

switch(page){  
case 1:page1(); break;  
case 2:page2(); break;  
case 3:page3();break;  
}

}  
void page1(){  
image(mov, 0, 0,width,400);  
fill(255);  
text(“Filmi İsmi : Yedinci Oğul”,0,30);  
textSize(20);  
text(“İzlemekte Olduğunuz Kısımda Yarı İnsanı Gören Dev ne Tepki Vermiştir”,0,410);

if(mouseX\>50 && mouseY\>500 && mouseX\<200 && mouseY\<550 && mousePressed==true ){  
background(255,0,0);  
rect(50,500,150,50);  
rect(350,500,150,50);  
rect(600,500,150,50);  
setup();  
}  
else if(mouseX\>350 && mouseY\>500 && mouseX\<500 && mouseY\<550 && mousePressed==true){  
rect(100,500,150,50);  
rect(350,500,150,50);  
rect(600,500,150,50);  
puan+=20;  
setup();

}  
else if(mouseX\>600 && mouseY\>500 && mouseX\<750 && mouseY\<550 && mousePressed==true){  
rect(50,500,150,50);  
rect(600,500,150,50);  
rect(350,500,150,50);  
setup();  
}  
else{  
fill(0);  
stroke(255);  
rect(50,500,150,50);  
rect(350,500,150,50);  
rect(650,500,150,50);  
fill(255);  
text(“Aşık olur”,82,530);  
text(“Tokatlar”,385,530);  
text(“Korkup Kaçar”,662,530);

}

}  
void page2(){  
image(foto1,150,0);  
fill(255);  
textSize(20);  
text(“Cesur Yürek Filminde Mel Gibsonun Canlandırdığı Karakterin İsmi Nedir?”,0,430);

if(mouseX\>50 && mouseY\>500 && mouseX\<200 && mouseY\<550 && mousePressed==true ){  
background(255,0,0);  
rect(50,500,150,50);  
rect(350,500,150,50);  
rect(600,500,150,50);  
setup();  
}  
else if(mouseX\>350 && mouseY\>500 && mouseX\<500 && mouseY\<550 && mousePressed==true){  
rect(100,500,150,50);  
rect(350,500,150,50);  
rect(600,500,150,50);

setup();

}  
else if(mouseX\>600 && mouseY\>500 && mouseX\<750 && mouseY\<550 && mousePressed==true){  
rect(50,500,150,50);  
rect(600,500,150,50);  
rect(350,500,150,50);  
setup();  
}  
else{  
fill(0);  
stroke(255);  
rect(50,500,150,50);  
rect(350,500,150,50);  
rect(650,500,160,50);  
fill(255);  
text(“Murron”,90,530);  
text(“Robert Bruce”,365,530);  
text(“William Wallace”,655,530);

}  
}

void page3(){

}

---

<div class="post-metadata">

### Author: ![CodeMasterX](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/codemasterx/32/2942_2.png) [@CodeMasterX](https://discourse.processing.org/u/CodeMasterX)
#### Post date: [December 28, 2020, 1:11pm UTC](https://discourse.processing.org/t/can-someone-tell-me-what-is-kb-error-and-of-course-with-solution-memory-issue/26554/13 "2020-12-28T13:11:27Z")

</div>

It’s mostly guessing and my previous failures. I learned a lot since I started following the forum. Good luck with your coding.

---

<div class="post-metadata">

### Author: ![clay21](https://avatars.discourse-cdn.com/v4/letter/c/e8c25b/32.png) [@clay21](https://discourse.processing.org/u/clay21)
#### Post date: [December 28, 2020, 1:11pm UTC](https://discourse.processing.org/t/can-someone-tell-me-what-is-kb-error-and-of-course-with-solution-memory-issue/26554/14 "2020-12-28T13:11:30Z")

</div>

page 2 had a video normally but because I couldn’t access it, I replaced it with a picture.

---

<div class="post-metadata">

### Author: ![CodeMasterX](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/codemasterx/32/2942_2.png) [@CodeMasterX](https://discourse.processing.org/u/CodeMasterX)
#### Post date: [December 28, 2020, 1:16pm UTC](https://discourse.processing.org/t/can-someone-tell-me-what-is-kb-error-and-of-course-with-solution-memory-issue/26554/15 "2020-12-28T13:16:41Z")

</div>

well that is a solution

---

<div class="post-metadata">

### Author: ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)
#### Post date: [December 28, 2020, 1:28pm UTC](https://discourse.processing.org/t/can-someone-tell-me-what-is-kb-error-and-of-course-with-solution-memory-issue/26554/16 "2020-12-28T13:28:04Z")

</div>

you should never call setup from your code

setup should run only once

move the lines from setup in a new function that you call from setup AND from the code lines where you call setup at the moment

also, don’t load movies again that you have already loaded. Instead use play / loop / pause again.

Chrisir

---

<div class="post-metadata">

### Author: ![clay21](https://avatars.discourse-cdn.com/v4/letter/c/e8c25b/32.png) [@clay21](https://discourse.processing.org/u/clay21)
#### Post date: [December 28, 2020, 1:37pm UTC](https://discourse.processing.org/t/can-someone-tell-me-what-is-kb-error-and-of-course-with-solution-memory-issue/26554/17 "2020-12-28T13:37:08Z")

</div>

They are different videos of about 50 seconds. and i have to use more then 5 but i cant even play 2 videos

---

<div class="post-metadata">

### Author: ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)
#### Post date: [December 28, 2020, 1:40pm UTC](https://discourse.processing.org/t/can-someone-tell-me-what-is-kb-error-and-of-course-with-solution-memory-issue/26554/18 "2020-12-28T13:40:21Z")

</div>

As I said, rewrite your code so you don’t call setup() please

You can increase the memory in processing preferences also

---

<div class="post-metadata">

### Author: ![clay21](https://avatars.discourse-cdn.com/v4/letter/c/e8c25b/32.png) [@clay21](https://discourse.processing.org/u/clay21)
#### Post date: [December 28, 2020, 1:42pm UTC](https://discourse.processing.org/t/can-someone-tell-me-what-is-kb-error-and-of-course-with-solution-memory-issue/26554/19 "2020-12-28T13:42:48Z")

</div>

So how can i increase memory i guess thats my solution

---

<div class="post-metadata">

### Author: ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)
#### Post date: [December 28, 2020, 1:43pm UTC](https://discourse.processing.org/t/can-someone-tell-me-what-is-kb-error-and-of-course-with-solution-memory-issue/26554/20 "2020-12-28T13:43:49Z")

</div>

That won’t help when you still call setup()…

See processing menu File | Preferences
