Announcement

Collapse
No announcement yet.

Error 17 file read Malloc could not allocate the FILE struct

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Error 17 file read Malloc could not allocate the FILE struct

    Hello,

    I have recently received a new batch of displays and my code which works in all my old displays does not work in the new displays.

    In order to verify that there was no vestigial code in my older displays I used the flash_EraseBank(-1,0xDEAD) function and reloaded my code. The code worked. However, in the new displays when the code tries to read a config file in the SD card the error 17 appears.

    The SD card I used is the same for the old displays (the ones that work) and for the new displays, even physically so there was no chance that was the SD.
    The code I download to the displays is the same for all the displays and I erased the banks in all just to be sure they were completely empty.

    Has something changed recently or is my batch defective?

    Thank you in advance,

    GG

  • #2
    Hi GG,

    Good Day.

    Have you tried to check if the new batch of displays have the same PmmC as the old displays?

    Best Regards,
    Ferdinand

    Comment


    • #3
      Hello Ferdinand,

      Indeed the PmmC version was different. Using the same PmmC version looks to be working.

      Thank you,

      GG

      Comment


      • #4
        Which PmmC versions are we talking about here?

        There are no knows issues in this area
        Mark

        Comment


        • #5
          Hello Mark,

          The version 2.0 of the PmmC works well (old displays).
          The version 2.4 of the PmmC did not work (new displays).

          I put version 2.6 of the PmmC because it was the latest and it worked well.

          GG

          Comment


          • #6
            Hello again,

            How can I control the PmmC version my displays come with?

            For mass production this issue is unacceptable.

            GG

            Comment


            • #7
              Your displays should always come with the latest, as at manufacturing date. Depending on stock at distributors they may ship displays with older PmmCs. if you are ordering direct from 4D Systems you can request a specific PmmC, after consulting with Sales.
              Mark

              Comment


              • #8
                Hello again,

                I am having issues with the PmmC 2.6 as well whereas with the PmmC 2.0 everything runs as expected.

                Where could I find the change logs of the PmmC?

                Where can I download old versions of the PmmC (2.0)?

                Is there a way to identify the PmmC from the box label so in the production line they can predict the PmmC version?

                What is the SPE? Can it affect the communications between the device and the display? Could my trouble be caused by a combination with SPE version and PmmC version?

                Thank you in advance,

                GG

                Comment


                • #9
                  We are not aware of any issues with the 2.6 PmmC, so please tell us what is going on so that we can help you.

                  The SPE is the Serial programming environment, the SPE from 2.0 should work fine with 2.6.

                  However, the initial baud rate can be changed withing Workshop, so, if you had a particular initial baud rate set (displayed on the logo screen), you should ensure that you use the same initial baud rate when reloading the SPE.
                  Mark

                  Comment


                  • #10
                    I have not debugged as I did with the 2.4 PmmC but visually it is the same issue. By the time I systematically debug it I will let you know.

                    Where can I find the PmmC 2.0?

                    Where can I find the change logs for Pmmcs?

                    Thank you in advance,

                    GG

                    Comment


                    • #11
                      Workshop, Options, Updates, Release Notes, View.
                      Mark

                      Comment


                      • #12
                        Thank you Mark,

                        And could you also indicate where can I find the PmmC2.0 so I can use it instead of the newer ones?

                        Comment


                        • #13
                          Back on the 22nd of Sept you said 2.6 'worked well', now you want 2.0 again.

                          The kind of error you are getting implies you are running out of RAM space, have you checked mem_Heap()?

                          Have you not closed files you no longer need, or not freed handles obtained using one of the file_Load* functions?

                          We prefer to fix issues rather than just had out old PmmCs, so we'd really appreciate more information about this issue you are having.

                          If you still feel the need to use a 5 year old PmmC, please create a ticket from the support pages at https://4dsystems.com.au/support

                          Mark

                          Comment


                          • #14
                            Hello again,

                            I have been testing my versions of code with different PmmC:
                            Code version / PmmC 2.0 2.4 2.6
                            3.0 (Currently in mass production) works works works
                            3.2 (changes in the location of some functions to different flashbanks to free space in flashbank 0 + added new features) works works works
                            3.3 (creates images capturing the content of the screen and saves them into the SD to be read later if needed) works does not work* works
                            3.4 (minor bug fixing of 3.3) no data no data does not work*
                            *does not work means that after reading the images and the fonts the error 17 raises and the display can not open the next files it has to open.

                            I am currently working on checking the memory heap and I have to check also the "Have you not closed files you no longer need, or not freed handles obtained using one of the file_Load* functions?" .

                            As soon as I have more information I will be posting again.

                            Could it be a difference in the RAM management of the PmmCs?

                            Thank you in advance,

                            GG

                            Comment


                            • #15
                              It could be heap fragmentation, or, as said earlier just no more memory available.

                              mem_Heap() returns the largest memory block on the heap, not the total space.

                              The only RAM management type changes in the PmmCs in recent times were
                              2.2 "1] Fixed Highest 36 bytes of RAM not addressable via string pointer". A consequence of that was that the heap shrunk by 36 bytes, to the addressable 32KB, i.e. it was 36 bytes too large.
                              2.6 "2] Fixed potential failure to render large font if sound playing". A consequence of that was that just freed could be immediately reallocated, this could be the difference between 2.4 and 2.6 on your table

                              There may be a strong hint in the changes between 3.3 and 3.4, if you like, you can send your source to mark at 4dsystems dot com dot au, prefarably both 3.3 and 3.4.
                              Mark

                              Comment

                              Working...
                              X