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. QtSerialPort and memory usage
Forum Update on Monday, May 27th 2025

QtSerialPort and memory usage

Scheduled Pinned Locked Moved General and Desktop
serialport
18 Posts 3 Posters 7.7k Views
  • 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.
  • M Offline
    M Offline
    mrjj
    Lifetime Qt Champion
    wrote on 7 Oct 2015, 07:39 last edited by mrjj 10 Jul 2015, 07:42
    #8

    works.
    Still stable.
    Do you have input on the serial ?
    I will connect something that sends data. just to check.
    How do you make it open console also ?
    Here its just a process.
    Update:
    ignore last question. just saw its QDebug
    Also, with input , I do see mem raising.
    Testing more

    C 1 Reply Last reply 7 Oct 2015, 07:56
    0
    • M Offline
      M Offline
      mrjj
      Lifetime Qt Champion
      wrote on 7 Oct 2015, 07:55 last edited by
      #9

      ok,
      slowly from 12k to 17k. over time when it has input.
      Also the pmc changes.
      So yes. I see the same.
      Will leave it running for some time to check if it stops.

      1 Reply Last reply
      0
      • M mrjj
        7 Oct 2015, 07:39

        works.
        Still stable.
        Do you have input on the serial ?
        I will connect something that sends data. just to check.
        How do you make it open console also ?
        Here its just a process.
        Update:
        ignore last question. just saw its QDebug
        Also, with input , I do see mem raising.
        Testing more

        C Offline
        C Offline
        codeaway
        wrote on 7 Oct 2015, 07:56 last edited by
        #10

        @mrjj

        Yes, I do have a microcontroller reading values and outputting to serial port
        continuously.

        Actually, the application I created is a console application. The info is output
        with QDebug additionally.

        Nevertheless, you can choose to output with console without QDebug too.

        CONFIG += console

        in the .pro file

        Create a output stream in the actual code

        QTextStream out(stdout);

        and output whatever required

        out << "Something" << endl;

        M 1 Reply Last reply 7 Oct 2015, 08:11
        0
        • C codeaway
          7 Oct 2015, 07:56

          @mrjj

          Yes, I do have a microcontroller reading values and outputting to serial port
          continuously.

          Actually, the application I created is a console application. The info is output
          with QDebug additionally.

          Nevertheless, you can choose to output with console without QDebug too.

          CONFIG += console

          in the .pro file

          Create a output stream in the actual code

          QTextStream out(stdout);

          and output whatever required

          out << "Something" << endl;

          M Offline
          M Offline
          mrjj
          Lifetime Qt Champion
          wrote on 7 Oct 2015, 08:11 last edited by
          #11

          @codeaway
          Ok i killed it at 25K.
          Since we just reading a char, it cant be in the us that leaks.

          I must agree it seems odd.

          1 Reply Last reply
          0
          • K Offline
            K Offline
            kuzulis
            Qt Champions 2020
            wrote on 7 Oct 2015, 08:47 last edited by
            #12

            Can you please test same with the virtual com0com: http://sourceforge.net/projects/com0com/
            A signed driver for x64: https://code.google.com/p/powersdr-iq/downloads/detail?name=setup_com0com_W7_x64_signed.exe&can=2&q=

            C M 2 Replies Last reply 7 Oct 2015, 09:04
            0
            • K kuzulis
              7 Oct 2015, 08:47

              Can you please test same with the virtual com0com: http://sourceforge.net/projects/com0com/
              A signed driver for x64: https://code.google.com/p/powersdr-iq/downloads/detail?name=setup_com0com_W7_x64_signed.exe&can=2&q=

              C Offline
              C Offline
              codeaway
              wrote on 7 Oct 2015, 09:04 last edited by
              #13

              @kuzulis

              I downloaded the x86 build, as I am running a 32 bit OS.
              How should I configure com0com ?

              1 Reply Last reply
              0
              • K kuzulis
                7 Oct 2015, 08:47

                Can you please test same with the virtual com0com: http://sourceforge.net/projects/com0com/
                A signed driver for x64: https://code.google.com/p/powersdr-iq/downloads/detail?name=setup_com0com_W7_x64_signed.exe&can=2&q=

                M Offline
                M Offline
                mrjj
                Lifetime Qt Champion
                wrote on 7 Oct 2015, 09:06 last edited by
                #14

                @kuzulis
                just as a virtual port or as a loop ?

                1 Reply Last reply
                0
                • K Offline
                  K Offline
                  kuzulis
                  Qt Champions 2020
                  wrote on 7 Oct 2015, 11:54 last edited by
                  #15

                  How should I configure com0com ?

                  Just create a pair with the "use port class" and "eneble buffer overrun" (via setupg.exe ui)

                  just as a virtual port or as a loop ?

                  as a two virtual ports. . e.g. COM1 as receiver for qserialport and COM2 as sender for other software (e.g. I have used Termite app to send).

                  UPD:

                  Yes, I too can reproduce this memory leak..

                  C 1 Reply Last reply 7 Oct 2015, 13:43
                  0
                  • K kuzulis
                    7 Oct 2015, 11:54

                    How should I configure com0com ?

                    Just create a pair with the "use port class" and "eneble buffer overrun" (via setupg.exe ui)

                    just as a virtual port or as a loop ?

                    as a two virtual ports. . e.g. COM1 as receiver for qserialport and COM2 as sender for other software (e.g. I have used Termite app to send).

                    UPD:

                    Yes, I too can reproduce this memory leak..

                    C Offline
                    C Offline
                    codeaway
                    wrote on 7 Oct 2015, 13:43 last edited by
                    #16

                    @kuzulis

                    Yeah, reproduced it with com0com and termite.
                    Attached link to screencap

                    http://postimg.org/image/mku4ege29/

                    After a detailed analysis, it looks as though all QtSerialPort examples
                    also face this issue.

                    M 1 Reply Last reply 7 Oct 2015, 13:46
                    0
                    • C codeaway
                      7 Oct 2015, 13:43

                      @kuzulis

                      Yeah, reproduced it with com0com and termite.
                      Attached link to screencap

                      http://postimg.org/image/mku4ege29/

                      After a detailed analysis, it looks as though all QtSerialPort examples
                      also face this issue.

                      M Offline
                      M Offline
                      mrjj
                      Lifetime Qt Champion
                      wrote on 7 Oct 2015, 13:46 last edited by
                      #17

                      @codeaway
                      Yep got ever increasing mem use also with com0com.
                      If time permits I try the examples too.

                      1 Reply Last reply
                      0
                      • K Offline
                        K Offline
                        kuzulis
                        Qt Champions 2020
                        wrote on 7 Oct 2015, 15:19 last edited by
                        #18

                        Probably it is a bug of QWinOverlappedIoNotifier : https://bugreports.qt.io/browse/QTBUG-48653
                        Let's wait for more info about..

                        1 Reply Last reply
                        1

                        17/18

                        7 Oct 2015, 13:46

                        • Login

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