# Cache buffer keeps expanding

**URL:** https://discourse.processing.org/t/cache-buffer-keeps-expanding/5628
**Category:** Processing for Android
**Created:** [November 17, 2018, 3:40pm UTC](https://discourse.processing.org/t/cache-buffer-keeps-expanding/5628 "2018-11-17T15:40:03Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Hans](https://avatars.discourse-cdn.com/v4/letter/h/e19b73/32.png) [@Hans](https://discourse.processing.org/u/Hans)
#### Post date: [November 17, 2018, 3:40pm UTC](https://discourse.processing.org/t/cache-buffer-keeps-expanding/5628/1 "2018-11-17T15:40:04Z")

</div>

After upgrading to Android mode 4.0.3. with Processing 3.4 I experience problems with a growing size of the cache buffer on my device. Tried different devices and ways of installing, directly on the device and a completely build apk installed on the device. No difference, each time the app is started and closed the cache buffer expands and easily exceeds 1 GB. Tried also the simple sketch from [https://android.processing.org/install.html](https://android.processing.org/install.html) with the same result.  
Looked for solution to clear the buffer programmatically but what I found didn’t work. It looks for older Android versions. Posted this also in GitHub as an issue.  
Hope someone can help or indicates if they experience same behavior.

---

<div class="post-metadata">

### Author: ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)
#### Post date: [November 18, 2018, 2:43am UTC](https://discourse.processing.org/t/cache-buffer-keeps-expanding/5628/2 "2018-11-18T02:43:29Z")

</div>

> [@Hans](#):
>
> Arduino 4.0.3

hi @Hans  
this word “Arduino” here is confusing and might be a typo

> **[Arduino Software Release Notes](https://www.arduino.cc/en/software/ReleaseNotes/)**
>
> Open-source electronic prototyping platform enabling users to create interactive electronic objects.

> **[Releases · processing/processing-android](https://github.com/processing/processing-android/releases)**
>
> Processing mode and core library to create Android apps with Processing - processing/processing-android

pls. edit your post.

add it might be required to give info about the processing version  
and the Android version you compile for and run under.

---

<div class="post-metadata">

### Author: ![Hans](https://avatars.discourse-cdn.com/v4/letter/h/e19b73/32.png) [@Hans](https://discourse.processing.org/u/Hans)
#### Post date: [November 18, 2018, 7:38am UTC](https://discourse.processing.org/t/cache-buffer-keeps-expanding/5628/3 "2018-11-18T07:38:14Z")

</div>

Hi kll,

Thanks for the heads up, I edit my post. Mostly working with Arduino and Processing.

Main question is if others can check their installed Android app for that same behavior and share that information.

Greetings Hans

---

<div class="post-metadata">

### Author: ![Hans](https://avatars.discourse-cdn.com/v4/letter/h/e19b73/32.png) [@Hans](https://discourse.processing.org/u/Hans)
#### Post date: [November 18, 2018, 1:18pm UTC](https://discourse.processing.org/t/cache-buffer-keeps-expanding/5628/4 "2018-11-18T13:18:21Z")

</div>

To clarify my problem I made a few screenshots. (from the basic example sketch)

With cleared cache:

 ![Screenshot_Settings1](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/2/299a919474f0db24fddf758efff2a078a1a7f836.jpeg)

After opening and closing ten times:

 ![Screenshot_Settings_opening10x](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/a/aec2f4422639d796a7e864d4f2f0596d8dc5179d.jpeg)

After opening and closing twenty times:

 ![Screenshot_Settings_opening20x](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/f/f0d68594c6dfbe7b6d97cd76f3c56b7eac318d91.jpeg)

---

<div class="post-metadata">

### Author: ![brunoruchiga](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/brunoruchiga/32/2235_2.png) [@brunoruchiga](https://discourse.processing.org/u/brunoruchiga)
#### Post date: [November 18, 2018, 3:28pm UTC](https://discourse.processing.org/t/cache-buffer-keeps-expanding/5628/5 "2018-11-18T15:28:04Z")

</div>

I have the same problem, and I think this problem is new, because it doesn’t happen on my old sketches installed on my phone.

---

<div class="post-metadata">

### Author: ![Hans](https://avatars.discourse-cdn.com/v4/letter/h/e19b73/32.png) [@Hans](https://discourse.processing.org/u/Hans)
#### Post date: [November 18, 2018, 3:30pm UTC](https://discourse.processing.org/t/cache-buffer-keeps-expanding/5628/6 "2018-11-18T15:30:28Z")

</div>

Same experience here. Old version didn’t had this problem. Thanks for the reply!

---

<div class="post-metadata">

### Author: ![brunoruchiga](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/brunoruchiga/32/2235_2.png) [@brunoruchiga](https://discourse.processing.org/u/brunoruchiga)
#### Post date: [November 18, 2018, 4:13pm UTC](https://discourse.processing.org/t/cache-buffer-keeps-expanding/5628/7 "2018-11-18T16:13:14Z")

</div>

I just tried to reverse to [Android Mode Version 4.0.2](https://github.com/processing/processing-android/releases/tag/android-269), and it does not have the same problem.

Using Android Mode Version **4.0.3** : cache increases like crazy, more than 300MB.  
Using Android Mode Version **4.0.2** : stable 53KB of cache.

Same sketch, same functionalities, both seem do work perfectly, the only notable difference for me is the cache size. I think you could manually reverse to the old version until this get fixed.

---

<div class="post-metadata">

### Author: ![Hans](https://avatars.discourse-cdn.com/v4/letter/h/e19b73/32.png) [@Hans](https://discourse.processing.org/u/Hans)
#### Post date: [November 18, 2018, 6:04pm UTC](https://discourse.processing.org/t/cache-buffer-keeps-expanding/5628/8 "2018-11-18T18:04:07Z")

</div>

Great, that works. Thanks!

I’ve tried to go back to Android mode 3.0.2. because of errors caused by the Blepdroid (Bluetooth LE) library, which I still would like to use. But it gave multiple errors. Never tried a more recent version.

Hope they will find solutions for these new problems.
