Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QT5 application code size or data memory size limit?



  • Hi,
    we have developed QT GUI for USB-CDC application, to interact with a target board.
    That was working fine.
    Now we need some more data from target board. when we added code for it, there is no communication thru USB in QT GUI (it does not respond).
    when we commented out the extra code that has been added, it works as usual.
    We declared one extra variable, it is compiling, but not working.
    when we remove that declaration, it was working fine.

    Is there any limit on code size in QT4.6.0-rc1?

    or is there any other point, that we have to look at.

    Thanks.


  • Moderators

    @o6a6r9v1p said in QT5 application code size or data memory size limit?:

    Is there any limit on code size

    Not really. How big is your compiled application?

    We declared one extra variable, it is compiling, but not working.
    when we remove that declaration, it was working fine.

    "Not working" in what way? Please provide details, and please tell us how you tried to debug the app.

    QT4.6.0-rc1

    The RC versions are not proper releases. I suggest you upgrade to the latest released version.

    Also, Qt Creator is not the same as Qt.



  • @JKSH
    thank you,

    1. it is not very big, around 1.8MB.

    2. when i declared a variable additionally, USB stops responding.
      when that variable is commented, compiled, it works fine, and works correctly.

    3. i didnot debug this because it is addition of one line code, and because earlier code was working fine.


  • Lifetime Qt Champion

    @o6a6r9v1p
    Hi,
    Its sounds pretty odd.
    what kind of variable ? an array or ?


  • Moderators

    @o6a6r9v1p said in QT5 application code size or data memory size limit?:

    1. it is not very big, around 1.8MB.

    The size is definitely not a problem.

    1. when i declared a variable additionally, USB stops responding.

    And what about the rest of your app? Do other parts still work?

     when that variable is commented, compiled, it works fine, and works correctly.
    

    Give us more details about the variable.

    1. i didnot debug this because it is addition of one line code, and because earlier code was working fine.

    You should debug it because your code stops working.

    This is my guess: That new variable isn't the root cause of your problem. There was an existing, hidden problem in your code before, but you didn't notice it before because it didn't stop your USB comms. After you added the variable, your app's memory layout or timings changed a tiny bit, and that was enough to cause the existing, hidden problem to become noticeable.


Log in to reply