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. Qt application work on Ubuntu 20.04, but doesn't work on Windows 10
QtWS25 Last Chance

Qt application work on Ubuntu 20.04, but doesn't work on Windows 10

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 4 Posters 409 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.
  • J Offline
    J Offline
    Jan_29
    wrote on last edited by
    #1

    Hello everyone!
    I'm new in Qt development.
    I have had the problem that I can't solve on my own.
    I developed simple GUI application for monitoring telemetry from Arduino board. Application uses QCustomPlotand QSerialPort. Application work perfectly on Ubuntu 20.04 without any problems and use 30 mbytes of ram. There are a lot of problems when I build and use my application on windows 10. First 2-5 seconds GUI works right and use 30mbytes of memory, but later application is freezed and memory usage is increased 1-2 gigabytes every second. the application stops responding and crashes. Could anyone help me?
    I used QCustomPlot v2.1.1, Qt 6.5.1 MinGW.

    JonBJ jsulmJ J 3 Replies Last reply
    0
    • J Jan_29

      Hello everyone!
      I'm new in Qt development.
      I have had the problem that I can't solve on my own.
      I developed simple GUI application for monitoring telemetry from Arduino board. Application uses QCustomPlotand QSerialPort. Application work perfectly on Ubuntu 20.04 without any problems and use 30 mbytes of ram. There are a lot of problems when I build and use my application on windows 10. First 2-5 seconds GUI works right and use 30mbytes of memory, but later application is freezed and memory usage is increased 1-2 gigabytes every second. the application stops responding and crashes. Could anyone help me?
      I used QCustomPlot v2.1.1, Qt 6.5.1 MinGW.

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @Jan_29
      It is going to be very hard for anybody to say anything useful with no code and no idea what you do. Are you able to produce some minimal example illustrating the behaviour (not just the whole of your code as-is, unlikely anyone is going to look through come whole project).

      1 Reply Last reply
      0
      • BosGemilerB Offline
        BosGemilerB Offline
        BosGemiler
        wrote on last edited by
        #3

        Hi,
        I can say that I had similar issue in past. My app was working well in linux, but it was freezing, crashing in windows 10. Afterwards I noticed that I wrongly used one function from qt serial port library. In my case, my app was using QSerialPort::waitForBytesWritten function after write() function call.

        Somehow this wrong usage of this function didn't cause any issue in linux side, but it complained in Windows. I hope, my experience can be helpful for you. Also, I will suggest you using Debugging, it can give you some helpful informations.

        1 Reply Last reply
        1
        • J Jan_29

          Hello everyone!
          I'm new in Qt development.
          I have had the problem that I can't solve on my own.
          I developed simple GUI application for monitoring telemetry from Arduino board. Application uses QCustomPlotand QSerialPort. Application work perfectly on Ubuntu 20.04 without any problems and use 30 mbytes of ram. There are a lot of problems when I build and use my application on windows 10. First 2-5 seconds GUI works right and use 30mbytes of memory, but later application is freezed and memory usage is increased 1-2 gigabytes every second. the application stops responding and crashes. Could anyone help me?
          I used QCustomPlot v2.1.1, Qt 6.5.1 MinGW.

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @Jan_29 said in Qt application work on Ubuntu 20.04, but doesn't work on Windows 10:

          but later application is freezed and memory usage is increased 1-2 gigabytes every second

          Sounds like a memory leak. As mentioned already: show your code. You can also use tools to search for memory leaks in your app.

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • J Jan_29

            Hello everyone!
            I'm new in Qt development.
            I have had the problem that I can't solve on my own.
            I developed simple GUI application for monitoring telemetry from Arduino board. Application uses QCustomPlotand QSerialPort. Application work perfectly on Ubuntu 20.04 without any problems and use 30 mbytes of ram. There are a lot of problems when I build and use my application on windows 10. First 2-5 seconds GUI works right and use 30mbytes of memory, but later application is freezed and memory usage is increased 1-2 gigabytes every second. the application stops responding and crashes. Could anyone help me?
            I used QCustomPlot v2.1.1, Qt 6.5.1 MinGW.

            J Offline
            J Offline
            Jan_29
            wrote on last edited by
            #5

            Thank you all for your activity!
            I found out why my app freezes from time to time.Reading from the serial buffer has an unlimited size. When I parse messages, an error occurs in the business logic and an infinite loop appears (because there is a bad conditional for while loop) in read signal from Serial. That's why my memory in the application was increasing. I don't know why this error not occurred on Ubuntu, but I've started to fix this problem.

            1 Reply Last reply
            0

            • Login

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