Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can fonts cause OpenGL out of memory error?

I have a problem with my AppWidget. Some users on Galaxy Nexus and Nexus S who have Android 4.0 are reporting broken fonts in stock launcher.

I had the phone connected to ADB to see the logs and I found there these errors multiple times:

OpenGLRenderer is out of memory!

Is there a way to optimize AppWidget to be less memory demanding for OpenGL renderer?

Is it sufficient to reduce the levels of the view tree?

Originally posted at: https://groups.google.com/forum/?fromgroups#!topic/android-developers/Aoxf_hWIQ24

like image 510
Sparky Avatar asked Feb 23 '12 12:02

Sparky


1 Answers

The Android engineers have found that very large font sizes can cause low-memory conditions in the font cache in Ice Cream Sandwich 4.0. They are working on ways to more effectively cache fonts that require a lot of memory. No workaround was proposed at this time.

To be less demanding, reduce font size.

like image 161
Sparky Avatar answered Sep 20 '22 14:09

Sparky