cancel
Showing results for 
Search instead for 
Did you mean: 

cc1plus.exe: out of memory allocating...

ncdoody
Associate II

Whenever I add an image to project, even if not yet using it on a screen, I get the out of memory error upon trying to run the simulator. I remove the image and it compiles again.

Test image is only 88kB .png. Is this still too big? Had been compiling one day and not the next.

Thanks.

6 REPLIES 6
ncdoody
Associate II

I realize I didn't provide much context. This is using TouchGFX Designer 4.21.4 on both Windows 10 and 11 machines. Turns out I can compile when I use a 32kB png image, but not an 88kB image. Is there simply a maximum image size requirement that I'm missing? When I run the TouchGFX Simulator I get the following error:

Run Simulator

   Generate

       Done

   Generate Assets

       make -f simulator/gcc/Makefile assets -j8

       Reading ./application.config

       Reading ./target.config

       Done

   Post Generate

       touchgfx update_project --project-file=simulator/msvs/Application.vcxproj

       Done

   Compile

       make -f simulator/gcc/Makefile -j8

       Reading ./application.config

       Reading ./target.config

       Compiling generated/images/src/image_RDM_TEXT_LOGO_-_black.cpp

       cc1plus.exe: out of memory allocating 1073745919 bytes

       make[2]: *** [build/MINGW32_NT-6.2/generated/images/src/image_RDM_TEXT_LOGO_-_black.o] Error 1

       generated/simulator/gcc/Makefile:196: recipe for target 'build/MINGW32_NT-6.2/generated/images/src/image_RDM_TEXT_LOGO_-_black.o' failed

       generated/simulator/gcc/Makefile:155: recipe for target 'generate_assets' failed

       make[1]: *** [generate_assets] Error 2

       simulator/gcc/Makefile:32: recipe for target 'all' failed

       make: *** [all] Error 2

       Failed

   Failed

JTP1
Lead

Hello. There should not be limits with image size this small, especially when your are running it with simulator. Have you test some other png picture same size, maybe there is something wrong with the image ? Can you share the image or simple project ?

ncdoody
Associate II

I think you're onto something here @Jukka Pöppönen​ . I tried a downloaded 927kB image and no problem. Must be something wrong with the png files. Several company logo files have this same problem. Thoughts on figuring out what's wrong with the files?

ncdoody
Associate II

@Jukka Pöppönen​  Any idea what's wrong with the attached png file?

JTP1
Lead

Good morning. Even this picture is small in kilobytes, its resolution is huge 4859 x 1150. So the Cpp containing this image is 136 megabytes and thats too much. I got exactly same errors when test this image.

Guess its best to find image with smaller resolution or use some program to scale down resolution on this file.

JTP1
Lead

For example, here is 485 pix wide version (one tenth of orginal). Its working fine.