Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. qrc_resources.cpp fatal error C1060: compiler is out of heap space
Forum Updated to NodeBB v4.3 + New Features

qrc_resources.cpp fatal error C1060: compiler is out of heap space

Scheduled Pinned Locked Moved Solved General and Desktop
20 Posts 5 Posters 2.8k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    SPlatten
    wrote on 25 Jun 2020, 10:32 last edited by SPlatten
    #1

    I've been porting quite a large project developed originally with Qt 4.8 and I'm and updating it for Qt 5.8. I've fixed all the warnings and errors so far.

    There is now only one issue remaining or at least thats all I see:

    Issues Panel contains:

    C:\Users\u49100\Documents\projectName\build-projectName-Desktop_Qt_5_8_0_MSVC2013_32bit-Debug\debug\qrc_qresources.cpp:1326934: error: C1060: compiler is out of heap space
    

    In the Compiler Output panel:

    debug\qrc_qresources.cpp(1326934) : fatal error C1060: compiler is out of heap space
    jom: C:\Users\u49100\Documents\projectName\build-projectName-Desktop_Qt_5_8_0_MSVC2013_32bit-Debug\Makefile.Debug [debug\qrc_qresources.obj] Error 2
    

    I have no clue what the reason for this is and I've tried google but no further forward.

    Kind Regards,
    Sy

    1 Reply Last reply
    0
    • S SPlatten
      25 Jun 2020, 10:40

      I've never done this before, is it simply a case of copying chunks of the file and adding another .qrc file with the content?

      S Offline
      S Offline
      sierdzio
      Moderators
      wrote on 25 Jun 2020, 10:43 last edited by
      #4

      @SPlatten said in qrc_resources.cpp fatal error C1060: compiler is out of heap space:

      I've never done this before, is it simply a case of copying chunks of the file and adding another .qrc file with the content?

      Yes, exactly, a simple copy-paste. Or rather, cut-paste.

      (Z(:^

      1 Reply Last reply
      3
      • S Offline
        S Offline
        sierdzio
        Moderators
        wrote on 25 Jun 2020, 10:39 last edited by
        #2

        Try to split your resources into separate, smaller files. Compiling QRC consumes vast amounts of RAM etc. so it's quite easy to run into memory problems.

        Your Qt app won't notice any difference - QRC paths inside of app stay the same, regardless of how many real concrete QRC files are used.

        (Z(:^

        1 Reply Last reply
        4
        • S Offline
          S Offline
          SPlatten
          wrote on 25 Jun 2020, 10:40 last edited by
          #3

          I've never done this before, is it simply a case of copying chunks of the file and adding another .qrc file with the content?

          Kind Regards,
          Sy

          S 1 Reply Last reply 25 Jun 2020, 10:43
          0
          • S SPlatten
            25 Jun 2020, 10:40

            I've never done this before, is it simply a case of copying chunks of the file and adding another .qrc file with the content?

            S Offline
            S Offline
            sierdzio
            Moderators
            wrote on 25 Jun 2020, 10:43 last edited by
            #4

            @SPlatten said in qrc_resources.cpp fatal error C1060: compiler is out of heap space:

            I've never done this before, is it simply a case of copying chunks of the file and adding another .qrc file with the content?

            Yes, exactly, a simple copy-paste. Or rather, cut-paste.

            (Z(:^

            1 Reply Last reply
            3
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 25 Jun 2020, 11:00 last edited by
              #5

              Hi,

              Out of curiosity, how many resources do you have in the original file ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • S Offline
                S Offline
                SPlatten
                wrote on 25 Jun 2020, 11:13 last edited by SPlatten
                #6

                The original XML file contains 548 lines.
                358 of these are images.
                5 are JavaScript files
                The rest are QML files and fonts.

                Kind Regards,
                Sy

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  SPlatten
                  wrote on 25 Jun 2020, 11:17 last edited by
                  #7

                  Having split the original resource into 3 files, it stills come back with the same error on the last file which contains all the QML files.

                  And now I'm also getting:

                    C1063: INTERNAL COMPILER ERROR      c1xx
                  

                  Kind Regards,
                  Sy

                  J 1 Reply Last reply 25 Jun 2020, 11:21
                  0
                  • S SPlatten
                    25 Jun 2020, 11:17

                    Having split the original resource into 3 files, it stills come back with the same error on the last file which contains all the QML files.

                    And now I'm also getting:

                      C1063: INTERNAL COMPILER ERROR      c1xx
                    
                    J Offline
                    J Offline
                    J.Hilk
                    Moderators
                    wrote on 25 Jun 2020, 11:21 last edited by J.Hilk
                    #8

                    @SPlatten you have to rerun qmake after adding new resource files or when you edited a resource file


                    Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                    Q: What's that?
                    A: It's blue light.
                    Q: What does it do?
                    A: It turns blue.

                    1 Reply Last reply
                    1
                    • S Offline
                      S Offline
                      SPlatten
                      wrote on 25 Jun 2020, 11:23 last edited by
                      #9

                      @J-Hilk, Done that, still a problem.

                      Kind Regards,
                      Sy

                      1 Reply Last reply
                      0
                      • S Offline
                        S Offline
                        sierdzio
                        Moderators
                        wrote on 25 Jun 2020, 11:29 last edited by
                        #10

                        Thats weird! I've had memory issues in QRC with images, but with QML code - never. Something else must be causing the problem here.

                        2 things to try:

                        • run in single-job mode (no -j 8 or /MP, no jom.exe or whatever - sorry I'm not too Windowsy :P). This should be a bit lighter on memory
                        • try to add QML files one by one - maybe one specific QML file causes this? Maybe it contains some data which triggers the error?

                        (Z(:^

                        1 Reply Last reply
                        0
                        • S Offline
                          S Offline
                          SPlatten
                          wrote on 25 Jun 2020, 11:31 last edited by
                          #11

                          Thanks, waiting for the current build to finish, if its still an issue I will take your advice.

                          Kind Regards,
                          Sy

                          1 Reply Last reply
                          0
                          • S Offline
                            S Offline
                            SPlatten
                            wrote on 25 Jun 2020, 11:36 last edited by
                            #12

                            Ok the error has changed again, now:

                            C1001: An internal error has occurred in the compiler.
                            

                            And it stopped on the resource file that contains files that I don't think are relevant:

                            <RCC>
                            <qresource prefix="/">
                            <file>distribution_support/qt.conf</file>
                            <file>sortexS_tr.ts</file>
                            <file>sortexS_th.ts</file>
                            <file>sortexS_es.ts</file>
                            <file>sortexS_en.ts</file>
                            <file>sortexS_ru.ts</file>
                            <file>sortexS_fr.ts</file>
                            <file>sortexS_it.ts</file>
                            <file>sortexS_vi.ts</file>
                            <file>sortexS_pt.ts</file>
                            <file>sortexS_kr.ts</file>
                            <file>sortexS_xx.ts</file>
                            <file>sortexS_xy.ts</file>
                            <file>malgun.ttf</file>
                            <file>runui.bat</file>
                            </qresource>
                            </RCC>
                            
                            

                            Kind Regards,
                            Sy

                            1 Reply Last reply
                            0
                            • S Offline
                              S Offline
                              SGaist
                              Lifetime Qt Champion
                              wrote on 25 Jun 2020, 19:31 last edited by
                              #13

                              How heavy are these images ?
                              How big is these files ?

                              Interested in AI ? www.idiap.ch
                              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                              S 1 Reply Last reply 25 Jun 2020, 19:55
                              0
                              • S SGaist
                                25 Jun 2020, 19:31

                                How heavy are these images ?
                                How big is these files ?

                                S Offline
                                S Offline
                                SPlatten
                                wrote on 25 Jun 2020, 19:55 last edited by
                                #14

                                @SGaist Hi, sorry can you explain by heavy to you mean how big are the file size's? They are all quite small, typical icon size's and mostly png's.

                                Kind Regards,
                                Sy

                                1 Reply Last reply
                                0
                                • S Offline
                                  S Offline
                                  SGaist
                                  Lifetime Qt Champion
                                  wrote on 25 Jun 2020, 19:57 last edited by
                                  #15

                                  Yes, I meant their size.

                                  Interested in AI ? www.idiap.ch
                                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                  S 1 Reply Last reply 25 Jun 2020, 19:58
                                  0
                                  • S SGaist
                                    25 Jun 2020, 19:57

                                    Yes, I meant their size.

                                    S Offline
                                    S Offline
                                    SPlatten
                                    wrote on 25 Jun 2020, 19:58 last edited by
                                    #16

                                    @SGaist , The dimensions of the images again are icon sizes's so all quite small, they're is just a lot of them.

                                    Kind Regards,
                                    Sy

                                    ivanicyI 1 Reply Last reply 17 Dec 2020, 12:09
                                    0
                                    • S Offline
                                      S Offline
                                      SGaist
                                      Lifetime Qt Champion
                                      wrote on 25 Jun 2020, 21:47 last edited by
                                      #17

                                      Ok, so nothing really unusual. How big are the generated cpp files ?

                                      Interested in AI ? www.idiap.ch
                                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                      1 Reply Last reply
                                      0
                                      • S Offline
                                        S Offline
                                        SPlatten
                                        wrote on 26 Jun 2020, 04:46 last edited by
                                        #18

                                        Total six of the project folder excluding objects and executable is 28MB, 882 Files.

                                        Kind Regards,
                                        Sy

                                        1 Reply Last reply
                                        0
                                        • S Offline
                                          S Offline
                                          SGaist
                                          Lifetime Qt Champion
                                          wrote on 26 Jun 2020, 18:50 last edited by
                                          #19

                                          Sorry, I meant the cpp files generated by rcc.

                                          Interested in AI ? www.idiap.ch
                                          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                          1 Reply Last reply
                                          0
                                          • S SPlatten
                                            25 Jun 2020, 19:58

                                            @SGaist , The dimensions of the images again are icon sizes's so all quite small, they're is just a lot of them.

                                            ivanicyI Offline
                                            ivanicyI Offline
                                            ivanicy
                                            wrote on 17 Dec 2020, 12:09 last edited by
                                            #20

                                            @SPlatten Hi, it's too late but, maybe adding

                                            CONFIG += resources_big
                                            

                                            fixes the problem

                                            1 Reply Last reply
                                            1

                                            • Login

                                            • Login or register to search.
                                            • First post
                                              Last post
                                            0
                                            • Categories
                                            • Recent
                                            • Tags
                                            • Popular
                                            • Users
                                            • Groups
                                            • Search
                                            • Get Qt Extensions
                                            • Unsolved