RAM overflow when Fontresources are in Compressed format

61 views
asked Jan 10 in System Integration by Chaitra
Hi Team,

When the settings for Fontresources is made as compressed format during run time RAM overflow error is occuring  in Rx651 platform.

Is there a way we can clear this Over flow in compressed format?

Regards,

Chaitra S g

1 Answer

0 votes
answered Jan 10 by Manfred Schweyer
Hello Chaitra,

the single glyphs of the compressed font resources are loaded during runtime into a glyph cache.

You can configure the size of the glyph cache by using the macros EW_MAX_GLYPH_SURFACE_WIDTH and EW_MAX_GLYPH_SURFACE_HEIGHT within your project/makefile.

What are your current settings? What is the error message that you get during runtime?

Best regards,

Manfred.
commented Jan 10 by Chaitra
Hi Manfred,

below are the macros that was configured.

EW_MAX_GLYPH_SURFACE_WIDTH   128
EW_MAX_GLYPH_SURFACE_HEIGHT  128
commented Jan 10 by Chaitra

Hi Manfred,

please find the futher details of the same issue.


EW_MAX_GLYPH_SURFACE_WIDTH   128
EW_MAX_GLYPH_SURFACE_HEIGHT  128

1. By debugging from our side, we saw the function void* EwAlloc(int aSize) is creating memory.

How to clear the memory created by EwAlloc(int aSize)

2. And finally we are getting this message "assert occured in tlsf" from below funciton,

static void tlsf_assert( int condition )

{

  if ( ! condition )

  {

    EwPrint( "assert occured in tlsf\n" );

    while( 1 );

  }

}

it was end up with the while(1).

 

Regards,

Chaitra

commented Jan 10 by Manfred Schweyer
Hello Chaitra,

the memory alloced by Embedded Wizard (via the function EwAlloc()) is freed automatically (via the function EwFree()) due the integrated Garbage Collection. This means, as long as an object or a resource is used it will not be freed and as soon as an object or resource is no more used it will be removed.

If you get an assertion from the memory manager - I assume there have been other messages reported previously. Please let me know the entire console output.

Best regards,

Manfred.
commented Jan 17 by Chaitra

Hi Manfred,

Please find the Log from Serial Console output in the Below link

https://ask.embedded-wizard.de/?qa=blob&qa_blobid=12936051821274953998

Chaitra

 

commented Jan 17 by Manfred Schweyer
Hi Chaitra,

the interesting part is missing: The beginning when you start the application. All the memory reports between start and end are not so important.

Can you let me know the report at startup?

Btw: What are the many Home_Screen objects in your application - there are 37 instances with each 4796 bytes?

I assume that there is some memory overwriting due to the memory manager panic situation.

Best regards,

Manfred.
commented Jan 17 by Chaitra
Hi Manfred,

 

This was missed when we are collecting the log.

the below was the beginnig

EMWI ERROR: code: 115, info1: 356, info2: 72
                                            For details please visit https://doc.embedded-wizard.de/errors
                          EMWI ERROR: code: 115, info1: 969, info2: 122
                                                                       For details please visit https://doc.embedded-wizard.de/errors
       7 object(s) of class 'Resources::Font' (each 32 bytes large)
       5 object(s) of class 'Resources::Bitmap' (each 40 bytes large)
       4 object(s) of class 'Core::LayoutContext' (each 52 bytes large)
       1 object(s) of class 'WRC_Screens::DeviceClass' (each 164 bytes large)
       1 object(s) of class 'Application::Application' (each 5836 bytes large)

    6860 bytes occupied by 18 Chora objects (peak 11652 bytes)
    1722 bytes occupied by 81 strings (peak 2076 bytes)
  144972 bytes occupied by Graphics Engine objects (without framebuffer) (peak 165244 bytes)

Regards,

Chaitra.
commented Jan 17 by Manfred Schweyer

Hi Chaitra,

o.k. there was an error that happens when you try to create a bitmap with the size 356x72 pixel and another one with the size 969x122 pixel. Is this EwCreateBitmap() function call within your code of extern bitmap?

Anyhow, the above log cannot match with the previous posted log!

If you have at the beginning

  6860 bytes occupied by 18 Chora objects (peak 11652 bytes)
    1722 bytes occupied by 81 strings (peak 2076 bytes)
  144972 bytes occupied by Graphics Engine objects (without framebuffer) (peak 165244 bytes)

Then you cannot have later

  198080 bytes occupied by 240 Chora objects (peak 209596 bytes)
   12876 bytes occupied by 504 strings (peak 13314 bytes)
   30084 bytes occupied by Graphics Engine objects (without framebuffer) (peak 44012 bytes)

The memory peak value of the Graphics Engine objects cannot decrease during runtime. This confuses me.

And please let me know the entire message at the beginning DIRECTLY AFTER THE RESET (messages concerning initialization of the system, configuration parameter, ...)

Thank you and best regards,

Manfred.

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...