[Solved]Compiler is out of heap space

  • Hi!

    I start to use a qrc file in my project to store the files used by my project(Sound Files, textures , movies and etc...)
    So i start to use them to make my live easyer to handle the many platforms that system will be deployed.
    It works lovely in Android , Mac and IOS , but in Windows i start receive a weird error>

    Compiler is out of heap space.

    Anyone have an idea why this happen?
    When i remove the qrc file it starts compile again...
    Any suggestion to solve this?

    Kind Regards.

  • Lifetime Qt Champion


    You might be creating a too big resource for your compiler to handle. Each resource get's compiled in your executable so if you try to embedded MBs (as in big embedded files) of data you'll hit the compiler's limit.

  • Hummm.....

    There is a way to increase it? , or another option to use as an alternative of QRC files, that make possible i handle resources in a multiplatform way like i do with qrc files?

    I ask this becouse usually i use this to develop games, so it´s important to me access this files in the different platform using the same way(without need develop a resource manager myself...)

    I can reduce this for now, and see how much i can reduce but when the project grow certainly i will have resources more than 200GB easily...

    Any suggestion?

    Kind Regards.

  • You may consider using "External Binary Resources":http://doc.qt.io/qt-5/resources.html

  • 200GB? Seriously? How are you even going to distribute that?

    I'd say that if your resources are that big, you certainly will want to create your own resource manager. Anything pre-cooked is going to grind to a halt on such enormous amounts of data. Did you really plan on compiling in 200GB+ of data into your executable file itself?

  • Most of the relatively large games AFAIK store music and sounds in external files even though most of them are smaller than 2 GB.

  • Sorry Guys,
    It´s 200MB and not GB .... kkkk

    And yes, i´m trying avoid to make my own resource manager , since i dont want for now spent hours of programming to do that and stay focus in the core funtionalities of my app.

    so for now the qrc file fits perfectly(except with this heap space problem) , since some of the platforms(mobile) we have a big limitation in the space avaliable to store resource Data.

    Any Sugestion for a "already done" Open Source Resource Manager that can i evaluate and see i can use as a replacement for the enviroments where i can store large amount of files?

    Acctually my app are running in Win,Mac,Android and yesterday run in the ios simulator(not in the phone itself) and it´s amazing how different this enviroments are when we see the deployment folders structure making a real pain start to develop myself something that works in both platforms in the same way to handle it... ;)

    Kind Regards.

  • Hi Andreyc,

    I will check it out, thanks so much!

    Kind Regards.

  • If we're talking about 200MB instead of 200GB, then .rcc files become an interesting option again, I think... That's a difference of 3 orders of magnitude, and that makes all the difference.

  • Lifetime Qt Champion

    And you also have the assets on e.g. Android and iOS that are more designed for these use case

  • Cool!

    I will make some tests, one thing it´s not clear to me is how can i generate the rcc file automatically on the project,

    Anyway, i´m studying it!

    Thanks so much for the help Guys!

    Kind Regards.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.